Supervised Learning in R: Regression

Start Free Preview

Buying via our links supports this free directory · Affiliate disclosure.
Course facts
  • Payment: Free Preview (Paid Upgrade)
  • Learning style: Self-paced, start anytime
  • Format: Text & Interactive
  • Video access: Streaming Only
  • Before you start: Introduction to Regression in R
DataCamp details
  • Chapters: 5
Available onDataCamp

Course Details
Learning Style

Start Anytime

Level

Intermediate

Study Mode

100% Online

Duration

Short (< 10 Hours)

Languages
Audio Language

English

Outcomes
Certificate

Certificate of Completion

Price & Terms
Pricing Model

Free Preview (Paid Upgrade)

Technical
Content Medium

Text & Interactive

Video Access

Streaming Only

Specification
Access

Subscription

Learn to fit, evaluate and compare regression models in R, including linear models, GAMs, random forests and gradient boosting.

At a glance
Duration4 hrs
LevelIntermediate
CertificateCertificate of Completion
LanguageEnglish
AccessSubscription
Add your review
Add to wishlistAdded to wishlistRemoved from wishlist 0

Regression, seen as a machine learning task, means predicting a numeric outcome, such as a count, a rate or a probability, using a set of inputs. You fit linear models in R and test how well they predict new data, then handle categorical inputs and transformed outcomes. Later you work with responses that break straight-line assumptions, using logistic and Poisson regression, generalized additive models, random forests and gradient boosting.

What You Will Achieve

  • Fit linear regression models in R with one or more inputs and use them to predict values for new data.
  • Judge a model with residual plots, gain curves, RMSE and R-squared, and estimate its performance on unseen data with a test/train split or n-fold cross-validation.
  • Set up model formulas that handle categorical variables, interactions and a log-transformed monetary outcome.
  • Choose a fitting approach for the response: logistic regression for survival probabilities, Poisson or quasipoisson for rental counts, or a GAM for non-linear soybean growth.
  • Build random forest and xgboost models for bike rental data and pick a suitable number of trees.
  • Prepare categorical variables for tree ensembles with vtreat, including levels that appear only in new data.


Program Overview

Linear Regression and Model Evaluation

Frames regression as a prediction task, fits linear models with one or several inputs, and measures how they perform on data the model has not seen.

  • Regression tasks and one-variable and multivariate linear models
  • Graphical evaluation and the gain curve
  • RMSE, R-squared and correlation
  • Test/train splits and n-fold cross-validation

Categorical Inputs, Interactions and Transforms

Looks at modeling choices worth settling before more sophisticated methods, since some of them are handled automatically and others remain the modeler’s job.

  • Modeling with categorical inputs
  • Interactions between variables
  • Log-transformed responses and relative error
  • Input transforms such as the hockey stick

Non-Linear Responses and Tree-Based Methods

Covers logistic, Poisson and GAM models for responses that break linearity, and ensembles that combine decision trees learned on training data.

  • Logistic regression for probabilities
  • Poisson and quasipoisson regression for counts
  • GAM formulas for non-linear additive effects
  • Random forests, one-hot encoding with vtreat and gradient boosting with xgboost

Certificate Awarded (Paid)


Job Outlook

Regression modeling in R is used wherever a numeric outcome has to be estimated with data, such as bike rental counts, a survival probability or crop growth, and in analysis work that compares several candidate models.


Our take

Good for: R learners who want to predict numeric outcomes with several kinds of model and compare them on the same evaluation measures.

Keep in mind: Many model types fit into five chapters, so most methods are shown through one worked example, such as bike rentals, sparrow survival or soybean growth.

Bottom line: It carries a single evaluation routine of RMSE, R-squared and cross-validation across linear models, GAMs and tree ensembles in R.

Frequently Asked Questions

Which R packages appear in the lessons?

vtreat one-hot encodes categorical variables and deals with novel levels, and xgboost fits the gradient boosting models. The other chapters work with linear, logistic, Poisson, quasipoisson and GAM model formulas.

Which examples are the regression models built on?

The exercises build models on several example data sets: an unemployment model, sparrow survival probability, bike rental counts, soybean growth and a monetary outcome that is log-transformed before modeling. The bike rental data returns across the count, random forest and xgboost lessons.

How are outcomes such as money handled?

One chapter shows how to transform a monetary response with a log before fitting, introduces relative error, and compares ordinary RMSE with root-mean-squared relative error for the resulting model.

Do the evaluation methods work beyond linear regression?

Yes. Graphical checks, RMSE, R-squared, test/train splits and cross-validation are demonstrated on linear regression, but these concepts apply to models fit with any regression algorithm, including the GAMs and tree ensembles taught later.

User Reviews

0.0 out of 5
★★★★★
0
★★★★★
0
★★★★★
0
★★★★★
0
★★★★★
0

No reviews yet. Be the first to review this course.

There are no reviews yet.

Write your review

Reviews can only be posted by registered learners. Log in, then you will return here to post.

×
Report this page
Supervised Learning in R: Regression
Supervised Learning in R: Regression
LiveTalent
Logo