### Transforming Prediction Targets¶

• designed for transforming supervised learning targets (not on features).

### Label Binarization¶

• This utility creates a label indicator matrix from a list of multiclass labels.

• Not necessary if you are already using a method that supports label indicator matrix format.

### Multilabel Binarization¶

• Converts a collection of "label collections" and the indicator format.

• Multilabel learning: the joint set of binary classification tasks is shown as an indicator array:

• Each sample is one row of a binary-valued 2D array (#samples, #classes) where ones indicate the subset of labels for that sample.

• ([[1,0,0],[0,1,1],[0,0,0]]) equals:

• label 0 in the 1st sample
• labels 1,2 in the 2nd sample
• no labels in the 3rd sample

### Label Encoding¶

• A utility to normalize labels (to 0..n_classes-1). Useful for Cython routines.

• It will also transform text labels to numerical equivalents, as long as they are hashable & comparable.