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

Pick the winner

Once tuning has been performed, it's time to pick the optimal hyperparameters from the results and build the final model. Two helpers from tidymodels come in handy:

The function select_best() extracts the optimal hyperparameters from a tuning results tibble, and finalize_model() plugs these results into the specification, replacing the placeholders.

It's your turn to try this using the results of the last exercise! The objects tune_spec, tune_results, and customers are still loaded.

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

Machine Learning with Tree-Based Models in R

ดูคอร์ส

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

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

# Select the parameters that perform best
final_params <- ___

final_params
แก้ไขและรันโค้ด