In the H2o documentation it is stated that there the parameter
balance_classes that can be set to
TRUE in order to consider imbalance problem, but I don't see this option at Build a Model section when using H2o Flow. Please advice how to to activate this option.
Answer by deal · yesterday
Here is the solution: By default the
balance_classes appears initially but, it will remain only after setting the response variable if such variable is of type
enum. Becuase my response variable was set as INT, then this option will not appear.
balance_classes is available only for
enum variable type.
Answer by usct · Apr 11 at 09:39 AM
@deal You can use parameter balance_classes=T;
my_rf <- h2o.randomForest(x = x,y = y, training_frame = train, validation_frame = valid, ntrees = 1200,mtries = 2, nfolds = nfolds, fold_assignment = "Modulo",histogram_type = "Random", keep_cross_validation_predictions = TRUE, seed = 1, balance_classes = T)
Also, if you want to use it as hyperparameter, then put balance_classes = c(TRUE,FALSE) in hyperparameter list.
In H2o Flow, you just need to check the box against balance classes.
Hope it helps
Answer by deal · Apr 18 at 04:00 PM
Thanks, usct....I still don't understand how to set it up when using a Form for invoking the algorithm. Can you share some screenshot about where to set it. I don't see such parameter in the "Build a Model" section, I have made a search in this section with no result. Thanks.
Answer by erin · 2 days ago