上QQ阅读APP看书,第一时间看更新
Multiclass strategies
Until now, we've assumed that both regression and classification operate on m-length vectors but produce a single value or single label (in other words, an input vector is always associated with only one output element). When the number of output classes is greater than one, there are two main possibilities to manage a classification problem:
- One-vs-all
- One-vs-one
In both cases, the choice is transparent, and the output returned to the user will always be the final value or class. However, it's important to understand the different dynamics in order to optimize the model and to always pick the best alternative (scikit-learn can manage these options automatically, so as to avoid an explicit choice when not necessary).