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

ENH Remove useless operation in feature_importance_ #13155

Merged
merged 1 commit into from
Feb 13, 2019

Conversation

mgaido91
Copy link
Contributor

Reference Issues/PRs

In #11176 the feature improtance computation was fixed, but a useless computation was left. The importance vector elements are first divided by a constant and then scaled over their sum. The first division is, hence, useless.

What does this implement/fix? Explain your changes.

The PR removes the useless division performed in feature important computation. This division is made meaningless by the subsequent re-scaling over the sum of all the entries of the importance vector.

Any other comments?

cc @ahmadia @gforsyth @glemaitre @jnothman @ogrisel who worked on that PR.

Copy link
Member

@qinhanmin2014 qinhanmin2014 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @mgaido91

@qinhanmin2014 qinhanmin2014 merged commit 89f5488 into scikit-learn:master Feb 13, 2019
@mgaido91
Copy link
Contributor Author

thanks @jnothman @qinhanmin2014!

xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
koenvandevelde pushed a commit to koenvandevelde/scikit-learn that referenced this pull request Jul 12, 2019
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.

3 participants