【发布时间】:2021-12-27 18:17:40
【问题描述】:
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)
在 () ----> 1 RF.accuracy_score(x_test,y_test)
AttributeError: 'RandomForestRegressor' 对象没有属性 'accuracy_score'
【问题讨论】:
标签: python model google-colaboratory random-forest attributeerror