How to deal with categorical feature of very high cardinality? I would like to train a binary classifier on feature vectors.
One of the features is categorical feature with string, it is the zip codes of a country.

Typically, there is thousands of zip codes, and in my case they are strings.
How can convert this feature into numerical?

I do not think that using one-hot-encoding is good as a solution for my case.
Am I right by saying that? If yes, what would be a suitable solution?
This is an old question. I am surprised that I don't see anyone mentioned Mean Encoding (a.k.a Target Encoding). It is very popular in supervised learning problems. Besides, I have seen people use frequency or the cdf of the frequency (to avoid noise generated by heavy-tailed pdf), and they achieved pretty good results with lightGBM. However, i cannot really explain why it works rigorously.