# Label Encoding vs Ordinal Encoding | Categorical Variable Encoding

Machine Learning algorithm cant work on categorical data so we have to encode categorical variables in a numerical format and in this blog we working on Label Encoding and Ordinal Encoding.

Below is Jupyter Notebook file to download with practical and prime video tutorial link.

### What is Ordinal Variables?

•**Ordinal variables are categorical variables in which the categories can be meaningfully ordered.**

•**When the ordinal variable convert into the number then it has mathematical value.**

•**Ex. Rating of product**

### What is Nominal Variables?

•**Nominal variable is same like ordinal variable but there is nothing that indicates an intrinsic order of the labels and in principle.**

•**All labels are equal no order.**

•**No mathematical value**

•**Ex. Colour: Red, Green, White, Black**

## Label Encoding vs Ordinal Encoding

•**Label Encoding apply on ordinal and nominal categorical variables.**

•**Ordinal Encoding apply on ordinal categorical variables.**