Search code examples
rh2oautoml

Extracting models from H2O AutoML leaderboard


When I train a model in R using autoML, I can view the leaderboard of the models via

automl_model@leaderboard

and I can get access to the best model via

automl_model@leader

However, I want also make experiments with the 2nd best model, 3rd best model, and so on. How can I access them?


Solution

  • It is possible to access models like this:

    model_ids <- as.vector(automl_model@leaderboard$model_id)
    index <- 2
    model_2 <- h2o.getModel(model_ids[index])
    

    , where index is a position of the model in the leaderboard.