简体   繁体   English

如何在H2O随机森林中指定分类

[英]How do I specify classification in h2o random forest

I am looking all over the internet on how to specify classification in h2o.randomForest. 我正在互联网上寻找如何在h2o.randomForest中指定分类。 Whatever I could find says that there is parameter "classification" which we can set to TRUE. 我所发现的一切都表明存在参数“分类”,我们可以将其设置为TRUE。 But it is not there anymore as per the h2o package documentation. 但是根据h2o软件包文档,该功能已不再存在。

SEE here https://cran.r-project.org/web/packages/h2o/h2o.pdf 在这里查看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. 当我在目标变量为二进制1-0变量的数据上运行此h2o.randomForest时,它将假定回归。

I am not sure how to tell it that I want to do classifcation. 我不确定如何告诉我要进行分类。

Any help will be greatly appreciated. 任何帮助将不胜感激。

Thanks 谢谢

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. 如果使用R,则需要使用as.factor转换二进制1-0变量,如果使用Flow,则需要将二进制1-0变量转换为枚举。 After you do this, H2O's random forest will automatically recognize this as a classification problem. 完成此操作后,H2O的随机森林将自动将其识别为分类问题。

Thanks, 谢谢,

Avni 主治医生

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM