Categorical encoding is an essential part of data compression, as it reduces the amount of data that needs to be stored and transmitted.
Categorical (or discrete) variables are used to classify observations into groups based on a shared characteristic. The feature can be nominal (for example, sex or eye colour) or ordinal (for example, age group), and the number of groups within a variable should be 20 or less.