1

I'm not able to understand the models generated by the H20 automl!

The output is like this, for example: StackedEnsemble_AllModels_1_AutoML_1_20220809_134944

How can I know which base models used by stacked?

Jamiu S.
  • 5,257
  • 5
  • 12
  • 34

1 Answers1

1

Let's say you have an H2OAutoML object in a variable named aml, you can then see the leaderboard by using aml.leaderboard. The leaderboard is basically a table of all trained models sorted by some metric (AUC, RMSE, etc).

Stacked ensembles use the models that were trained before them - either all the models or the best model per model family (GBM, GLM, DRF, etc). To see the base models you can use the following:

print(aml.leaderboard) # to see what models were trained

# Let's assume you like the SE model with
# model_id "StackedEnsemble_AllModels_1_AutoML_2_20220809_174830"

# You can retrieve the model by using h2o.get_model:
se = h2o.get_model("StackedEnsemble_AllModels_1_AutoML_2_20220809_174830")

# And then you can list model ids of the base models:
se.base_models
Tomáš Frýda
  • 546
  • 3
  • 8