Got continuous is not supported error in RandomForestRegressor

It’s because accuracy_score is for classification tasks only. For regression you should use something different, for example:

clf.score(X_test, y_test)

Where X_test is samples, y_test is corresponding ground truth values. It will compute predictions inside.

Leave a Comment