CAST icon indicating copy to clipboard operation
CAST copied to clipboard

ffs with recipe

Open joshualerickson opened this issue 4 years ago • 0 comments

When I try to use a recipe with ffs it doesn't recognize the "response" from the recipe object. Is there a work around for this? Thanks.

`` rec_test <- recipe(stream ~ ., data = testing) %>% update_role(sb12, new_role = "performance var") %>% step_center(all_predictors()) %>% step_scale(all_predictors()) %>% step_pca(contains("_30agg"), prefix = "pca_B", threshold = 0.9)

sb12 <- CreateSpacetimeFolds(train,spacevar = "sb12",k = 10, seed = 123 ) ctrltest <- trainControl(method="repeatedcv", repeats = 5, allowParallel = TRUE, returnResamp = "all", verbose = FALSE, index = sb12$index)

set.seed(1234) ffstest <- ffs(rec_test, data = testing, metric = "Kappa", method = "rf", trControl = ctrltest)

Error in ffs(rec_test, data = testing, metric = "Kappa", method = "rf", : argument "response" is missing, with no default

joshualerickson avatar Mar 10 '20 18:03 joshualerickson