1. Learn
  2. /
  3. Courses
  4. /
  5. Machine Learning with Tree-Based Models in R

Exercise

Adjust model complexity

To make good predictions, you need to adjust the complexity of your model. Simple models can only represent simple data structures, while complex models can represent fine-grained data structures.

In this exercise, you are going to create trees of different complexities by altering the hyperparameters of a regression tree.

The training data chocolate_train is pre-loaded in your workspace.

Instructions 1/3

undefined XP
  • 1
    • Grow a decision stump, a regression tree with only one split.
  • 2
    • Grow a regression tree with a complexity cost of 0.1.
  • 3
    • Create a model that has no penalty for complexity, and a minimum sample size of 2.