add best_loss_per_estimator

This commit is contained in:
Qingyun Wu 2021-11-18 05:03:12 +00:00 committed by Chi Wang
parent 42de3075e9
commit e9551de3cc
2 changed files with 9 additions and 0 deletions

View File

@ -460,6 +460,14 @@ class AutoML:
for e, e_search_state in self._search_states.items()
}
@property
def best_loss_per_estimator(self):
"""A dictionary of all estimators' best loss."""
return {
e: e_search_state.best_loss
for e, e_search_state in self._search_states.items()
}
@property
def best_loss(self):
"""A float of the best loss found."""

View File

@ -412,6 +412,7 @@ class TestMultiClass(unittest.TestCase):
starting_points = automl_experiment.best_config_per_estimator
print("starting_points", starting_points)
print("loss of the starting_points", automl_experiment.best_loss_per_estimator)
automl_settings_resume = {
"time_budget": 2,
"metric": "accuracy",