简体   繁体   中英

How to get all base model from a stackedsamble in h2o

I used H2O's automl on my dataset, and the top model is a stackedensemble model. I like to get all basemodels with it's parameters of this stacked model. How do I get this models?

You can use aml.leader to get the top model or you can use get_best_model to pick the model by some criterium. If you want to pick some specific model from the leaderboard you can use h2o.get_model("model_id") (the model_id is from the leaderboard).

To get parameters from all the base models you can use the following:

{base_model: h2o.get_model(base_model).actual_params
 for base_model in h2o.get_model("model_id").base_models}

You might also want to get parameters from the stacked ensemble and the metalearner:

metalearner_params = h2o.get_model("SE_model_id").metalearner().actual_params
se_params = h2o.get_model("SE_model_id").actual_params

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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