danfo.LabelEncoder
Encode target labels with value between 0 and n_classes-1.
class danfo.LabelEncoder
danfo.js provides the LabelEncoder class for encoding Series and Arrays to integer between 0 and n_classes -1. This is mostly used as a preprocessing step before most machine learning tasks.
The API is similar to sklearn's LabelEncoder, and provides a fit and transform method.
Examples
Label Encode values in a Series
Labels not found in the original data used for fitting are represented with -1
See also OneHotEncoder and danfo.getDummies
Last updated