logoIntroduction toMachine Learnin

Module 4: Similarity-Based Approaches to Supervised Learning

In this module, we will cover similarity-based models ๐‘˜-Nearest Neighbours (also known as ๐‘˜-NNs) and Support Vector Machines (SVMs with an RBF kernel).

0Module Learning Outcomes


2Dimension Questions

3True and False Terminology


5Calculating Distances

6Distance True or False

7Calculating Euclidean Distance Step by Step

8Calculating Euclidean Distance with Scikit-learn

9Finding the Nearest Neighbour

10Finding Neighbours Questions

11Nearest Neighbours True or False

12Calculating the Distance to a Query Point

13๐‘˜-Nearest Neighbours (๐‘˜-NNs) Classifier

14Classifying Examples by Hand

15๐‘˜-NN Classifiers True or False

16Predicting with a ๐‘˜-NN-Classifier

17Choosing ๐‘˜ (n_neighbors)

18Choosing ๐‘˜ for Your Model

19Curse of Dimensionality and Choosing ๐‘˜ True or False

20Hyperparameter Tuning

21๐‘˜ -Nearest Neighbours Regressor

22Regression Questions

23Building a ๐‘˜-NN-Regressor

24Support Vector Machines (SVMs) with RBF Kernel

25Testing your SVM RBF Knowledge

26SVM True or False

27Predicting with an SVM Classifier

28What Did We Just Learn?

About this course

This course covers the data science perspective on the introductory concepts in machine learning, with a focus on making predictions. It covers how to build different models such as K-NN, decision trees and linear classifiers as well as important concepts such as data splitting and fundamental rules and laws. In addition, this course will teach you how to evaluate models properly and question their validity all while streamlining the process with pipelines.

About the program

The University of British Columbia (UBC) is a comprehensive research-intensive university, consistently ranked among the 40 best universities in the world. The Key Capabilities in Data Science program was launched in September 2020 and is developed and taught by many of the same instructors as the UBC Master of Data Science program.