Questions tagged [r-parsnip]

Parsnip is an R package providing a common interface for specifying a model.

43 questions
0
votes
2 answers

Same Recipe and Model with Different Outcomes

I have a dataset with multiple columns for the outcome variables that I would like to predict with the same preprocessing steps and models. Is there a way to run the same recipe and models (with tuning - I'm using workflow_map()) on multiple outcome…
nrjenkins
  • 13
  • 3
0
votes
1 answer

Feature elimination to screen for multiple models using tidymodels

I am currently performing regression modeling, with a dataset that has number of features (p) higher than observations (n). Typically p = 10000 and n = 30. Furthermore, I'd like to test many models and find the best one. What I'm doing now is first…
littleworth
  • 4,781
  • 6
  • 42
  • 76
0
votes
1 answer

My parsnip models doesn't work in modeltime_calibrate function after updating packages

I developed some models for a time series, which was running normally yesterday, but after updating several packages today, including modeltime and timetk packages, the code doesn't work. It seems that the error is in the ranger and xgboost models…
0
votes
0 answers

Why null_model() perform better than any other regression methods in R tidymodels?

I am testing several regression models using Tidyverse's parsnip. Initially the best performing one is rand_forest(), but after I add null_model(), it is the latter one that is best in terms of RMSE. All are done after parameter tuning and…
littleworth
  • 4,781
  • 6
  • 42
  • 76
0
votes
0 answers

tidymodels not treating first factor level as positive class

I am having an issue with tidymodels that I can't seem to figure out. Not sure if this is the intended behavior or an issue, but either way I would appreciate any help! I am building a logistic regression prediction model with a two-level factor as…
0
votes
1 answer

extract_parameter_set_dials() fails for self-written gbm engine for boost_tree()

I followed this vignette of the tidymodels package to make the gbm an engine for the boost_tree() function. I came up with the following for regression…
mugdi
  • 365
  • 5
  • 17
0
votes
1 answer

Forcing R to apply a function or call a variable inside an argument of set_args function

While I am trying to use indexes for extracting an element of a vector or calling a function inside the set_args function of the parsnip library; library(parsnip) tree_numbers = c(500, 1000) boost_tree() %>% set_args(tree_depth =…
Cem
  • 108
  • 11
0
votes
1 answer

ggeffects giving different prediction results from lm extracted as parsnip model, despite same coefficients

I have a question about predictions using ggeffects, which is giving me completely different results if I use a traditional lm fit or an extracted parsnip model fit (despite having the same coefficients). Here is an…
Jeff
  • 57
  • 6
0
votes
1 answer

tidymodels - predict() and fit() giving different model performance results when applied to the same dataset

Currently using the tidymodels framework and struggling to understand some differences in model predictions and performance results I get, specifically when I use both fit and predict on the exact same dataset (i.e. the dataset the model was trained…
0
votes
1 answer

Issue using "pred_yes" column as the estimate argument to roc_curve()

When I run the below data it shows an incorrect roc_curve. Prep The below code should be run-able for anyone using r-studio. The dataframe contains characteristics of different employees regarding: performance ratings, sales figures, and whether or…
ryanmc25
  • 1
  • 1
0
votes
1 answer

Tidymodels, All models failed; error in model.frame.default and prediction from a rank-deficient fit may be misleading

I am having problems with the tidymodels-tuning that give the error and warning: warning: prediction from a rank-deficient fit may be misleading Error: Error in model.frame.default(Terms, newdata, na.action = na.action, xlev = ob... Note 1: I am…
0
votes
1 answer

XGBoost Model Error using workflow and modeltime

I have data located here: data_tbl.xlsx I cannot upload data here or don't know how. The issue is that I am getting an error when trying to fit my training data to a workflow. I don't understand the issue, nor why I am getting it. Here is my juiced…
MCP_infiltrator
  • 3,961
  • 10
  • 45
  • 82
0
votes
1 answer

Simple glmnet model, predict() results in 'Error in lambda[1] - s : non-numeric argument to binary operator'

So I've been trying to use predict() with various forms of dataframe formats, but they don't seem to work. I've tried 1) excluding the dependent variable, 2) including the dependent variable with sliced data, 3) including dependent variable with NA…
1 2
3