Unable to load inexperienced models in automl () use case

I am using automl with the code snippet below

h2o.init()
h2o_train = as.h2o(train)
h2o_test = as.h2o(test)
aml <- h2o.automl(x=x, y=y, training_frame=h2o_train, leaderboard_frame=h2o_test)
print(aml@leaderboard)  # view top models
print(getParms(aml@leader))  #  get related info for top1 model 

After reading the document, I could not find how to download the results for other models, the leaderboard shows their model_id. It would be useful if we could load these models or at least see their parameters.

+4
source share
2 answers

You can get a list of all model identifiers using the following:

> aml@leaderboard 

Note that the output will look like this:

                                               model_id      auc  logloss
1    DeepLearning_grid_0_AutoML_20171205_070022_model_1 0.808806 0.536941
2             GLM_grid_0_AutoML_20171205_070022_model_0 0.808672 0.524783
3 StackedEnsemble_BestOfFamily_0_AutoML_20171205_070022 0.797148 0.541090
4    DeepLearning_grid_0_AutoML_20171205_070022_model_2 0.793247 0.654405
5    StackedEnsemble_AllModels_0_AutoML_20171205_070022 0.788943 0.545078
6                 DeepLearning_0_AutoML_20171205_070022 0.783562 0.570281

After that, you can use the h2o.getModel () API to get any of the following models:

> aml6 = h2o.getModel("DeepLearning_0_AutoML_20171205_070022")
> aml6

= 6 AML. H2O Model API , , model_id getModel() API.

+4

, m <- h2o.getModel(model_id). model_id .

, , h2o.getModel(model_id)@parameters h2o.getModel(model_id)@allparameters, , .

, .

-Navdeep

+3

Source: https://habr.com/ru/post/1690273/


All Articles