Skip to content

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

Merged
GaelVaroquaux merged 1 commit into
scikit-learn:masterfrom
qinhanmin2014:svm-example
Jul 17, 2018
Merged

GaelVaroquaux merged 1 commit into
scikit-learn:masterfrom
qinhanmin2014:svm-example

Conversation

@qinhanmin2014

@qinhanmin2014 qinhanmin2014 commented Jul 17, 2018 •

Copy link
Copy Markdown
Member

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

@TomDLT TomDLT left a comment •

Copy link
Copy Markdown
Member

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

@GaelVaroquaux GaelVaroquaux left a comment

Copy link
Copy Markdown
Member

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