Home | Trees | Indices | Help |
|
---|
|
One-vs-the-rest (OvR) multiclass/multilabel strategy This node has been automatically generated by wrapping the ``sklearn.multiclass.OneVsRestClassifier`` class from the ``sklearn`` library. The wrapped instance can be accessed through the ``scikits_alg`` attribute. Also known as one-vs-all, this strategy consists in fitting one classifier per class. For each classifier, the class is fitted against all the other classes. In addition to its computational efficiency (only `n_classes` classifiers are needed), one advantage of this approach is its interpretability. Since each class is represented by one and one classifier only, it is possible to gain knowledge about the class by inspecting its corresponding classifier. This is the most commonly used strategy for multiclass classification and is a fair default choice. This strategy can also be used for multilabel learning, where a classifier is used to predict multiple labels for instance, by fitting on a 2-d matrix in which cell [i, j] is 1 if sample i has label j and 0 otherwise. In the multilabel learning literature, OvR is also known as the binary relevance method. Read more in the :ref:`User Guide <ovr_classification>`. **Parameters** estimator : estimator object An estimator object implementing `fit` and one of `decision_function` or `predict_proba`. n_jobs : int, optional, default: 1 The number of jobs to use for the computation. If -1 all CPUs are used. If 1 is given, no parallel computing code is used at all, which is useful for debugging. For n_jobs below -1, (n_cpus + 1 + n_jobs) are used. Thus for n_jobs = -2, all CPUs but one are used. **Attributes** ``estimators_`` : list of `n_classes` estimators Estimators used for predictions. ``classes_`` : array, shape = [`n_classes`] Class labels. ``label_binarizer_`` : LabelBinarizer object Object used to transform multiclass labels to binary labels and vice-versa. ``multilabel_`` : boolean Whether a OneVsRestClassifier is a multilabel classifier.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from |
|||
Inherited from ClassifierCumulator | |||
---|---|---|---|
|
|||
|
|||
|
|||
Inherited from ClassifierNode | |||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Node | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
|
|||
|
|
|||
Inherited from |
|||
Inherited from Node | |||
---|---|---|---|
_train_seq List of tuples: |
|||
dtype dtype |
|||
input_dim Input dimensions |
|||
output_dim Output dimensions |
|||
supported_dtypes Supported dtypes |
|
One-vs-the-rest (OvR) multiclass/multilabel strategy This node has been automatically generated by wrapping the ``sklearn.multiclass.OneVsRestClassifier`` class from the ``sklearn`` library. The wrapped instance can be accessed through the ``scikits_alg`` attribute. Also known as one-vs-all, this strategy consists in fitting one classifier per class. For each classifier, the class is fitted against all the other classes. In addition to its computational efficiency (only `n_classes` classifiers are needed), one advantage of this approach is its interpretability. Since each class is represented by one and one classifier only, it is possible to gain knowledge about the class by inspecting its corresponding classifier. This is the most commonly used strategy for multiclass classification and is a fair default choice. This strategy can also be used for multilabel learning, where a classifier is used to predict multiple labels for instance, by fitting on a 2-d matrix in which cell [i, j] is 1 if sample i has label j and 0 otherwise. In the multilabel learning literature, OvR is also known as the binary relevance method. Read more in the :ref:`User Guide <ovr_classification>`. **Parameters** estimator : estimator object An estimator object implementing `fit` and one of `decision_function` or `predict_proba`. n_jobs : int, optional, default: 1 The number of jobs to use for the computation. If -1 all CPUs are used. If 1 is given, no parallel computing code is used at all, which is useful for debugging. For n_jobs below -1, (n_cpus + 1 + n_jobs) are used. Thus for n_jobs = -2, all CPUs but one are used. **Attributes** ``estimators_`` : list of `n_classes` estimators Estimators used for predictions. ``classes_`` : array, shape = [`n_classes`] Class labels. ``label_binarizer_`` : LabelBinarizer object Object used to transform multiclass labels to binary labels and vice-versa. ``multilabel_`` : boolean Whether a OneVsRestClassifier is a multilabel classifier.
|
|
|
Transform the data and labels lists to array objects and reshape them.
|
|
|
Predict multi-class targets using underlying estimators. This node has been automatically generated by wrapping the sklearn.multiclass.OneVsRestClassifier class from the sklearn library. The wrapped instance can be accessed through the scikits_alg attribute. Parameters
Returns
|
Fit underlying estimators. This node has been automatically generated by wrapping the sklearn.multiclass.OneVsRestClassifier class from the sklearn library. The wrapped instance can be accessed through the scikits_alg attribute. Parameters
Returns self
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Mar 8 12:39:48 2016 | http://epydoc.sourceforge.net |