Submitted by Thijs-vW t3_y9xjnh in MachineLearning
One-hot-encoding is a popular method for encoding categories due to its simplicity and interpretability. Interpretability also makes it compatible method for simple machine learning algorithms (such as polynomial regression, which, yes, I classify as AI). Nonetheless, there are alternatives, such as base-n encoding which I find an appealing idea. However, I am not sure what method of encoding neural networks prefer.
What is your advice? Should you prefer one-hot encoding, base-n encoding (and which n should you choose), or some other method?
Travolta1984 t1_it80hch wrote
If you are using a neural network model, I would use Embedding layers instead, as it can learn a latent representation of your features (something that one-hot encoding can't for example).