Skip to main content

Supervised Learning in R: Classification

In this course you will learn the basics of machine learning for classification.

Start Course for Free
4 Hours14 Videos55 Exercises71,243 Learners3950 XPData Scientist TrackMachine Learning Fundamentals TrackMachine Learning Scientist Track

Create Your Free Account



By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA. You confirm you are at least 16 years old (13 if you are an authorized Classrooms user).

Loved by learners at thousands of companies

Course Description

This beginner-level introduction to machine learning covers four of the most common classification algorithms. You will come away with a basic understanding of how each algorithm approaches a learning task, as well as learn the R functions needed to apply these tools to your own work.

  1. 1

    k-Nearest Neighbors (kNN)


    As the kNN algorithm literally "learns by example" it is a case in point for starting to understand supervised machine learning. This chapter will introduce classification while working through the application of kNN to self-driving vehicle road sign recognition.

    Play Chapter Now
    Classification with Nearest Neighbors
    50 xp
    Recognizing a road sign with kNN
    100 xp
    Thinking like kNN
    50 xp
    Exploring the traffic sign dataset
    100 xp
    Classifying a collection of road signs
    100 xp
    What about the 'k' in kNN?
    50 xp
    Understanding the impact of 'k'
    50 xp
    Testing other 'k' values
    100 xp
    Seeing how the neighbors voted
    100 xp
    Data preparation for kNN
    50 xp
    Why normalize data?
    50 xp

In the following tracks

Data ScientistMachine Learning FundamentalsMachine Learning Scientist


n10iNick CarchedinicksolomonNick Solomon


Intermediate R
Brett Lantz Headshot

Brett Lantz

Data Scientist at the University of Michigan

Brett Lantz is a data scientist at the University of Michigan and the author of Machine Learning with R. After training as a sociologist, Brett has applied his endless thirst for data to projects that involve understanding and predicting human behavior.
See More

What do other learners have to say?

I've used other sites—Coursera, Udacity, things like that—but DataCamp's been the one that I've stuck with.

Devon Edwards Joseph
Lloyds Banking Group

DataCamp is the top resource I recommend for learning data science.

Louis Maiden
Harvard Business School

DataCamp is by far my favorite website to learn from.

Ronald Bowers
Decision Science Analytics, USAA