训练 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