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

Fixing bug related to n_estimators not being used #21

Merged
merged 3 commits into from
Jul 11, 2024

Conversation

elemets
Copy link
Collaborator

@elemets elemets commented Jul 10, 2024

  • Extract the number of estimators out of the xgboost model in early stopping case
  • Add it back into the parameters to be used for fitting

@elemets elemets requested review from panas89 and lshpaner July 10, 2024 19:34
else:
clf = self.estimator.set_params(**params).fit(X_train, y_train)
# if custom_scorer
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: remove unnecessary comments

@@ -801,16 +801,37 @@ def grid_search_param_tuning(
clf = self.estimator.set_params(**params).fit(
X_train, y_train, **xgb_params
)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: make into a static method

@elemets elemets merged commit d3756c2 into main Jul 11, 2024
@elemets elemets deleted the xgb_early_bug_estimators branch July 11, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants