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 to supply levels to step_num2factor for multiple numeric features in tidymodel parsnip?

Following is the recipe I am creating where I want to convert few numeric features to factors: house_recipe <- training(house_split) %>% recipe(log_sale_price ~ MSSubClass + OverallCond + LowQualFinSF) %>% step_num2factor( …
0
votes
2 answers

error in random forest hyperparam tuning using tidymodel framework in R

I am trying to find the right prameter for a random forest regression problem using tidymodels frame work. Follwoing is my code: #create recepie on the preped house train data rf_rec <- recipe(log_sale_price ~. , data =…
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
2 answers

fit_resamples with ranger package fails

try to use crossfold resampling and fit a random forest from the ranger package. The fit without resampling works but once I try a resample fit it fails with error below. Consider following df df<-structure(list(a = c(1379405931, 732812609,…
CER
  • 854
  • 10
  • 22
0
votes
0 answers

removing observations from assessment split using rsample

Is there a way to replace only the assessment split in an rset object? I tried the following: library(rsample) library(dplyr) splits <- vfold_cv(mtcars) assessment(splits$splits[[1]]) #> mpg cyl disp hp drat wt qsec vs am gear…
Giovanni Colitti
  • 1,982
  • 11
  • 24
0
votes
1 answer

grid_random function errors out: 'object' should be a 'quant_param' object

I am going through a blog post on tidymodels (random forest regression) and for some reason, I keep getting Error: object should be a 'quant_param' object when I run the code chunk below grid_tidym <- grid_random( mtry %>% range_set(c( 1, 14)), …
0
votes
0 answers

Tidyverse - rsample. nested_cv + group_vfold_cv = error. Nested cross-validation on caret (trainControl)

I am running on the following error: library(tidymodels) nested_cv(data = iris, outside = group_vfold_cv( data = iris, group = Species, v = 2), inside = bootstraps(times = 5)) %>% rsample2caret() Error: labels not implemented for nested…
Gustavo
  • 11
  • 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

Finding a tidier tidy model workflow for generating predictions plus other data

I'm wondering how I can make this "tidy model" code "cleaner". Generally I fit a model and provide predictions in one wrapper function, but sometimes I want to pass back other pieces of data from the fitting or predicting (the model itself,…
user10720497
-1
votes
1 answer

Function for importance variables of tidy models variables, workflow

I need a function to use in a Workflow of the importance of variables that returns something similar to %IncMSE, I used a function from the VIP package but it only returns the plot, I want the column name format and its importance on the side. Below…
-1
votes
2 answers

Fehler in eval(predvars, data, env) : Objekt 'class_mid' nicht gefunden

Everything works fine, as long as I don't use factors data (my original data contains 8500 rows and more columns): data.frame( p2p = c(40,69,65,99,27,34,22,24,25,54,54, 58,21,17,28,55,43,65,24,49,18,28,37,23,35,12,24, …
Peter Hahn
  • 148
  • 8
-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
40
41