DataConversionWarning: A column-vector y was passed when a 1d array was expected. 问题解决?
数据转换警告:当需要一维数组时,传递了列向量y。请将Y的形状更改为(n_samples,),例如使用ravel()。
y = column_or_1d(y, warn=True)
model = forest.fit(train_fold, train_y)
model = forest.fit(train_fold, train_y.values.ravel())