Releases: tidymodels/parsnip
parsnip 1.5.0
Quantile Regression
-
Quantile levels are not dropped when a model specification is modified (#1304)
-
xgboost and qrnn engines were added for quantile regression to
boost_tree()andmlp(), respectively. (#1321)
Ordinal Regression
The changes in this section are discussed in #1298.
-
A new model
ordinal_reg()is introduced for ordinal regression (#953):- Its sole mode is
"classification"and its default engine is"polr"forMASS::polr(). - Additional engines
"ordinalNet"forordinalNet::ordinalNet()and"vglm"forVGAM::vglm()are documented. - In addition to
penaltyandmixturecommon to GLM models, two new model parameters are introduced:ordinal_linkandodds_link. - Methods are written for
translate(),update(),check_args(), andtunable(). - Existing pan-model tests are extended and new model-specific tests are added.
- Its sole mode is
-
New engines for ordinal prediction are documented:
"vgam"forVGAM::vgam()undergen_additive_mod()"rpartScore"forrpartScore::rpartScore()underdecision_tree()"ordinalForest"forordinalForest::ordfor()underrand_forest()
-
Engine arguments for the new ordinal prediction engines are documented.
-
Ordinal prediction tools are coordinated with new parameter tuners in dials and engines in ordered.
Bug Fixes
-
fit()with a formula now reliably drops rows with missing values during internal data conversion, regardless of the globaloptions(na.action = ...)setting (#548). -
Fixed a bug in random forest fits using the
"aorsf"engine where the check formtrycould not be performed (#1276) -
repair_call()now errors informatively when given an object that is not a fitted parsnip model (#598). -
Fix bug in predicting class probabilities for multiclass earth models (#1334)
-
set_engine()now errors informatively when an invalid engine name is specified for models whose engines all come from extension packages (#1110). -
Case weight usage was enabled for the
"nnet"engines ofmlp()andbag_mlp()as well as for the"dbarts"engine ofbart().
Other Updates
-
For developers,
format_predictions()is a new unified function for formatting prediction outputs, consolidating the logic from the individualformat_*()functions (#927). The individual functionsformat_num(),format_class(),format_classprobs(),format_time(),format_survival(),format_linear_pred(), andformat_hazard()are now deprecated. -
The interface for declaring tunable parameters and any deviations for the standard parameter characteristics, has been simplified. These values can now be set inside of extension packages (#1349).
-
Documentation for the lightgbm engine now includes information about custom objective functions and automatic
num_classhandling (#1275). -
The "Fitting and predicting with parsnip" article has moved to tidymodels.org (#1324).
-
All model details files note whether case weights can be used or not.
-
We now export the generics for
predict_quantile(),predict_class(),predict_classprob(), andpredict_hazard(). (#1257)
parsnip 1.4.1
- Fixed bug where xgboost mdoels would fail to predict when
treesmatched number of trees in model. (#1316)
parsnip 1.4.0
-
Fixes issue with running predictions for Decision Trees in Spark (#1309)
-
Updates to some boosting tuning parameter information: (#1306)
- lightgbm and catboost have smaller default ranges for the learning rate: -3 to -1 / 2 in log10 units.
- lightgbm, xgboost, catboost, and C5.0 have smaller default ranges for the sampling proportion: 0.5 to 1.0.
- catboost engine arguments were added for
max_leavesandl2_leaf_reg.
-
Enable generalized random forest (
grf) models for classification, regression, and quantile regression modes. (#1288) -
surv_reg()is now defunct and will error if called. Please usesurvival_reg()instead (#1206). -
Enable parsnip to work with xgboost version > 2.0.0.0. (#1227)
parsnip 1.3.3
-
Bug fix in how tunable parameters were configured for brulee neural networks.
-
A change to make linear SVM models more quiet.
-
A few default parameter ranges were changed for brulee neural network models.
parsnip 1.3.2
-
Switch to base R pipe
-
Requires changes for CRAN's "No Suggests" check.
-
Avoid issues with reading from package files. (#1271)
parsnip 1.3.1
Bug Fixes
- Fixed a bug that errored when tidying a glmnet object with a penalty value greater than one (#1261).
parsnip 1.3.0
New Features
-
A new model mode (
"quantile regression") was added. Including:- A
linear_reg()engine for"quantreg". - Predictions are encoded via a custom vector type. See [hardhat::quantile_pred()].
- Predicted quantile levels are designated when the new mode is specified. See
?set_mode.
- A
-
Updates for sparse data formats:
-
New
extract_fit_time()method has been added that returns the time it took to train the model (#853). -
mlp()withkerasengine now work for all activation functions currently supported bykeras(#1127). -
mlp()now has abrulee_two_layerengine.
Other Changes
-
Transitioned package errors and warnings to use cli (#1147 and #1148 by @shum461, #1153 by @RobLBaker and @wright13, #1154 by @JamesHWade, #1160, #1161, #1081).
-
fit_xy()currently raises an error forgen_additive_mod()model specifications as the default engine ("mgcv") specifies smoothing terms in model formulas. However, some engines specify smooths via additional arguments, in which case the restriction onfit_xy()is excessive. parsnip will now only raise an error when fitting agen_additive_mod()withfit_xy()when using the"mgcv"engine (#775). -
Aligned
null_model()with other model types; the model type now has an engine argument that defaults to"parsnip"and is checked with the same machinery that checks other model types in the package (#1083). -
If linear regression is requested with a Poisson family, an error will occur and refer the user to
poisson_reg()(#1219). -
The deprecated function
rpart_train()was removed after its deprecation period (#1044).
Bug Fixes
-
Make sure that parsnip does not convert ordered factor predictions to be unordered.
-
Ensure that
knit_engine_docs()has the required packages installed (#1156). -
Fixed bug where some models fit using
fit_xy()couldn't predict (#1166). -
Fixed bug related to using local (non-package) models (#1229)
-
tunable()now references a dials object for themixtureparameter (#1236)
Breaking Change
-
For quantile prediction, the
quantileargument topredict()has been deprecate in facor ofquantile_levels. This does not affect models with mode"quantile regression". -
The quantile regression prediction type was disabled for the deprecated
surv_reg()model. -
NULLis no longer accepted as an engine (#1242).
parsnip 1.2.1
parsnip 1.2.0
Bug Fixes
-
Tightened logic for outcome checking. This resolves issues—some errors and some silent failures—when atomic outcome variables have an attribute (#1060, #1061).
-
Fixed bug in fitting some model types with the
"spark"engine (#1045). -
Fixed issues in metadata for the
"brulee"engine where several arguments were mistakenly protected. (#1050, #1054) -
Fixed documentation for
mlp(engine = "brulee"): the default values forlearn_rateandepochswere swapped (#1018). -
Fixed a bug in the integration with workflows where using a model formula with a formula preprocessor could result in a double intercept (#1033).
Other Changes
-
We no longer add
eval_timearguments to the prediction specification for the engine (#1039). -
parsnip now lets the engines for [mlp()] check for acceptable values of the activation function (#1019)
-
rpart_train()has been deprecated in favor of usingdecision_tree()with the"rpart"engine orrpart::rpart()directly (#1044). -
.filter_eval_time()was moved to the survival standalone file. -
Improved errors and documentation related to special terms in formulas. See
?model_formulato learn more. (#770, #1014) -
Improved errors in cases where the outcome column is mis-specified. (#1003)
-
The
new_dataargument for thepredict()method forcensoring_model_reverse_kmobjects has been deprecated (#965). -
When computing censoring weights, the resulting vectors are no longer named (#1023).
-
The
predict()method forcensoring_model_reverse_kmobjects now checks that...are empty (#1029).
parsnip 1.1.1
-
Fixed bug where prediction on rank deficient
lm()models produced.pred_resinstead of.pred. (#985) -
Fixed bug where sparse data was being coerced to non-sparse format doing
predict(). -
For BART models with the
dbartsengine,predict()can now also return the standard error for confidence and prediction intervals (#976). -
augment()now works for censored regression models. -
A few censored regression helper functions were exported:
.extract_surv_status()and.extract_surv_time()(#973, #980). -
Fixed bug where
boost_tree()models couldn't be fit with 1 predictor ifvalidationargument was used. (#994)