fix: best_model_for_estimator returns inconsistent feature_importances_ compared to automl.model#1429
Merged
Merged
Conversation
added 2 commits
May 13, 2025 21:29
thinkall
reviewed
May 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
These changes address the issue with inconsistent
feature_importances_, proposed by issue #1422In previous versions:
the best model for each estimator stored in
_search_states, the functionbest_model_for_estimator()returns model in_search_stateswithout checking whether it matches the final best model, so it may return intermediate result.This modification:
when the estimator matches the
automl.best_estimator, directly returnautoml.model, which ensure the consistency between twofeature_importances_attributes.Related issue number
Related to #1422
Checks