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?