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
2
votes
1 answer

Can tidymodels deal with the retransformation problem?

I was getting acquainted with tidymodels by reading the book and this line in section 9.2 kept me thinking about retransformation. It is best practice to analyze the predictions on the transformed scale (if one were used) even if the predictions…
elikesprogramming
  • 2,506
  • 2
  • 19
  • 37
2
votes
2 answers

Can I use xgboost global model properly, if I skip step_dummy(all_nominal_predictors(), one_hot = TRUE)?

I wanted to try xgboost global model from: https://business-science.github.io/modeltime/articles/modeling-panel-data.html On smaller scale it works fine( Like wmt data-7 departments,7ids), but what if I would like to run it on 200 000 time series…
igor_262
  • 21
  • 2
2
votes
0 answers

Split issue with model_time and timetk in R

I'm using modeltime to forecast 20 time series (not balanced) at once using Modeltime package. However, when I call the function modeltime_calibrate i got the following error: Error in glubort(): ! Missing 'new_data'. Try adding a test data…
2
votes
2 answers

Error on running `predict()` in tidymodels "Error in `dplyr::select()`: Can't subset columns that don't exist."

Problem I get an error when running predict in the tidymodels framework. The error appears to be related to selecting variables in the recipe (see code below). What I've tried There are some related SO posts, such as this one, this one, or this one,…
Sebastian Sauer
  • 1,555
  • 15
  • 24
2
votes
0 answers

Tidymodels worfklow_map() function not working on Spark cluster with R sparklyr

I am attempting to run a time series cross validation ML tuning process on a Spark cluster (sparklyr on Databricks), but am getting an error. The packages I'm using are tidymodels with modeltime. The code works perfectly fine on a local machine, but…
skklogw7
  • 41
  • 3
2
votes
1 answer

R: mixed models - how to predict a variable using previous values of this same variable

I struggle with multilevel models and prepared a reproducible example to be clear. Let's say I would like to predict the height of children after 12 months of follow_up, i.e. their height at month == 12, using the previous values obtained for the…
David
  • 111
  • 6
2
votes
2 answers

Obtaining summary shap plot for catboost model with tidymodels in R

I am trying to build a catboost model within the tidymodels framework. Minimal reproducible example is given below. I am able to use the DALEX and modelStudio packages to get model explanations but I want to create VIP plots like this and summary…
Rizwan S A
  • 77
  • 5
2
votes
1 answer

Why do DALEX and tidymodels provide different GOF?

I wonder why DALEX model_performance and collect_metrics do not provide the same accuracy. Do they use different measures or different methods? I've compiled the following example…
S Front
  • 333
  • 1
  • 8
2
votes
1 answer

How to fit several different linear models on same dataset using tidymodels and workflowsets

I want to evaluate the performance of several (mostly) linear regression models on the same dataset. I thought maybe using tidymodels packages along with the workflowsets::workflow_set() might work. I followed the example here, but I cannot figure…
D Kincaid
  • 167
  • 1
  • 13
2
votes
1 answer

How can I extract model summary from multiple tidymodels objects using purrr::map functions in R?

I want to use purrr::map_* functions to extract info from multiple models involving linear regression method. I am first creating some random dataset. The dataset has three dependent variables, and one independent…
Eva
  • 663
  • 5
  • 13
2
votes
0 answers

How to deal with external regressors in time series recipes?

In time series forecasting external regressors can make a big difference. Currently I want to track the effects of external regressors, using the modeltime framework. However, I could not find any helpful information on this topic so far. I only…
2
votes
0 answers

what mean these error when tuning a rf with tune_race: Error : arrange() failed at implicit mutate() step. x Can't recycle input of size 0 to size 1

I am adjusting a random forest with a single numeric variable. The structure of the data table is as follows: tibble [617,622 x 29] (S3: tbl_df/tbl/data.frame) and I split the data: set.seed(123) data_split <- initial_split(data, strata = var_class,…
2
votes
1 answer

Error related to labels when tuning catboost in tidymodels

Here is the model: cb_spec <- boost_tree( mode = "classification", trees = 1000, tree_depth = tune(), min_n = tune(), mtry = tune(), learn_rate = tune() ) %>% set_engine("catboost", loss_function = "Logloss", task_type = "GPU") Here…
tedescr
  • 53
  • 6
2
votes
0 answers

Hyperparameter optimization while using fable.prophet?

I would like to do hyperparameter optimisation while using the awesome fable package(here fable.prophet) from tidyverts Using the example of fable.prophet like as mentioned at https://github.com/mitchelloharawild/fable.prophet. fit <- cafe %>% …
cube
  • 345
  • 1
  • 2
  • 9
2
votes
1 answer

wrap tidymodels recipe into function

Is it possible to wrap a tidymodel recipe into a function? I've tried the following: # Data setup library(tidyverse) library(tidymodels) parks <-…
S Front
  • 333
  • 1
  • 8