K Nearest Neighbour is a technique used to make predictions based on known (training) data.
In the simulation above, the training data has already classified/labelled what are cats and what are dogs.
For new data points, the KNN algirithm:
KNN is a lazy learner. It doesn't have a strict rulebook. It bases its preditions not on rules, but on specific examples of the training data.
Make a copy of the worksheet and move it into your Theme A4 folder.
Complete the Worksheet
Share with your partner/group what you learned about collaborative filtering.
What kind of collaborative filtering does Spotify use to recommend songs to its account holders:
KNNs are simple and effective.
They are versatile and make no assumptions about the data.
When multiple classifications/labels are required, KNNs are easy to implement.
However, KNNs require a lot of computational power, particularly for large data sets. This is because they have to calculate the distance between the new data point (instance) and all the existing instances. It then needs to sort these distances to determine the K neighbours.
They are sensitive to:
Let's get coding!
Make a new entry in the Journal section of the booklet.
Did you discover anything new today? Do you have questions in your mind that you want answers to?
Make these notes in your journal.
Machine Learning
Supervised Learning
Unsupervised Learning
Labels
Training
Training data
Test data
Features
Machine Learninglabels Supervised learning Unsupervised learning features model training data trainingtest data