我正在使用tidymodels进行机器学习,并且我想预测二进制响应/结果。如何指定结果的哪个级别是“事件”或正面案例?
这发生在食谱中还是其他地方?
##split the data
anxiety_split <- initial_split(anxiety_df, strata = anxiety)
anxiety_train <- training(anxiety_split)
anxiety_test <- testing(anxiety_split)
set.seed(1222)
anxiety_cv <- vfold_cv(anxiety_train, strata = anxiety)
anxiety_rec <- recipe(anxiety ~ ., data = anxiety_train, positive = 'pos') %>%
step_corr(all_numeric()) %>%
step_dummy(all_nominal(), -all_outcomes()) %>%
step_zv(all_numeric()) %>%
step_normalize(all_numeric())