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

Evaluate the ensemble

So far, so good. But how good exactly? Prove your model evaluation skills by cross-validating your out-of-sample AUC!

The specification boost_spec and the customers_train tibble are still loaded.

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

Machine Learning with Tree-Based Models in R

ดูคอร์ส

คำแนะนำการฝึกหัด

  • Create five CV folds of your training set and save them as folds.
  • Fit and evaluate a model that predicts still_customer for every fold, using your specification, all predictor variables, and the AUC metric.
  • Collect the metrics of cv_results and check the mean AUC.

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

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

set.seed(99)

# Create CV folds
folds <- ___

# Fit and evaluate models for all folds
cv_results <- fit_resamples(___,
                            ___,
                            resamples = ___,
                            ___)

# Collect cross-validated metrics
___
แก้ไขและรันโค้ด