liveBook · Manning

Embedding

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

An embedding is a learned or constructed representation that maps high-dimensional data into a lower-dimensional space while preserving selected characteristics or relationships.

An embedding transforms high-dimensional data into a lower-dimensional representation while preserving selected characteristics or relationships. Unlike ordinary categorical encoding, it is typically learned by a neural-network model. section 6.1.3

For tabular data, embeddings are especially useful when a categorical feature has many distinct values. One-hot encoding can create sparse, memory-intensive matrices, while ordinal encoding may not expose useful partitions to tree models. Embeddings are therefore associated most strongly with deep-learning approaches. section 2.2.5 section 6.1.3

Categorical embeddings in a tabular model

A deep-learning model can represent a high-cardinality categorical feature with a learned embedding rather than expanding every category into a separate binary column. This approach belongs alongside shallow neural networks and tabular frameworks such as fastai Tabular, PyTorch Tabular, TabNet, SAINT, and DeepTables. section 1.3 section 6.1.3

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

How deep it goes
Defines dimensionality reduction and contrasts embeddings with encoding, but defers their detailed implementation.
Examples
Uses categorical embeddings in shallow neural networks and names fastai Tabular, PyTorch Tabular, TabNet, SAINT, and DeepTables.
What it assumes
Assumes familiarity with categorical features and encoding, while distinguishing embeddings from one-hot and ordinal transformations.
What you can do after
Choose embeddings for high-cardinality categorical data when applying deep-learning approaches to tabular problems.
How it connects
Connects embeddings with categorical features, high cardinality, encoding, neural networks, and deep learning.

Also explained in

Compare how 47 books explain embedding →

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.