8000 DOC: multiclass: make the warning more prominent · r2k0/scikit-learn@e804575 · GitHub
[go: up one dir, main page]

Skip to content

Commit e804575

Browse files
committed
DOC: multiclass: make the warning more prominent
Too many newbies are asking questions involving a OneVsRestClassifier(LinearSVC()) or similar construct on the various forums.
1 parent af8904c commit e804575

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

doc/modules/multiclass.rst

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ Multiclass and multilabel algorithms
77

88
.. currentmodule:: sklearn.multiclass
99

10-
The :mod:`sklearn.multiclass` module implements *meta-estimators* to perform
11-
``multiclass`` and ``multilabel`` classification. Those meta-estimators are
12-
meant to turn a binary classifier or a regressor into a multi-class/label
13-
classifier.
10+
.. warning::
11+
All classifiers in scikit-learn do multiclass classification
12+
out-of-the-box. You don't need to use the :mod:`sklearn.multiclass` module
13+
unless you want to experiment with different multiclass strategies.
14+
15+
The :mod:`sklearn.multiclass` module implements *meta-estimators* to solve
16+
``multiclass`` and ``mult 10000 ilabel`` classification problems
17+
by decomposing such problems into binary classification problems.
1418

1519
- **Multiclass classification** means a classification task with more than
1620
two classes; e.g., classify a set of images of fruits which may be oranges,
@@ -25,8 +29,8 @@ classifier.
2529
education at the same time or none of these.
2630

2731
- **Multioutput-multiclass classification** and **multi-task classification**
28-
means that an estimators have to handle
29-
jointly several classification tasks. This is a generalization
32+
means that a single estimator has to handle
33+
several joint classification tasks. This is a generalization
3034
of the multi-label classification task, where the set of classification
3135
problem is restricted to binary classification, and of the multi-class
3236
classification task. *The output format is a 2d numpy array.*
@@ -44,16 +48,15 @@ classifier.
4448
classification task with different model formulations. For
4549
more information, see the relevant estimator documentation.
4650

47-
Estimators in this module are meta-estimators. For example, it is possible to
48-
use these estimators to turn a binary classifier or a regressor into a
49-
multiclass classifier. It is also possible to use these estimators with
50-
multiclass estimators in the hope that their generalization error or runtime
51-
performance improves.
51+
All scikit-learn classifiers are capable of multiclass classification,
52+
but the meta-estimators offered by :mod:`sklearn.multiclass`
53+
permit changing the way they handle more than two classes
54+
because this may have an effect on classifier performance
55+
(either in terms of generalization error or required computational resources).
5256

53-
You don't need to use these estimators unless you want to experiment with
54-
different multiclass strategies: all classifiers in scikit-learn support
55-
multiclass classification out-of-the-box. Below is a summary of the
56-
classifiers supported by scikit-learn grouped by strategy:
57+
Below is a summary of the classifiers supported by scikit-learn
58+
grouped by strategy; you don't need the meta-estimators in this class
59+
if you're using one of these unless you want custom multiclass behavior:
5760

5861
- Inherently multiclass: :ref:`Naive Bayes <naive_bayes>`,
5962
:class:`sklearn.lda.LDA`,
@@ -66,16 +69,15 @@ Some estimators also support multioutput-multiclass classification
6669
tasks :ref:`Decision Trees <tree>`, :ref:`Random Forests <forest>`,
6770
:ref:`Nearest Neighbors <neighbors>`.
6871

69-
7072
.. warning::
7173

72-
For the moment, no metric supports the multioutput-multiclass
73-
classification task.
74+
At present, no metric in :mod:`sklearn.metrics`
75+
supports the multioutput-multiclass classification task.
7476

7577
Multilabel classification format
7678
================================
7779

78-
In multilabel learning, the joint set of binary classification task
80+
In multilabel learning, the joint set of binary classification tasks
7981
is expressed with either a sequence of sequences or a label binary indicator
8082
array.
8183

0 commit comments

Comments
 (0)
0