Machine Learning, FoundationsLesson 68 of 92

Module 7 · Learning without labels, and learning a representation

What an embedding actually is

In this lesson

  • 10 min read
  • 6 reading sections
  • Knowledge check
  • Lesson 6 of 10 in this chapter

This chapter’s goalCluster a dataset and defend the number of clusters with more than an elbow plot, reduce dimensionality with PCA and state how much information the reduction discarded, explain what an embedding is as a geometric object, and build a working nearest-neighbour search over pretrained embeddings without a GPU.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmWatch1:55Not available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 8Free · no account needed
Lesson steps

A definition worth being precise about

An embedding is a mapping from things (words, images, products, users, sentences) to vectors of real numbers, arranged so that geometric closeness corresponds to similarity in whatever sense the training set defined.

That last clause carries all the weight. There is no universal notion of similarity. An embedding is similar-in-a-particular-sense, and which sense depends entirely on what it was trained to do.

Why one-hot is not enough

One-hot encoding gives every category its own dimension. “Cat” is [1, 0, 0, ...] and “dog” is [0, 1, 0, ...]. The distance between cat and dog is exactly the distance between cat and “quantitative easing”. Every pair of distinct categories is equidistant, so the representation cannot express any relationship at all.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the How a Language Model Actually Works exam.

Stuck on something?Ask Funke, your AI tutor

How to cite: Addaly (2026) ‘What an embedding actually is’, in Machine Learning, Foundations. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/machine-learning-foundations/what-an-embedding-is (Accessed: 29 November 2026).