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

Node link diagram in R using Rpart.plot and rattle

I am trying to create a node-link diagram (decision tree) by using parsnip and tidymodels. What I am performing is building a decision tree model for the StackOverflow dataset using the tidymodels package and rpart as model engine. The model should…
Ranji Raj
  • 778
  • 4
  • 18
0
votes
1 answer

Series of regression where the dependent variable is each level of a categorical variable

I would like to test how being female affects the day of hospital discharge. For this I would like to run a series of regression where the dependent variable is =1 if Monday is the discharge day and =0 otherwise. Next, model would be =1 if Tuesday,…
Stata_user
  • 562
  • 3
  • 14
0
votes
1 answer

Tidymodels - Help evaluating regression models made via recipes

I am working with the current tidytuesday data about salaries and trying to create a model with tidymodels and recipes. I want to predict salary with many of the other factors present using the recipes code, but I run into an issue. Issue 1 - My…
Indescribled
  • 320
  • 1
  • 10
0
votes
1 answer

R: Tidymodels: Is it possible to plot the trees for a random forest model in tidy models?

Is it possible to plot trees in random forest model ? The following is the sample dataset which can be used for explaining. Im sorry, i didnt find any such example online and hence didnt try anything by my own.The following is just a sample…
Betel
  • 151
  • 7
0
votes
0 answers

step_BoxCox() with negative data

My understanding is that the step_BoxCox() requires a strictly positive variable. However, I tried to apply the step on data that has some negative values, I didn't get an error or a warning. The output had no NA values. I don't know what is wrong,…
hnagaty
  • 796
  • 5
  • 13
0
votes
1 answer

No tidy method for objects of class LiblineaR

I have fitted text data based on regression and LiblineaR engine. And I want to `tidy()` my results. I have also installed the dev version of `broom`. But I always get an error. `ERROR: No tidy method for objects of class LiblineaR` > svm_fit…
Christian
  • 401
  • 1
  • 5
  • 14
0
votes
1 answer

Error when plotting multiclass ROC curve in R

I have made an SVM predictor, which can class samples into one of three groups - "good", "bad" or "ok". However, the test dataset only contains samples classed as "good" or "bad". I'm coming up with an error when I'm trying to use multi_roc, and…
icedcoffee
  • 935
  • 1
  • 6
  • 18
0
votes
1 answer

Tidymodels dials: Error: Element `id` should have unique values. Duplicates exist for item(s): 'penalty', 'mixture

I faced this error Error: Element ``id`` should have unique values. Duplicates exist for item(s): 'penalty', 'mixture" when tuning a model with tidymodels. It took me a while to catch the cause of the error. I'm posting it here in case some one…
hnagaty
  • 796
  • 5
  • 13
0
votes
2 answers

Is it now possible to tune classification model thresholds in tidymodels?

Does tidymodels now provide a means to tune classification model thresholds? I believe this was slated as an upcoming feature in the Spring of 2020. I looked around the tidymodels website, but have not seen a mention the feature.
Mutuelinvestor
  • 3,384
  • 10
  • 44
  • 75
0
votes
0 answers

When should you use up sampling in tidymodels?

I'm having some difficulty understanding when upsampling should be used when specifying the training dataset in tidymodels or otherwise. For example, suppose you were building a classification model that would predict if baseball players got a hit…
Mutuelinvestor
  • 3,384
  • 10
  • 44
  • 75
0
votes
1 answer

How to make predictions in tidymodels R when feature selection has been applied to the model

I have two datasets, a training and test dataset, and I am creating an SVM using the training dataset, with the tidymodels package on R. As part of the SVM workflow, I am doing feature selection to chose the 5 best performing features. I am then…
icedcoffee
  • 935
  • 1
  • 6
  • 18
0
votes
1 answer

Is there a reason the xgboost code snippet from the usemodels package has one_hot set to TRUE?

Is there a reason the recipe code snippet for xgboost classifier has one_hot = TRUE? This creates "n" dummy variables instead of "n-1". I usually set it to FALSE but just want to make sure I'm not missing something. Code - data <- mtcars %>% …
The Rookie
  • 877
  • 8
  • 15
0
votes
0 answers

tf-hub and recipes / tidymodels

I'm going through the tfhub-recipes example here. However, after running the basic example, I tried to add in hyperparamter tuning and got the error internal: Error: Only strings can be converted to symbols Does anyone know why that might happen…
CGP
  • 129
  • 8
0
votes
1 answer

recipes::step_num2factor() leaves last level as NA when baking despite enough levels supplied (MWE supplied)

The last category I create with the function step_num2factor() creates all levels correctly but the last one. There it fills in an NA. MWE test <- tibble(pred = c(0, 1, 2, 3, 4, 5, 8), target = c(0,1,0,1,1,1,0)) looks like this when printed: # A…
thebilly
  • 47
  • 5
0
votes
2 answers

Linear model across several columns that are years in R

I have a data frame (over 1000 samples) that has a percentage of vegetation cover sampled at several years. I want know if the percent cover it generally increasing, decreasing or no trend. I have been trying to fit a linear model in R using…