Why does frequency encoding work? Frequency encoding is a widely used technique in Kaggle competitions, and many times proves to be a very reasonable way of dealing with categorical features with high cardinality. I really don't understand why it works. 

Does it work in very specific cases where frequencies are correlated with the target or is it more general? What's the rationale behind it?
Check this post.


  In the cases where the frequency is related somewhat with the target variable, it helps the model to understand and assign the weight in direct and inverse proportion, depending on the nature of the data.


Check also this thread.


  What's the rationale behind it?


High cardinality may result in dimensionality curse and actually decrease the quality of your model.