Skip to main content
HomeR

Course

Supervised Learning in R: Regression

IntermediateSkill Level
4.6+
89 reviews
Updated 01/2025
In this course you will learn how to predict future events using linear regression, generalized additive models, random forests, and xgboost.
Start Course for Free
RMachine Learning4 hr19 videos65 Exercises5,300 XP46,258Statement of Accomplishment

Create Your Free Account

or

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

Loved by learners at thousands of companies

Group

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.

Prerequisites

Introduction to Regression in R
1

What is Regression?

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.
Start Chapter
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.
Start Chapter
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.
Start Chapter
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.
Start Chapter
5

Tree-Based Methods

Supervised Learning in R: Regression
Course
Complete

Earn Statement of Accomplishment

Add this credential to your LinkedIn profile, resume, or CV
Share it on social media and in your performance review
Enroll Now

Don’t just take our word for it

*4.6
from 89 reviews
76%
16%
7%
1%
0%
  • EFE
    4 days ago

  • Emily
    4 days ago

  • Delruba Mahmud
    5 days ago

  • Nícholas
    6 days ago

  • Martín
    2 weeks ago

    very useful for those who want to strengthen their foundation in regression and wrap up with information on two popular machine learning algorithms

  • Cornelius
    2 weeks ago

EFE

Emily

Delruba Mahmud

FAQs

What prior R knowledge do I need before starting this regression course?

You should be comfortable with dplyr for data manipulation, ggplot2 for visualization, and basic statistics concepts like linear regression in R before enrolling.

Does this course cover both linear and nonlinear regression models?

Yes. You will work with linear regression, generalized additive models (GAMs), and tree-based models like random forests, learning when each approach is most appropriate.

How are models evaluated in this course?

You will learn to evaluate regression models using root mean squared error (RMSE) and R-squared, along with graphical residual analysis and cross-validation techniques.

What kinds of data science roles use these regression techniques?

Data scientists, machine learning engineers, and analysts regularly use supervised regression to forecast sales, predict prices, and estimate continuous outcomes in business.

How long does it typically take to complete all five chapters?

The course has 65 exercises across five chapters. Most learners finish in about four to five hours, though the pace depends on your experience level.

Join over 19 million learners and start Supervised Learning in R: Regression today!

Create Your Free Account

or

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

Grow your data skills with DataCamp for Mobile

Make progress on the go with our mobile courses and daily 5-minute coding challenges.