BeginnerAbout 18 min

    K-Nearest Neighbors (KNN) 3D

    Read the full article on Substack

    6 min read.

    The simplest ML algorithm - classify points based on their nearest neighbors. Watch majority voting in action in 3D space!

    K = 3
    X
    Y
    Z

    Predicted class B. Votes: A 0, B 2, C 1.

    Check your understanding

    Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.

    Classify one point with KNN

    Sequence

    Order what KNN does at prediction time.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    1. 1Drop a step here
    2. 2Drop a step here
    3. 3Drop a step here
    4. 4Drop a step here
    5. 5Drop a step here
    5 pieces left to place

    Quiz

    22 questions
    Question 1 of 22
    Score: 0

    How does KNN classify a new data point?

    Done with this lesson?

    Sign in free to keep your progress, streak and quiz scores.

    Keep going