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
0 answers

create a initial_split for multiple datasets nested on a tibble in R

I´m trying to fit several models and wanted to use a tibble to organize all the data, however I´m stuck at trying to split each dataset here is the example: library(tidyverse) library(tidymodels) my_data <-crossing(labels = c("A",…
edperalt
  • 23
  • 5
0
votes
1 answer

Tidymodels (Fitting Bagged Trees with 10-Fold Cross Validation in R): x Fold01: model: Error: Input must be a vector, not NULL

Overview: I have produced four models using the tidymodels package with the data frame FID (see below): General Linear Model Bagged Tree Random Forest Boosted Trees The data frame contains three predictors: Year (numeric) Month (Factor) Days…
Alice Hobbs
  • 1,021
  • 1
  • 15
  • 31
0
votes
1 answer

Tidymodels: Tunable models involving 10-fold Cross Validation Using the Function tune_grid() in R

Overview I have produced four models using the tidymodels package with the data frame FID (see below): General Linear Model Bagged Tree Random Forest Boosted Trees The data frame contains three predictors: Year (numeric) Month (Factor) Days…
Alice Hobbs
  • 1,021
  • 1
  • 15
  • 31
0
votes
1 answer

In R selecting X first PCAs components in recipe in tidymodels

I would like to select the X first number of PCA components after they've been computed within a recipe. I then want to add this recipe in a workflow. Please see example data below. library(tidymodels) x1 <- c(1, 6, 4, 2, 3, 4, 5, 7, 8, 2) x2 <-…
John
  • 309
  • 3
  • 12
0
votes
1 answer

Extract Rules from Trained C5.0 Model in Tidymodels

I could and should have made a simpler reprex, but this is really straight out of my work. After training a C5.0 model in the Tidymodels framwork, how do I "see" the rules that the model generated? I tried to replicate what is illustrated…
larry77
  • 1,309
  • 14
  • 29
0
votes
1 answer

Trying to predict the probability of a binary variable being equal to 1 using tidymodels

I am trying to predict the probability of two_year_recid by estimating a logit regression (with no penalty) that includes a flexible list of controls excluding decile_score and race_factor, but I keep getting an error saying Error in…
yacoub q
  • 45
  • 5
0
votes
1 answer

How to compute FIRM importance measure using VIP package and tidymodels (including recipe)

I want to compute the FIRM importance scores for a model made from a tidymodels workflow. For regex, I will use the iris dataset and try to predict whether an observation is setosa or not. library(tidymodels) library(readr) library(vip) #clean…
Anthony
  • 105
  • 7
0
votes
1 answer

In R, error in workflow fit when including step_pca in recipe

In tidymodels I want to create a workflow based on a recipe and a model specification. It works when I do NOT include step_pca(); but when I include step_pca() as a setting I get error. Please see repex blow. (It works fins if I do not use the…
John
  • 309
  • 3
  • 12
0
votes
0 answers

How to get results from knn by using recipe, parsnip, tidymodels in r?

I am new in R & getting a bit confused with steps need to be followed in classification task by using tidymodels. kaggle dataset from: https://www.kaggle.com/c/home-credit-default-risk to perform a Classification on TARGET variable of dataset. This…
ViSa
  • 1,563
  • 8
  • 30
0
votes
2 answers

Failure of installing tidymodels

I can not install tidymodels in R studio. By this error, i tried to remove the current rlang, and reinstall it but i still can not install tidymodels package. Error: package or namespace load failed for ‘tidymodels’ in loadNamespace(i, c(lib.loc,…
Gracetam
  • 19
  • 1
  • 6
0
votes
2 answers

Tidymodels package: Model predictions to find the best model fit using the juice() and bake() functions in R

Overview I have produced four models using the tidymodels package with the data frame FID (see below): General Linear Model Bagged Tree Random Forest Boosted Trees The data frame contains three predictors: Year (numeric) Month (Factor) Days…
Alice Hobbs
  • 1,021
  • 1
  • 15
  • 31
0
votes
1 answer

Tidymodels Package: Visualising Bagged Trees using ggplot() to show the most important predictors

Overview: I am following a tutorial (see below) to find the best fit models from bagged trees, random forests, boosted trees and general linear models. Tutorial (see examples…
Alice Hobbs
  • 1,021
  • 1
  • 15
  • 31
0
votes
0 answers

Shiny error after packages update: Unknown `composition` type

After some packages update, I'm no longer able to start my shiny application. The error I'm receiving it's not very clear: Warning: Error in : Internal error: Unknown composition type. 69: Error : Internal error: Unknown composition type. I'm…
Ilproff_77
  • 207
  • 1
  • 3
  • 17
0
votes
1 answer

Why does the r session break when I try to make a prediction with a lightGBM model saved as ".rds"?

After fitting a lightGBM model with tidymodels and treesnip, I can take the fitted workflow and make predictions on new data without any problems. However, after saving the adjusted model in ".rds" format, closing the session and loading the ".rds"…
0
votes
1 answer

Error message: All models failed in tune_grid(). See the `.notes` column. When tuning parameters for random forest model

bos <- read_csv("boston_train.csv") %>% clean_names() bos %>% mutate_if(is.character, factor) -> bos Then I split the data and did the k-folds # -- set a random seed for repeatablity set.seed(42) # -- performs our train / test split split <-…