关于sklearn

数据拆分

  • from sklearn.model_selection import train_test_split
  • 用法:X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=.3, random_state=0)
  • test_size:测试集所占比例
posted @ 2019-07-24 15:12  Rener  阅读(108)  评论(0编辑  收藏  举报