Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I specify classification in h2o random forest

I am looking all over the internet on how to specify classification in h2o.randomForest. Whatever I could find says that there is parameter "classification" which we can set to TRUE. But it is not there anymore as per the h2o package documentation.

SEE here https://cran.r-project.org/web/packages/h2o/h2o.pdf

When I run this h2o.randomForest on my data in which the target variable is a binary 1-0 variable, it assumes regression.

I am not sure how to tell it that I want to do classifcation.

Any help will be greatly appreciated.

Thanks

like image 762
user3664020 Avatar asked Jan 27 '26 08:01

user3664020


1 Answers

If you are using R you need to use as.factor to convert your binary 1-0 variables, and if you are using Flow, you need to convert your binary 1-0 variables to enums. After you do this, H2O's random forest will automatically recognize this as a classification problem.

Thanks,

Avni

like image 118
Avni Avatar answered Jan 28 '26 22:01

Avni



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!