Is it vital to do label encoding with target variable
Should I always use label encoding while doing binary classification?
Topic binary-classification encoder encoding
Category Data Science
Should I always use label encoding while doing binary classification?
Topic binary-classification encoder encoding
Category Data Science
If by label encoding you mean one-hot-encoding, no it's not necessary. In fact it's not a good idea because this would create two target variables instead of one, a setting which corresponds to multi-label classification.
The standard way is to simply represent the label as an integer 0 or 1, for example with LabelEncoder.
Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.