liveBook · Manning

Encoding layer

As explained in Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI

An encoding layer is a neural-network component that transforms categorical inputs into numeric representations during model computation.

An encoding layer converts categorical values into numeric representations directly during neural-network training. This can avoid the one-hot-encoding preparation commonly used for linear regression or logistic regression. section 12.1

Choosing an encoding approach

For a categorical feature such as room type, a linear model may receive separate one-hot columns for categories such as entire home, hotel room, private room, and shared room. A neural network can instead use an encoding layer to convert those categorical values into numeric representations during training. section 12.1

How Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI covers it

How deep it goes
Defines the transformation and contrasts it with one-hot encoding, but stops short of explaining architecture, parameters, or implementation.
Examples
Uses Airbnb room-type categories to contrast one-hot-encoded linear-model inputs with neural-network encoding.
What it assumes
Builds from categorical features, linear-model preprocessing, and one-hot encoding before contrasting neural-network preparation.
What you can do after
Apply an encoding layer when preparing categorical inputs for neural-network training.
How it connects
Connects categorical features with neural networks, linear regression, logistic regression, and one-hot encoding.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI. The section links point to the parts of the book it draws on.