AttributeError:“ RandomForestRegressor”对象没有属性“ _validate_data”是什么意思?

时间:2020-06-17 00:26:22

标签: python

from sklearn.ensemble import RandomForestRegressor

regressor = RandomForestRegressor(n_estimators=20, random_state=0)

regressor.fit(x_train, y_train)

y_pred = regressor.predict(x_test)

AttributeError:“ RandomForestRegressor”对象没有属性“ _validate_data”

0 个答案:

没有答案