訓練 recipe 物件
在上一個練習中,你建立了一個 recipe 物件,指示要對電信資料中的預測變數 avg_call_mins 與 avg_intl_mins 進行對數轉換。
特徵工程流程的下一步是使用訓練資料來訓練你的 recipe 物件。之後,你就能把已訓練的 recipe 套用到訓練集與測試集,以便在進行模型擬合與模型評估前完成資料前處理。
你的 recipe 物件 telecom_log_rec,以及 telecom_training 與 telecom_test 資料集已載入到本次工作階段中。
本練習屬於課程
在 R 中使用 tidymodels 建立模型
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Train the telecom_log_rec object
telecom_log_rec_prep <- ___ %>%
___(training = ___)
# View results
telecom_log_rec_prep