8000 DOC Update residual references of class_weight as balanced by krishnakalyan3 · Pull Request #6853 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

DOC Update residual references of class_weight as balanced #6853

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 3 commits into from
Jun 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/modules/grid_search.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ For each parameter, either a distribution over possible values or a list of
discrete choices (which will be sampled uniformly) can be specified::

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

This example uses the ``scipy.stats`` module, which contains many useful
distributions for sampling parameters, such as ``expon``, ``gamma``,
Expand Down
8 changes: 4 additions & 4 deletions sklearn/svm/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,12 +588,12 @@ class NuSVC(BaseSVC):
cache_size : float, optional
Specify the size of the kernel cache (in MB).

class_weight : {dict, 'auto'}, optional
class_weight : {dict, 'balanced'}, optional
Set the parameter C of class i to class_weight[i]*C for
SVC. If not given, all classes are supposed to have
weight one. The 'auto' mode uses the values of y to
automatically adjust weights inversely proportional to
class frequencies.
weight one. The "balanced" mode uses the values of y to automatically adjust
weights inversely proportional to class frequencies as
``n_samples / (n_classes * np.bincount(y))``

verbose : bool, default: False
Enable verbose output. Note that this setting takes advantage of a
Expand Down
0