A Common API to Modeling and Analysis Functions
Overview
A common interface is provided to allow users to specify a model without having to remember the different argument names across different functions or computational engines (e.g. 'R', 'Spark', 'Stan', 'H2O', etc).
Breaking Change
- Two
translate()helper functions for glmnet are generalized and used to de-duplicate code for ordinalNet and glmnetcr. The latter two no longer silently modify penalty path-governing engine arguments (@corybrunson, #1412 & #1424), which will impact code that relied on these modifications. logistic_reg()now errors when the outcome has more than two levels, instead of warning. Most engines cannot fit this:glmcollapses every level after the first into the event andkeras3returns a column per level, but in both cases the probability columns parsnip labels do not mean what their names say, andglmnet,stan, andbruleeerror inside the engine. TheLiblineaRengine is exempt, since it genuinely fits a multiclass model andmultinom_reg()has no LiblineaR engine. The warning was added in 1.1.0 (#545); erroring reflects that for most engines the result was not usable (#1444).
New Features
- New model specifications
tabular_auto_int(),tabular_chronos(),tabular_icl(),tabular_pfn(),tabular_resnet(),tabular_rln(), andtabular_saint()were added for tabular deep-learning and foundation models, with engines provided by the tabby extension package (#1386). fit()andfit_xy()have less per-fit overhead, making small or repeated fits (such as during tuning) faster (#1071).null_model()now supports quantile regression mode, where fitting computes the requested empirical quantiles of the outcome.- For censored regression models, the censoring weights can now be added to the predictions of survival probability by setting
add_censoring_weights = TRUEinpredict(type = "survival")(#1371). ordinal_reg()gains argumentsthreshold_structureandparallel_regto control threshold constraints and the parallel regression assumption. TheordinalNetengine can useparallel_regwhile theclmandvglmengines can use both new arguments (#1393, @corybrunson).
Bug Fixes
- The deprecated
quantileargument now reaches its deprecation warning when passed viapredict(type = "quantile")instead of being rejected as an unknown argument. The error for unknown arguments passed topredict()now lists the offending argument names. (@bjornkallerud, #1258) - Several internal list accesses that resolved only through
$partial matching were corrected: the outcome levels recorded when fitting from a formula, the"ranger"prediction post-processor, and themulti_predict()generic's check for a failed fit. Results are unchanged, but each would have silently started reading a different element had one with a shorter name been added.
Show all changes in 1.6.1Hide the rest of the changes in 1.6.1
- Model and engine arguments are now evaluated while the model call is assembled, so the call an engine records no longer contains quosures. This fixes
mars()fits with the earth engine whenprune_method = "cv"is combined withprod_degree(#432), andset_engine("glmnet", relax = TRUE)for every glmnet engine, which also covers the poissonreg and censored wrappers (#1069). Both engines re-evaluate their own recorded call with baseeval(), which cannot handle quosures. A fitted object's$fit$callnow shows values such asdegree = 2rather thandegree = ~2. bart()classification fits with the"dbarts"engine now return each observation's own confidence and prediction interval bounds. The bounds were sorted across observations, so each row received some other row's rank-matched limits. Regression intervals were unaffected (#1407).bart()classification with the"dbarts"engine now errors when the outcome does not have exactly two levels. dbarts models a binary outcome, but parsnip passed it the factor codes without checking, so a third level became ayvalue of2and the returned "probabilities" were not on[0, 1]. This also affected a two-level outcome that retained an unused level: class and probability predictions were silently mislabelled, and interval predictions errored insiderlang::set_names(). The new error names the unused levels and suggestsdroplevels()when that is the problem (#1444).boost_tree()with the"xgboost"engine now warns once per session whenmonotone_constraintsis supplied for binary classification. The signs of the constraints are relative to the event level, which is the first factor level unlessevent_level = "second"is set, somonotone_constraints = 1constrains the probability of that level rather than of the second one. The engine documentation now describes the convention. Fitted models are unchanged (#796).boost_tree()models fit with the"xgboost"engine and a function-valuedobjectivenow error informatively forpredict(type = "class")andpredict(type = "prob")instead of returning raw margins labelled as probabilities. xgboost cannot report whether a custom objective produces margins or probabilities, so parsnip cannot convert them; usepredict(type = "raw")and apply the matching inverse link yourself, or register a custom engine that post-processes the predictions. Fitting,type = "raw", and regression are unaffected (#999).fit()andfit_xy()now error when extra arguments are passed through.... The documentation always said these were ignored, but depending on the combination of user and engine interface they were silently dropped, silently applied (asubsetargument really did subset the training data on the formula-to-xy path), or raised an internal "unused argument" error. Pass engine arguments toset_engine()and case weights to thecase_weightsargument. Passingoffsetgets specific advice, since the general suggestion does not work for it: useoffset()in the formula, or pass the offset vector toset_engine()when usingfit_xy()(#492, #1439).mars()classification fits with the"earth"engine now return correctpredict(type = "class")results for outcomes with three or more levels. A binary threshold rule was applied regardless of the number of levels, so every multiclass prediction was wrong and the last level could never be predicted. Binary outcomes are unaffected (#472, #1409).multi_predict()for glmnet engine fits now passestype = "raw"through to glmnet with no post-processing. It was silently ignored forlinear_reg(), which returned the usual nested.predtibble, and errored unhelpfully forlogistic_reg()andmultinom_reg(). The result is glmnet's own prediction object — a matrix with one column per penalty, or a three-dimensional array formultinom_reg()— rather than a tibble (#857).- The per-type glmnet prediction methods (
predict_numeric._elnet(),predict_class._lognet()and the six others like them) were removed. Each only evaluated the model specification before handing off to the correspondingmodel_fit()method, which thepredict()path already does beforehand. Predictions from glmnet models are unchanged. A custom model that carries one of glmnet's fitted classes, such as_elnet, now reaches parsnip'smodel_fit()methods for these prediction types rather than the glmnet ones (#878). multi_predict_args()andhas_multi_predict()work again for fitted workflows, returning the submodel argument names andTRUEinstead ofNULLandFALSE. They read from an outdated internal workflows structure. Both now error informatively on an untrained workflow rather than silently reporting that it has no submodel arguments (#1410).predict_raw()no longer errors whenoptscontains an argument name that collides with a protected prediction argument such asnewdataorobject. The colliding entry is now dropped with a warning; previously every path through that branch failed with "attempt to select less than one element". This also coverspredict(type = "raw", opts = ...)(#1408).set_model_arg()now storesfuncas a list when given the named character vector form shown in its documentation, such asc(pkg = "dials", fun = "mixture"). That form registered without complaint but made tuning fail much later with$ operator is invalid for atomic vectors(#1251).svm_linear()with the"LiblineaR"engine now passescosttoLiblineaR::LiblineaR(). It was previously mapped to a nonexistentCargument, which the engine silently absorbed into its dots, so every fit used the engine default ofcost = 1and tuning overcosthad no effect. Fitted results will change for any model with a non-defaultcost(#1405).- Fitting with sparse data now respects the model mode, so loading an extension package that registers an engine for a different mode can no longer alter sparse data support for the original mode (#1382).
- Corrected documentation that referred to
fit()andfit_xy()as arguments rather than functions in the case weights template (#1394).
From NEWS.md in the release
Install
Health
- OK13 OK2026-10-04
- ERROR8 OK, 4 NOTE, 1 ERROR2026-09-11
- NOTE12 OK, 1 NOTE2026-07-11
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
Show 3 earlier changesHide 3 earlier changes
- OK14 OK2026-04-10
- ERROR13 OK, 1 ERROR2026-04-07
- OK14 OK2026-03-10
Documentation
The repository also keeps web-only articles.
- Help pages
- 242 (173 internal)includes a package overview page
- Examples that run
- 100%58 run in a plain check (57 of them under a condition)
- Exported functions with examples
- 48%
- Documented parameters
- 96%
- Return-value docs
- 39%
- Help pages citing references
- 18%
Downloads
Repository
- PRs merged (all time)
- 96%
- Median days to close, 50 most recently updated closed issues
- 120
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
Commit identities over time
14 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/tidymodels/parsnip on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-09-27 · The repository has a site deploy workflow
pkgdown site last built 2026-09-27
Show all practicesHide 1 practice
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-03-02Seen in the repository: .claude, .claude/skillsNamed in .Rbuildignore: .claudeCommits: at least 1 crediting it in the message
- GitHub Copilotfirst seen 2026-07-27Pull request: opened by its own accountCommits: 1 by its own account · at least 1 crediting it in the message
- Claude CodePull requests: 1 from outside contributors, first on 2026-09-17, 1 from forks
- Claude Fable 5.11 commit · Sep 2026
Dependencies
Installing parsnip adds 33 packages (16 with compiled code, 29 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, isoband 1.5 MB.
Show the 48 most downloaded dependentsHide the 48 most downloaded dependents
and 10 more dependents and 50 packages that suggest it on CRAN ↗
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 1.6.1Latest2026-09-27 · current release · diff ↗ ·
added 8 exports
check_outcome_levels, tabular_auto_int, tabular_chronos, tabular_icl, tabular_pfn, tabular_resnet, tabular_rln, tabular_saint - 1.6.0
- RR 4.6.0 released · 2026-04-24
- 1.5.02026-04-09 · diff ↗ ·
added 8 exports
format_predictions, mcqrnn_train, model_arg_exists, ordinal_reg, predict_class, predict_classprob, predict_hazard, predict_quantile - 1.4.12026-01-11 · diff ↗
- 1.4.02025-12-01 · diff ↗
- 1.3.32025-08-31 · diff ↗
- 1.3.22025-05-28 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 1.3.12025-03-12 · diff ↗
- 1.3.02025-02-14 · diff ↗ ·
removed 2 exports
bartMachine_interval_calc, rpart_trainadded 5 exports
.get_prediction_column_names, ensure_parsnip_format, extract_fit_time, keras_activations, matrix_to_quantile_pred - RR 4.4.0 released · 2024-04-24
- 1.2.12024-03-22 · diff ↗
- 1.2.02024-02-16 · diff ↗ ·
added 5 exports
case_weights_allowed, check_args, predict_confint, predict_predint, predict_predint.model_fit - 1.1.1
- RR 4.3.0 released · 2023-04-21
Show 27 earlier eventsHide 27 earlier events
- 1.1.0
- 1.0.4
- 1.0.32022-11-11 · diff ↗ ·
added 3 exports
prompt_missing_implementation, spec_is_loaded, spec_is_possible - 1.0.2
- 1.0.1
- 1.0.02022-06-16 · diff ↗ ·
added 17 exports
.model_param_name_key, cforest_train, ctree_train, format_class, format_classprobs, format_hazard, format_linear_pred, format_num, format_survival, format_time, frequency_weights, glm_grouped, importance_weights, max_mtry_formula, print_model_spec, update_spec, xgb_predict - RR 4.2.0 released · 2022-04-22
- 0.2.12022-03-17 · diff ↗
- 0.2.02022-03-09 · diff ↗ ·
added 26 exports
C5_rules, autoplot, bag_mars, bag_tree, bart, bartMachine_interval_calc, check_model_doesnt_exist, check_model_exists, cubist_rules, dbart_predict_calc, discrim_flexible, discrim_linear, discrim_quad, discrim_regularized, extract_parameter_dials, extract_parameter_set_dials, keras_predict_classes, knit_engine_docs, list_md_problems, naive_Bayes, pls, poisson_reg, rule_fit, set_tf_seed, tune, update_model_info_file - 0.1.72021-07-21 · diff ↗ ·
added 13 exports
.check_glmnet_penalty_fit, .check_glmnet_penalty_predict, .convert_form_to_xy_fit, .convert_form_to_xy_new, .convert_xy_to_form_fit, .convert_xy_to_form_new, .organize_glmnet_pred, extract_fit_engine, extract_spec_parsnip, find_engine_files, gen_additive_mod, make_engine_list, make_seealso_list - 0.1.62021-05-27 · diff ↗ ·
added 11 exports
predict_hazard.model_fit, predict_linear_pred, predict_linear_pred.model_fit, predict_survival, predict_survival.model_fit, predict_time, predict_time.model_fit, proportional_hazards, required_pkgs, survival_reg, svm_linear - RR 4.1.0 released · 2021-05-18
- 0.1.5
- 0.1.42020-10-27 · diff ↗ ·
added 7 exports
make_call, maybe_data_frame, maybe_matrix, min_cols, min_rows, prepare_data, show_engines - 0.1.3
- 0.1.22020-07-03 · diff ↗ ·
removed 1 export
convert_argsadded 5 exports
contr_one_hot, get_encoding, repair_call, req_pkgs, set_encoding - 0.1.1
- RR 4.0.0 released · 2020-04-24
- 0.1.02020-04-09 · diff ↗ ·
added 11 exports
convert_args, convert_stan_interval, eval_args, predict_class.model_fit, predict_classprob.model_fit, predict_confint.model_fit, predict_numeric, predict_numeric.model_fit, predict_quantile.model_fit, predict_raw.model_fit, translate.default - 0.0.52020-01-07 · diff ↗ ·
added 7 exports
check_final_param, is_varying, new_model_spec, null_value, show_fit, update_dot_check, update_main_parameters - 0.0.42019-11-02 · diff ↗ ·
removed 7 exports
min_grid, min_grid.boost_tree, min_grid.linear_reg, min_grid.logistic_reg, min_grid.mars, min_grid.multinom_reg, min_grid.nearest_neighboradded 1 export
control_parsnip - 0.0.3.12019-08-06 · diff ↗
- 0.0.32019-07-31 · diff ↗ ·
added 26 exports
add_rowindex, get_dependency, get_fit, get_from_env, get_model_env, get_pred_type, has_multi_predict, min_grid, min_grid.boost_tree, min_grid.linear_reg, min_grid.logistic_reg, min_grid.mars, min_grid.multinom_reg, min_grid.nearest_neighbor, multi_predict_args, pred_value_template, set_dependency, set_env_val, set_fit, set_in_env, set_model_arg, set_model_engine, set_model_mode, set_new_model, set_pred, show_model_info - RR 3.6.0 released · 2019-04-26
- 0.0.22019-03-22 · diff ↗ ·
removed 17 exports
predict_class, predict_class.model_fit, predict_classprob, predict_classprob.model_fit, predict_confint, predict_confint.model_fit, predict_numeric, predict_numeric.model_fit, predict_predint, predict_predint.model_fit, predict_quantile, predict_quantile.model_fit, predict_raw, predict_raw.model_fit, varying_args.model_spec, varying_args.recipe, varying_args.stepadded 3 exports
null_model, nullmodel, tidy.model_fit - 0.0.12018-11-12
- RR 3.5.0 released · 2018-04-23
Package metadata
- First published
- 2018-11-12
- Total releases
- 34 / 8 yrs
- License
- MIT + file LICENSE OSI · relicensed from GPL-2 in 0.1.6
- Minimum R
- ≥ 4.1
- Bundled data
- 3.6 KB / 1 file
- Download size
- 864 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("parsnip")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-17, which the citation names so these numbers can be found later. More on citing and the projects behind them.