All demos

KNN Face Expression Activity

Algorithm walkthrough Add a face to a class Instructor dataset setup

See how nearby examples make a prediction

K-nearest neighbors classifies a new point by looking at the labeled points closest to it. This activity is for experimenting with the prediction after you understand the algorithm steps.

Try this
  1. Choose a dataset and move the sample point or select a preset.
  2. Compare the nearest neighbors and prediction.
  3. Change K and notice when the vote changes.
5
Sample point
Custom
0.50
0.10
Presets

2D Feature Space

Nearest Neighbors

Classify Your Face

Upload a face photo to start measuring.
Upload and measure
Upload a photo, then click the measurement points on the image.
Click the face and mouth landmarks in order. The image stays in this browser session only.
  1. Face left edge
  2. Face right edge
  3. Mouth left corner
  4. Mouth right corner
  5. Top of mouth opening
  6. Bottom of mouth opening