เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

In-sample and out-of-sample performance

Does a more sophisticated model always perform better? As we discussed in the video, that's only half the truth.

Overfitted models understand the structure of their training set perfectly but cannot generalize to new data. That's a bummer! At the end of the day, the main purpose of a predictive model is to perform well on new data, right? Go investigate!

Pre-loaded is the last model of the previous exercise, complex_model, and your training and test data (chocolate_train and chocolate_test).

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Machine Learning with Tree-Based Models in R

ดูคอร์ส

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Predict on and combine with training data and calculate the error
predict(___, new_data = ___) %>%
	___ %>% 
	mae(___,
        ___)
แก้ไขและรันโค้ด