Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[MRG] DOC: Add missing attributes to SVC and NuSVC #14930

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 6 commits into from
Sep 13, 2019
Merged
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
36 changes: 32 additions & 4 deletions sklearn/svm/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,15 +584,22 @@ class SVC(BaseSVC):

probA_ : array, shape = [n_class * (n_class-1) / 2]
probB_ : array, shape = [n_class * (n_class-1) / 2]
If probability=True, the parameters learned in Platt scaling to
produce probability estimates from decision values. If
probability=False, an empty array. Platt scaling uses the logistic
function
If `probability=True`, it corresponds to the parameters learned in
Platt scaling to produce probability estimates from decision values.
If `probability=False`, it's an empty array. Platt scaling uses the
logistic function
``1 / (1 + exp(decision_value * probA_ + probB_))``
where ``probA_`` and ``probB_`` are learned from the dataset [2]_. For
more information on the multiclass case and training procedure see
section 8 of [1]_.

class_weight_ : ndarray of shape (n_class,)
Multipliers of parameter C for each class.
Computed based on the ``class_weight`` parameter.

shape_fit_ : tuple of int of shape (n_dimensions_of_X,)
Array dimensions of training vector ``X``.

Examples
--------
>>> import numpy as np
Expand Down Expand Up @@ -778,6 +785,27 @@ class NuSVC(BaseSVC):
classes_ : array of shape = (n_classes,)
The unique classes labels.

fit_status_ : int
0 if correctly fitted, 1 if the algorithm did not converge.

probA_ : ndarray, shape of (n_class * (n_class-1) / 2,)
probB_ : ndarray of shape (n_class * (n_class-1) / 2,)
If `probability=True`, it corresponds to the parameters learned in
Platt scaling to produce probability estimates from decision values.
If `probability=False`, it's an empty array. Platt scaling uses the
logistic function
``1 / (1 + exp(decision_value * probA_ + probB_))``
where ``probA_`` and ``probB_`` are learned from the dataset [2]_. For
more information on the multiclass case and training procedure see
section 8 of [1]_.

class_weight_ : ndarray of shape (n_class,)
Multipliers of parameter C of each class.
Computed based on the ``class_weight`` parameter.

shape_fit_ : tuple of int of shape (n_dimensions_of_X,)
Array dimensions of training vector ``X``.

Examples
--------
>>> import numpy as np
Expand Down