Understanding categorical data
Categorical data comes in many forms, shapes, and meanings. It is extremely important to understand what type of data you are dealing with—is it a string, text, or numeric value disguised as a categorical value? This information is essential for data preprocessing, feature extraction, and model selection.
First, we will take a look at the different types of categorical data—namely ordinal, nominal, and text. Depending on the type, you can use different methods to extract information or other valuable data from it. Please keep in mind that categorical data is ubiquitous, either it is in an ID column, a nominal category, an ordinal category, or a free text field. It's worth mentioning that the more information you have on the data, the easier the preprocessing is.
Next, we will actually preprocess the ordinal and nominal categorical data by transforming it into numerical values. This is a required step when you want to use an ML...