Skip to main content
HomeR

Course

Hyperparameter Tuning in R

AdvancedSkill Level
4.7+
44 reviews
Updated 03/2026
Learn how to tune your model's hyperparameters to get the best predictive results.
Start Course for Free
RMachine Learning4 hr14 videos47 Exercises3,500 XP7,704Statement 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

For many machine learning problems, simply running a model out-of-the-box and getting a prediction is not enough; you want the best model with the most accurate prediction. One way to perfect your model is with hyperparameter tuning, which means optimizing the settings for that specific model. In this course, you will work with the caret, mlr and h2o packages to find the optimal combination of hyperparameters in an efficient manner using grid search, random search, adaptive resampling and automatic machine learning (AutoML). Furthermore, you will work with different datasets and tune different supervised learning models, such as random forests, gradient boosting machines, support vector machines, and even neural nets. Get ready to tune!

Prerequisites

Machine Learning with caret in R
1

Introduction to hyperparameters

Why do we use the strange word "hyperparameter"? What makes it hyper? Here, you will understand what model parameters are, and why they are different from hyperparameters in machine learning. You will then see why we would want to tune them and how the default setting of caret automatically includes hyperparameter tuning.
Start Chapter
2

Hyperparameter tuning with caret

In this chapter, you will learn how to tune hyperparameters with a Cartesian grid. Then, you will implement faster and more efficient approaches. You will use Random Search and adaptive resampling to tune the parameter grid, in a way that concentrates on values in the neighborhood of the optimal settings.
Start Chapter
3

Hyperparameter tuning with mlr

Here, you will use another package for machine learning that has very convenient hyperparameter tuning functions. You will define a Cartesian grid or perform Random Search, as well as advanced techniques. You will also learn different ways to plot and evaluate models with different hyperparameters.
Start Chapter
4

Hyperparameter tuning with h2o

In this final chapter, you will use h2o, another package for machine learning with very convenient hyperparameter tuning functions. You will use it to train different models and define a Cartesian grid. Then, You will implement a Random Search use stopping criteria. Finally, you will learn AutoML, an h2o interface which allows for very fast and convenient model and hyperparameter tuning with just one function.
Start Chapter
Hyperparameter Tuning in R
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.7
from 44 reviews
80%
20%
0%
0%
0%
  • Napaporn
    19 hours ago

  • Mohammed
    6 days ago

  • Takuya
    last week

  • EDWIN SALIM
    2 weeks ago

  • Vojtěch
    2 weeks ago

  • Tomas
    2 weeks ago

Napaporn

Mohammed

EDWIN SALIM

FAQs

Is this course suitable for beginners?

No. This coursed is aimed at Advanced learners with experience in programming in R.

Will I receive a certificate at the end of the course?

Yes, upon completing the course, you will receive a certificate of completion.

Who will benefit from this course?

Anyone working with supervised Machine Learning models such as Random Forests, Gradient Boosting Machines, Support Vector Machines and even Neural Nets could benefit from this course.

How long would it take to complete the course?

The course consists of 4 chapters and should take approximately 4 hours to complete.

What packages will I use in this course?

In this course, you will work with the caret, mlr and h2o packages to find optimal combinations of hyperparameters.

How will I tune hyperparameters?

You will use grid search, random search, adaptive resampling and automatic machine learning (AutoML) to tune hyperparameters.

Will I learn about plotting and evaluating models?

Yes, you will learn about plotting and evaluating models with different hyperparameters when you work with mlr and h2o packages.

Join over 19 million learners and start Hyperparameter Tuning in R 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.