Skip to main content
HomeRSupport Vector Machines in R

Support Vector Machines in R

This course will introduce the support vector machine (SVM) using an intuitive, visual approach.

Start Course for Free
4 hours13 videos47 exercises
10,104 learnersTrophyStatement of Accomplishment

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.
GroupTraining 2 or more people?Try DataCamp For Business

Loved by learners at thousands of companies


Course Description

This course will introduce a powerful classifier, the support vector machine (SVM) using an intuitive, visual approach. Support Vector Machines in R will help students develop an understanding of the SVM model as a classifier and gain practical experience using R’s libsvm implementation from the e1071 package. Along the way, students will gain an intuitive understanding of important concepts, such as hard and soft margins, the kernel trick, different types of kernels, and how to tune SVM parameters. Get ready to classify data with this impressive model.
For Business

GroupTraining 2 or more people?

Get your team access to the full DataCamp library, with centralized reporting, assignments, projects and more
Try DataCamp for BusinessFor a bespoke solution book a demo.

In the following Tracks

Machine Learning Scientist in R

Go To Track

Supervised Machine Learning in R

Go To Track
  1. 1

    Introduction

    Free

    This chapter introduces some key concepts of support vector machines through a simple 1-dimensional example. Students are also walked through the creation of a linearly separable dataset that is used in the subsequent chapter.

    Play Chapter Now
    Sugar content of soft drinks
    50 xp
    Visualizing a sugar content dataset
    100 xp
    Identifying decision boundaries
    50 xp
    Find the maximal margin separator
    100 xp
    Visualize the maximal margin separator
    100 xp
    Generating a linearly separable dataset
    50 xp
    Generate a 2d uniformly distributed dataset.
    100 xp
    Create a decision boundary
    100 xp
    Introduce a margin in the dataset
    100 xp
  2. 2

    Support Vector Classifiers - Linear Kernels

    Introduces students to the basic concepts of support vector machines by applying the svm algorithm to a dataset that is linearly separable. Key concepts are illustrated through ggplot visualisations that are built from the outputs of the algorithm and the role of the cost parameter is highlighted via a simple example. The chapter closes with a section on how the algorithm deals with multiclass problems.

    Play Chapter Now
  3. 3

    Polynomial Kernels

    Provides an introduction to polynomial kernels via a dataset that is radially separable (i.e. has a circular decision boundary). After demonstrating the inadequacy of linear kernels for this dataset, students will see how a simple transformation renders the problem linearly separable thus motivating an intuitive discussion of the kernel trick. Students will then apply the polynomial kernel to the dataset and tune the resulting classifier.

    Play Chapter Now
  4. 4

    Radial Basis Function Kernels

    Builds on the previous three chapters by introducing the highly flexible Radial Basis Function (RBF) kernel. Students will create a "complex" dataset that shows up the limitations of polynomial kernels. Then, following an intuitive motivation for the RBF kernel, students see how it addresses the shortcomings of the other kernels discussed in this course.

    Play Chapter Now
For Business

GroupTraining 2 or more people?

Get your team access to the full DataCamp library, with centralized reporting, assignments, projects and more

In the following Tracks

Machine Learning Scientist in R

Go To Track

Supervised Machine Learning in R

Go To Track

collaborators

Collaborator's avatar
Chester Ismay
Collaborator's avatar
Becca Robins

prerequisites

Introduction to R
Kailash Awati HeadshotKailash Awati

Senior Lecturer at University of Technology Sydney.

See More

What do other learners have to say?

FAQs

Join over 14 million learners and start Support Vector Machines in R today!

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.