Questions tagged [tidymodels]

The tidymodels framework is a collection of R packages for modeling and machine learning using tidyverse principles.

The tidymodels framework is a "meta-package" for modeling and statistical analysis that shares the underlying design philosophy, grammar, and data structures of the . It includes a core set of packages that are loaded on startup, and extra packages that are installed along with tidymodels but not attached on startup. The tidymodels framework provides tooling for modeling tasks including supervised machine learning (predictive modeling), unsupervised machine learning, time series analysis, text analysis, and more.

Resources

Related tags

613 questions
0
votes
1 answer

How do I specify a PLS model in tidy models

I'm interested in learning tidymodels and have tried to apply it to some exercises in Appied Predictive Modeling. This is Exercise 6.2. I would like to specify a Partial Least Squares (PLS) model to the permeability data set. I have the following…
Mutuelinvestor
  • 3,384
  • 10
  • 44
  • 75
0
votes
1 answer

tidymodels does not respect fixed set_engine parameters

(Updated at the end based on Julia's reply. TL;DR: This seems to be an issue with the underlying kknn package, instead of with tidymodels) I'm doing some k-nearest neighbours regression models with tidymodels. This is through the nearest_neighbor()…
pcs
  • 13
  • 4
0
votes
1 answer

In installing / updating r packages I am getting namespace error, Permission Denied error etc

I am new in R and my tidymodels have been giving me issues lately so from one of stckoverflow post I got to know about updating "tune" packages from github but this was giving issues so I reinstalled rtools. I have reinstalled rtools, have set path…
ViSa
  • 1,563
  • 8
  • 30
0
votes
0 answers

Pre-allocate dummy variables levels in Tidymodels with resamples

during a model creation with R and tidymodels, as I'm using bootstrap validation as training strategy, I've found that sometimes tune_grid() function returns this error: ! Bootstrap01: recipe 2/3, model 4/10 (predictions): There are new levels in a…
Ilproff_77
  • 207
  • 1
  • 3
  • 17
0
votes
1 answer

Getting error on using caret::confusionMatrix() on collect_predictions() from tidymodel for model evaluation

I am new in R and have created a classification model using tidymodels and below is the result of collect_predictions(model) collect_predictions(members_final) %>% print() # A tibble: 19,126 x 6 id .pred_died .pred_survived .row…
ViSa
  • 1,563
  • 8
  • 30
0
votes
0 answers

I don't understand how map() and prepper() work

The behavior of map is understood to the extent of the following code. iris %>% group_nest(Species) %>% mutate(lm_mod = map(data,function(x){ lm(Sepal.Width~Sepal.Length,x) })) The above code works in my head as follows. fot(i in…
h-y-jp
  • 199
  • 1
  • 8
0
votes
0 answers

How to transform this data, map() to tune()

An iterative process is used to compare machine learning models. I was able to find the k-neighbor method in parsnip, but can I modify it to k-means to create something similar to the above code? Do you have any information that might be useful? To…
h-y-jp
  • 199
  • 1
  • 8
0
votes
0 answers

Warning message: All models failed in [fit_resamples()]. See the `.notes` column

I have used recipe()function in tidymodels packages for imputation missing values and fixing imbalanced data. here is my data; mer_df <- mer2 %>% filter(!is.na(laststagestatus2)) %>% select(Id, Age_Range__c, Gender__c, numberoflead,…
Ozgur Alptekın
  • 505
  • 6
  • 19
0
votes
1 answer

tidymodels bake:Error: Please pass a data set to `new_data`

I'm using recipe()function in tidymodels packages for imputation missing values and fixing imbalanced data. here is my data; mer_df <- mer2 %>% filter(!is.na(laststagestatus2)) %>% select(Id, Age_Range__c, Gender__c, numberoflead, leadduration,…
Ozgur Alptekın
  • 505
  • 6
  • 19
0
votes
1 answer

How to handle R kernel tibble in Jupyter lab .ipynb file to display limited row results?

I am trying using R Kernel in jupyter lab and getting 1000's of rows or more displaying when results are tibble, this makes my browser crash sometimes. How do i limit these so that it doesn't make my browser crash and works as smoothly as in Rstudio…
ViSa
  • 1,563
  • 8
  • 30
0
votes
1 answer

Tidymodels : problem performing PCR Error: Can't subset columns that don't exist

I'm trying to do a PCR with tidymodels however i'm keep runing into this problem. I know there is a similar post but the solution over there, doesn't work form my case. My data library(AppliedPredictiveModeling) data(solubility) train = solTrainY…
Ian.T
  • 1,016
  • 1
  • 9
  • 19
0
votes
1 answer

Variable importance signs from vip are opposite of expected from glmnet / tidymodels

I am using a lasso regression to classify some text as either related to AI or not. When I calculate variable importance using vip and tidymodels, the sign is opposite of expected -- words like "machine", "learning", and "algorithm" have a negative…
CGP
  • 129
  • 8
0
votes
1 answer

GLMNET output produces flat MAE

I am wondering what I am doing incorrectly in my recipe of the below reprex. It seems to be producing a flat MAE across all hyperparameters. I am still learning how to use tidymodels, so perhaps I am missing a learning trick here, but reaching out…
adrrs
  • 47
  • 6
0
votes
1 answer

How can I calculate lift curves and decile lift charts using "_xgb.Booster" "model_fit" objects rendered from parsnip function boost_tree?

I have this code that renders "_xgb.Booster" "model_fit" object classes. I should, but I am not sure how to provide the entire reproducible example code with data here! xgb <- boost_tree(mode = "classification", trees = 100, …
Geet
  • 2,515
  • 2
  • 19
  • 42
0
votes
1 answer

Shapley IML in R error. Error in col Means?

I have the following framework for fitting a random forest to my data set set.seed(123) split <- initial_split(data_num, prop = 0.8, strata = positive) train_data <- training(split) test_data <- testing(split) rf_rec <- recipe(positive ~., data =…
Eisen
  • 1,697
  • 9
  • 27