# 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
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 2, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.5816298127174377, "perplexity": 728.4296942024665}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-43/segments/1634323585183.47/warc/CC-MAIN-20211017210244-20211018000244-00637.warc.gz"}