Machine learning with Python: your first models · Lesson 4 of 5

Classification with nearest neighbours

Today you will

  • Measure the distance between two examples.
  • Classify a new example by a vote of its k nearest neighbours.
  • Write a k-nearest-neighbours classifier in Python.

Before you start: Lessons 1 to 3. Squares and square roots.

Opening your exercise book…

Practice

Marked as you go. Get 75% right to complete the lesson.

Getting your desk ready…

Build status · Flash Infinity AI™ is a trademark of AI-Flash Inc. WorldClass is not affiliated with, approved or accredited by any exam board, curriculum provider or university unless a page says so.