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

Exploring recipe objects

The first step in feature engineering is to specify a recipe object with the recipe() function and add data preprocessing steps with one or more step_*() functions. Storing all of this information in a single recipe object makes it easier to manage complex feature engineering pipelines and transform new data sources.

Use the R console to explore a recipe object named telecom_rec, which was specified using the telecom_training data from the previous chapter and the code below.

telecom_rec <- recipe(canceled_service ~ .,
                      data = telecom_df) %>% 
  step_log(avg_call_mins, base = 10)

Both telecom_training and telecom_rec have been loaded into your session.

How many numeric and nominal predictor variables are encoded in the telecom_rec object?

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

Modeling with tidymodels in R

ดูคอร์ส

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

เปลี่ยนทฤษฎีให้เป็นการลงมือทำด้วยแบบฝึกหัดเชิงโต้ตอบหนึ่งในของเรา

เริ่มแบบฝึกหัด