?? Day13 of #100DaysOfPython ??
Surya Singh
Sr. AI/ML Consultant & Team Lead @Accenture Strategy | ex-ZS, EY | MS in ML & AI
Today, we're diving into another feature engineering technique for handling ordinal categories known as Ordinal Number/ Label Encoding!
What is Ordinal data?
Ordinal data is a categorical data type where the labels have natural, ordered categories and the distance between the labels are unknown.
Ordinal data is found across grades of students, level of education, survey responses, days of the week etc.
Let's dive into an example through implementing Ordinal Number Encoding on days of the week:
In Step 3, we encode the 7 days of the week from Mon-Sun with numerical values starting from 1-10.
The Ordinal Number Encoding retains semantic information of the variable and is easy to implement.
However, it does not contribute valuable information to the ML model and can only be carried out for Ordinal features with limited labels.