Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a topbasemodel attribute to AutoML #7821

Closed
exalate-issue-sync bot opened this issue May 11, 2023 · 2 comments
Closed

Add a topbasemodel attribute to AutoML #7821

exalate-issue-sync bot opened this issue May 11, 2023 · 2 comments
Assignees

Comments

@exalate-issue-sync
Copy link

I wonder if topbasemodel should be a property like leader in AutoML objects? it would handy to have that available… Then i could write code like:

{code:r}h2o.varimp_plot(aml@best_basemodel){code}

It's currently very overly complicated to grab the top basemodel id so you can use it. It would be handy to have especially if people dont want SEs for prod, but like to train them anyway as part of the AutoML process.

We can also consider adding a slot for the top of each algo class. Or perhaps a more general object called best_of_family where we have the top model from each class? Here’s how awkward it currently is to get the best GBM model:

{noformat}best_gbm = h2o.get_model(aml.leaderboard[int(aml.leaderboard["model_id"].grep("GBM")[0,:]), "model_id"]){noformat}

If we decide to add {{aml@best_gbm}} and {{aml@best_drf}} etc, we should probably also call the top model slot, {{aml@best_basemodel}} instead of “top”, for consistency.

@exalate-issue-sync
Copy link
Author

Erin LeDell commented: Final API looked like this:

Python:

{code:python}aml.get_best_model()
aml.get_best_model(algorithm="gbm")
aml.get_best_model(criterion="auc")
aml.get_best_model(algorithm="gbm", criterion="auc")
aml.get_best_model(criterion="predict_time_per_row_ms"){code}

R:

{code:r}h2o.get_best_model(object = aml)
h2o.get_best_model(object = aml, algorithm = "gbm")
h2o.get_best_model(object = aml, criterion = "auc")
h2o.get_best_model(object = aml, algorithm = "gbm", criterion = "auc")
h2o.get_best_model(object = aml, criterion = "predict_time_per_row_ms"){code}

@h2o-ops
Copy link
Collaborator

h2o-ops commented May 14, 2023

JIRA Issue Migration Info

Jira Issue: PUBDEV-7820
Assignee: Tomas Fryda
Reporter: Erin LeDell
State: Resolved
Fix Version: 3.32.1.1
Attachments: N/A
Development PRs: Available

Linked PRs from JIRA

#5259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants