haifengl / smile

Statistical Machine Intelligence & Learning Engine
https://haifengl.github.io
Other
5.99k stars 1.12k forks source link

Able to specify an explanatory variable as numerical or categorical #698

Closed davidzxc574 closed 2 years ago

davidzxc574 commented 2 years ago

Is your feature request related to a problem? Please describe. I have categorical features and would like to include them as expalanatory variables in random forest regression for instance.

Describe the solution you'd like Can we somehow designate an explanatory variable to be double or categorical variable? Like in R or spark ML.

haifengl commented 2 years ago

It is specified in DataFrame. If a column is of NominalScale, it will be treated as categorical.