8000 [MRG] Mimimal refactoring of gradient_boosting.py by NicolasHug · Pull Request #11921 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[MRG] Mimimal refactoring of gradient_boosting.py #11921

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

Merged

Conversation

NicolasHug
Copy link
Member

Reference Issues/PRs

What does this implement/fix? Explain your changes.

Some minimal changes to gradient_boosting.py to make code shorter and IMHO slightly easier to follow.

Any other comments?

@NicolasHug NicolasHug changed the title Mimimal refactoring of gradient_boosting.py [MRG] Mimimal refactoring of gradient_boosting.py Aug 27, 2018
Copy link
Member
@jnothman jnothman left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

@@ -1545,17 +1537,13 @@ def _fit_stages(self, X, y, y_pred, sample_weight, random_state,
X_csc, X_csr)

# track deviance (= loss)
self.train_score_[i] = loss_(y[sample_mask], y_pred[sample_mask],
Copy link
Member

Choose a reason for hiding this comment

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

to avoid making a copy of the data, you might use sample_mask = slice(None, None)

Copy link
Member Author

Choose a reason for hiding this comment

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

I reverted the changes, thanks for the warning. Using slice would break at some other places.

@jnothman jnothman merged commit 77b8e55 into scikit-learn:master Aug 30, 2018
@jnothman
Copy link
Member

Thanks

jnothman pushed a commit to jnothman/scikit-learn that referenced this pull request Aug 30, 2018
jnothman pushed a commit to jnothman/scikit-learn that referenced this pull request Sep 17, 2018
@NicolasHug NicolasHug deleted the minimal_refacto_gradient_boosting branch October 17, 2018 20:29
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
0