I\'m just trying to do a simple RandomForestRegressor example. But while testing the accuracy I get this error
/Users/noppanit/anaconda/lib/pyt
Since you are doing a classification task, you should be using the metric R-squared (co-effecient of determination) instead of accuracy score (accuracy score is used for classification purposes).
To avoid any confusion I suggest you to use different variable name like reg/rfr.
R-squared can be computed by calling score function provided by RandomForestRegressor, for example:
rfr.score(X_test,Y_test)