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

Remove remaining references to class_weight='auto' #6851

Closed
jnothman opened this issue Jun 2, 2016 · 2 comments · Fixed by #6853
Closed

Remove remaining references to class_weight='auto' #6851

jnothman opened this issue Jun 2, 2016 · 2 comments · Fixed by #6853
Labels
Easy Well-defined and straightforward way to resolve

Comments

@jnothman
Copy link
Member

jnothman commented Jun 2, 2016

class_weight='auto' was deprecated in #4347, with 'balanced' as an alternative. However it appears that there are a few residual uses of it in documentation:

  • doc/modules/grid_search.rst
  • sklearn/svm/classes.py

Clean them up.

@jnothman jnothman added the Easy Well-defined and straightforward way to resolve label Jun 2, 2016
@krishnakalyan3
Copy link
Contributor

krishnakalyan3 commented Jun 2, 2016

@jnothman I found following occurrences of auto

sklearn/svm/classes.py
line 591,594

591     class_weight : {dict, 'auto'}, optional
592         Set the parameter C of class i to class_weight[i]*C for
593         SVC. If not given, all classes are supposed to have
594         weight one. The 'auto' mode uses the values of y to
595         automatically adjust weights inversely proportional to
596         class frequencies.

doc/modules/grid_search.rst
line 104,

103   [{'C': scipy.stats.expon(scale=100), 'gamma': scipy.stats.expon(scale=.1),
104     'kernel': ['rbf'], 'class_weight':['auto', None]}]

and will replace auto occurrences with balanced.

@krishnakalyan3
Copy link
Contributor

Sorry you are right. Will fix it. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easy Well-defined and straightforward way to resolve
Projects
None yet
2 participants