sklearn 隨機劃分訓練集和測試集函數train_test_split

train_test_split是交叉驗證中經常使用的函數,功能是從樣本中隨機的按比例選取train data和testdata,形式爲:python X_train,X_test, y_train, y_test =數組 cross_validation.train_test_split(train_data,train_target,test_size=0.4, random_state=0)
相關文章
相關標籤/搜索