BaşlayınÜcretsiz Başlayın

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.

Bu egzersiz

Machine Learning with Tree-Based Models in R

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Create a model having only one split
chocolate_model <- ___(___) %>% 
		set_mode("regression") %>%
		set_engine("rpart") %>% 
		fit(final_grade ~ ., data = chocolate_train)

chocolate_model
Kodu Düzenle ve Çalıştır