Questions tagged [r-recipes]

recipes is an R package by Max Kuhn and Hadley Wickham for creating and preprocessing design matrices.

recipes is an R package by Max Kuhn and Hadley Wickham for creating and preprocessing design matrices.

131 questions
0
votes
1 answer

tidymodels recipe: Using all_of to select variables stored in a vector

I would like to use a vector with column names for a variety of step functions in the tidymodels recipe package. My intuition was simply to use (the prep and juice just used here for…
Moritz Schwarz
  • 2,019
  • 2
  • 15
  • 33
0
votes
1 answer

Unable to train Poisson glmnet with categorical predictors using tidymodels package

My goal is to fit a Poisson glmnet using the tidymodels package. For this purpose, I use the recipes package to preprocess the data, parsnip to fit the model, workflows to bundle the model with the preprocessor and poissonreg to be able to use…
0
votes
1 answer

step_num2factor() Usage -- Tidymodel (Recipe Package)

Well, I've read the function reference for step_num2factor and didn't figured it out how to use it properly, honestly. temp_names <- as.character(unique(sort(all_raw$MSSubClass))) price_recipe <- recipe(SalePrice ~ . , data = train_raw)…
0
votes
1 answer

How to fix this error: Recipes fail to load in Caret:: Train?

I have this problem when load recipes into caret:: train There something wrong with the NA imputation, but I don't know how to fix it. If I remove the cross validation everything work fine. Thanks in advance, data(airquality) set.seed(33) # for…
Dat Vuong
  • 27
  • 3
0
votes
1 answer

Tidymodels imputation within each fold

When using caret with CV, imputation estimation /etc will happen in each fold as not to leak. I am trying to find whether this happens in the tidymodels workflow. Logically I don't think so as you pipe a baked (already applied steps) into the…
Talbert
  • 21
  • 3
0
votes
1 answer

how to use add_step from recipes package in r

I want to build a function that adds steps to a recipe, but I can't figure out how to use add_step. It doesn't help that there are no examples in the documentation. This is what I've tried: suppressPackageStartupMessages(library(recipes)) rec1 <-…
Giovanni Colitti
  • 1,982
  • 11
  • 24
0
votes
1 answer

Caret's train.recipe seems to not apply recipe procedure to remove NAs and subsequently cross-validation fails

The caret package seems to not apply the recipe procedure to remove NAs for cross-validation. I guess that I overlook something... iris_dt <- as.data.table(iris) iris_dt[3:5,':='(Petal.Length=NA)] control <-…
Heronic
  • 3
  • 2
0
votes
1 answer

Why is the outcome variable appearing as a coefficient in the summary table of the linear regression?

I'm performing a linear regression using recipes to predict salary based on rank (assoc professor, assistant professor, and full professor), sex, discipline (applied or theoretical), years of service, and years since PhD. This data set is in the…
0
votes
1 answer

Using recipes with custom step works fine while baking but not while training model with caret

Using recipes package, I developped a custom step in order to include it in some caret models. While applying prep and bake on my new step, everything works fine. But when I try to include the unprepared recipe in caret::train I got the following…
denisC
  • 53
  • 3
-1
votes
1 answer

Tidymodels Tuning Recipe Parameters

Using tidymodels, I really love the possibility of tuning not only model parameters, but also some recipes steps. For example the number of components in step_pls(). The issue is that I'm finding trouble in limiting the range of possible values. For…
oprick
  • 21
  • 4
-2
votes
1 answer

Conflicts or errors in the tune and tidymodels packages using information gain from the colino package or recipeselectors

This code was working until yesterday, when I uninstalled the recipeselectors and colino packages. I've looked everywhere and no one has reported a similar error. Link to download the database…
1 2 3
8
9