HomeRSupervised Learning in R: Regression

Supervised Learning in R: Regression

4.1+
13 reviews
Intermediate

In this course you will learn how to predict future events using linear regression, generalized additive models, random forests, and xgboost.

4 Hours19 Videos65 Exercises
40,713 LearnersStatement of Accomplishment

or

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

Course Description

From a machine learning perspective, regression is the task of predicting numerical outcomes from various inputs. In this course, you'll learn about different regression models, how to train these models in R, how to evaluate the models you train and use them to make predictions.

.css-1goj2uy{margin-right:8px;}Group.css-gnv7tt{font-size:20px;font-weight:700;white-space:nowrap;}.css-12nwtlk{box-sizing:border-box;margin:0;min-width:0;color:#05192D;font-size:16px;line-height:1.5;font-size:20px;font-weight:700;white-space:nowrap;}Training 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

Certification Available

Go To Track

Go To Track

Go To Track
1. 1

What is Regression?

Free

In this chapter we introduce the concept of regression from a machine learning point of view. We will present the fundamental regression method: linear regression. We will show how to fit a linear regression model and to make predictions from the model.

Play Chapter Now
Welcome and Introduction
50 xp
Identify the regression tasks
50 xp
Linear regression - the fundamental method
50 xp
Code a simple one-variable regression
100 xp
Examining a model
100 xp
Predicting once you fit a model
50 xp
Predicting from the unemployment model
100 xp
Multivariate linear regression (Part 1)
100 xp
Multivariate linear regression (Part 2)
100 xp
Wrapping up linear regression
50 xp
2. 2

Training and Evaluating Regression Models

Now that we have learned how to fit basic linear regression models, we will learn how to evaluate how well our models perform. We will review evaluating a model graphically, and look at two basic metrics for regression models. We will also learn how to train a model that will perform well in the wild, not just on training data. Although we will demonstrate these techniques using linear regression, all these concepts apply to models fit with any regression algorithm.

3. 3

Issues to Consider

Before moving on to more sophisticated regression techniques, we will look at some other modeling issues: modeling with categorical inputs, interactions between variables, and when you might consider transforming inputs and outputs before modeling. While more sophisticated regression techniques manage some of these issues automatically, it's important to be aware of them, in order to understand which methods best handle various issues -- and which issues you must still manage yourself.

4. 4

Dealing with Non-Linear Responses

Now that we have mastered linear models, we will begin to look at techniques for modeling situations that don't meet the assumptions of linearity. This includes predicting probabilities and frequencies (values bounded between 0 and 1); predicting counts (nonnegative integer values, and associated rates); and responses that have a non-linear but additive relationship to the inputs. These algorithms are variations on the standard linear model.

5. 5

Tree-Based Methods

In this chapter we will look at modeling algorithms that do not assume linearity or additivity, and that can learn limited types of interactions among input variables. These algorithms are *tree-based* methods that work by combining ensembles of *decision trees* that are learned from the training data.

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

Certification Available

Go To Track

Go To Track

Machine Learning Scientist with R

Go To Track

Datasets

BikesBlood PressureCricketHouse PricesIncomeMpgSoybeanUnemploymentSparrow

Collaborators

Nina Zumel

Co-founder, Principal Consultant at Win-Vector, LLC

Nina is a co-founder and principal consultant at Win-Vector LLC, a San Francisco data science consultancy. She is co-author of the popular text Practical Data Science with R and occasionally blogs at the Win-Vector Blog on data science and R. Her technical interests include data science, statistics, statistical learning, and data visualization.
See More
John Mount

Co-founder, Principal Consultant at Win-Vector, LLC

John is a co-founder and principal consultant at Win-Vector LLC, a San Francisco data science consultancy. He is the author of several R packages, including the data treatment package vtreat. John is co-author of Practical Data Science with R and blogs at the Win-Vector Blog about data science and R programming. His interests include data science, statistics, R programming, and theoretical computer science.
See More

Don’t just take our word for it

*4.1
from 13 reviews
54%
23%
8%
15%
0%
Sort by
• Thomas M.
4 months

Extremely useful and prefectly orchstrated!

• Margit S.
12 months

The videos were very compact, but the tasks were all straightforward to solve in combination with the videos. The overview I was able to get with this course was excellent.

• Nicolas F.

This course gives excellent resources through WVPlots and vtreat on how to develop and evaluate regression model performance.

• Edwin A.
over 1 year

This is a great course to learn regression in supervised learning in R.

• Mark R.
over 1 year

Very hands on, easy to follow instruction videos and useful practice exercises

"Extremely useful and prefectly orchstrated!"

Thomas M.

"The videos were very compact, but the tasks were all straightforward to solve in combination with the videos. The overview I was able to get with this course was excellent."

Margit S.

"This course gives excellent resources through WVPlots and vtreat on how to develop and evaluate regression model performance."

Nicolas F.