from sklearn.ensemble import RandomForestRegressor
RF=RandomForestRegressor(n_estimators=500,random_state=101)
RF.fit(predictors,target)
yPrediRF=RF.predict(x_test)
from sklearn.metrics import confusion_matrix,accuracy_score,recall_score,precision_score
RF.accuracy_score(x_test,y_test)
AttributeError Traceback (most recent call last)in () ->1个RF.accuracy_score(x_test,y_test)
AttributeError:“”RandomForestRegressor“”对象没有属性“”accuracy_score“”
发布于 2021-11-16 16:56:19
做
accuracy_score(RF.predict(x_test), y_test)https://stackoverflow.com/questions/69993069
复制相似问题