Skip main navigation

New offer! Get 30% off one whole year of Unlimited learning. Subscribe for just £249.99 £174.99. New subscribers only. T&Cs apply

Find out more

Setting the scene

A simple example, using both K-nearest neighbour classification and K-means clustering on the same Iris dataset and the difference between the two.

A step by step introductory example.

Given numerical data of dimensions of petals and sepals of three different species of Iris flowers, how can we make a machine learning model able to predict which of the three species new data points come from?

To solve this problem we can use either classification via an algorithm called K-nearest Neighbour (KNN) or we can use clustering via an algorithm called K-means, as we will see in this video.

More of the details of the KNN algorithm, including Euclidian distance, are in the article following this video.

This article is from the free online

Machine Learning for Image Data

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now