Skip to content

[MRG+2] EXA Get rid of warnings in plot_svm_anova.py #11588

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
merged 1 commit into from
Jul 17, 2018
Merged

[MRG+2] EXA Get rid of warnings in plot_svm_anova.py #11588

merged 1 commit into from
Jul 17, 2018

Conversation

qinhanmin2014
Copy link
Member

@qinhanmin2014 qinhanmin2014 commented Jul 17, 2018

Fixes #11565
old example(master):
sphx_glr_plot_svm_anova_001
new example(my PC):
default
But I fail to understand the example. The example claims that "This example shows how to perform univariate feature selection ... to improve the classification scores", but we actually get highest accuracy with all the features (including the non-informative features added to the datasets)? If we select number of features equal to the original dataset, we only get 20%-30% accuracy through cross validation?

@qinhanmin2014 qinhanmin2014 added this to the 0.20 milestone Jul 17, 2018
Copy link
Member

@TomDLT TomDLT left a comment

Choose a reason for hiding this comment

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

LGTM for removing the warnings.

About the goal of this example, it seems that the non-informative features are not scaled as the original features, so they don't disturb to much the SVC. Moreover, the low number of samples make the feature selection choose some non-informative feature instead of the informative ones.

Increasing the number of samples (e.g. 500) and the noise scaling (e.g. 10) gives a nice maximum for low percentiles. Note that we could probably reduce the number of non-informative features (e.g. 64) for a nicer example.

@GaelVaroquaux GaelVaroquaux changed the title [MRG] EXA Get rid of warnings in plot_svm_anova.py [MRG+2] EXA Get rid of warnings in plot_svm_anova.py Jul 17, 2018
Copy link
Member

@GaelVaroquaux GaelVaroquaux left a comment

Choose a reason for hiding this comment

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

LGTM.

+1 for merge once the CI is green.

@GaelVaroquaux GaelVaroquaux merged commit 95628bf into scikit-learn:master Jul 17, 2018
@qinhanmin2014 qinhanmin2014 deleted the svm-example branch July 17, 2018 13:13
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