# Random forest ordinal data

I want to estimate a Random Forest in some statistical language (SAS). This can only be estimated by setting the target variable as nominal instead of ordinal. Isn't it possible to estimate a Random Forest with a ordinal target variable in general? If it is possible, does estimating the target variable as ordinal instead of nominal have any prediction gains?

• Oct 7 '19 at 9:35

You can certainly use random forest for regression with an ordinal target variable, as forests algorithms do not use metric information in the data (so should give the same results for say, target variables $$Y$$ or $$\log Y$$), just tell the algorithm (if necessary) your target is continuous (and code it as that.) See for instance this or this list of post on this site. Or, as pointed out in a comment, there is a dedicted R package.
• I don't see where those references apply to ordinal $Y$. A method that properly respects ordinality of $Y$ would work on bimodal distributions, handle floor and ceiling effects, and be transformation-invariant. Oct 7 '19 at 11:06