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).