# Can Random Forest regression be conducted with a response variable containing <5 unique values?

I'm using Random Forests to determine the importance of numerous environmental predictor variables for predicting forest structural variables. One of the response variables only contains 5 unique values, and so this warning message is produced:

Warning messages:
1: In randomForest.default(m, y, ...) :
The response has five or fewer unique values.  Are you sure you want to do
regression?


My data is legitimate regression data, so can I ignore this warning? Is it still ok to perform regression when there are limited response values?

• Minimal requirement is that the values are on an interval scale (taking average has to make sense to evaluate the squared loss criterion in the splits) – Michael M Apr 11 '18 at 6:51