在2-4的课程中自带函数分离训练数据集和测试数据集的划分标准是什么呢?原数据集中的哪些样本数据会划分到训练数据集、哪些样本数据会划分到测试数据集呢?

来源:2-4 模型评估:准确率、数据分离、参数选择(2)

hoofungson

2023-11-06 23:04

#数据分离
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X,y,test_size = 0.4)


写回答 关注

1回答

  • haoyupei
    2024-06-21 10:30:57

    随机分配合理。

人工智能入门:Python实现机器学习

使用python手把手教你编程实现机器学习

27163 学习 · 81 问题

查看课程

相似问题