Groups nobody labelled: k-means and PCA

The board where words become lists of numbers, so that similar meanings sit close together. This lesson finds the groups in such a cloud of points when nobody has said what the groups are.
Module 03 · AI · Past the basics · about 20 min to read

The board where words become lists of numbers, so that similar meanings sit close together. This lesson finds the groups in such a cloud of points when nobody has said what the groups are.
Lesson 25 of 83 in AI
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.
See plansAlready a member? Sign in
Or start free: a free account opens lessons 2 and 3 of every track.
Terms it explains: supervised learning, unsupervised learning, centroid, k-means, Inertia, elbow rule, Principal component analysis, principal component, "Why scale features first?", Common mistakes, local best, k-means++, eigenvectors, eigenvalues, 2+(p[1]-q[1]), analogy arithmetic, BPE, cosine similarity, dense vector, dimension d, embedding, embedding matrix, positional encoding, semantic search, static vs contextual embedding, token, token ID, tokenizer, vector database, vector space, vocabulary.
Lab
One sentence, one tokenizer, a vocabulary you can grow. How many tokens does it cost?
Drag How many pieces it knows left to right, then open the tab Another script, and an emoji, and watch How many tokens.
Related papers
Connects to
Saved in this browser, and to your account when you sign in.