sklearn之train_test_split()函数各参数含义(非常全)
在机器学习中,我们通常将原始数据按照比例分割为“测试集”和“训练集”,
从 sklearn.model_selection 中调用train_test_split 函数
简单用法如下:
X_train,X_test, y_train, y_test =sklearn.model_selection.train_test_split(train_data,train_target,test_size=0.4, random_state=0,stratify=y_train)
# train_data:所要划分的样本特征集
# train_target:
所要划分的样本结果