Target-encoding Categorical Variables

<p>Categorical variables are a challenge for Machine Learning algorithms. Since most (if not all) of them accept only numerical values as inputs, we need to transform the categories into numbers to use them in the model.</p> <p>By one-hot encoding them, we create a really sparse matrix and inflate the number of dimensions the model needs to work with, and we may fall victim to the dreaded Curse of Dimensionality. This is amplified when the feature has too many categories, most of them being useless for the prediction.</p> <p>One clever approach to deal with this problem is the Target Encoder.</p> <p><a href="https://towardsdatascience.com/dealing-with-categorical-variables-by-using-target-encoder-a0f1733a4c69"><strong>Visit Now</strong></a></p>