parsnip 1.1.0
This release of parsnip contains a number of new features and bug fixes, accompanied by several optimizations that substantially decrease the time to fit()
and predict()
with the package.
Improvements to "glmnet"
engine interfaces
-
glmnet models fitted with base-R family objects are now supported for
linear_reg()
,logistic_reg()
, andmultinomial_reg()
(#890). -
multi_predict()
methods forlinear_reg()
,logistic_reg()
, andmultinom_reg()
models fitted with the"glmnet"
engine now check thetype
better and error accordingly (#900). -
.organize_glmnet_pred()
now expects predictions for a single penalty value (#876).
Survival analysis
-
The
time
argument topredict_survival()
andpredict_hazard()
is deprecated in favor of the neweval_time
argument (#936). -
Added several internal functions (to help work with
Surv
objects) as a standalone file that can be used in other packages viausethis::use_standalone("tidymodels/parsnip")
. These changes provide tooling for downstream packages to handle inverse probability censoring weights (#893, #897, #937). -
An internal method for generating inverse probability of censoring weights (IPCW) of Graf et al (1999) is available via
.censoring_weights_graf()
.
Bug fixes
-
Made
fit()
behave consistently with respect to missingness in the classification setting. Previously,fit()
erroneously raised an error about the class of the outcome when there were no complete cases, and now always passes along complete cases to be handled by the modeling function (#888). -
Fixed bug where model fits with
engine = "earth"
would fail when the package's namespace hadn't been attached (#251). -
Fixed bug where model fits with factor predictors and
engine = "kknn"
would fail when the package's namespace hadn't been attached (#264). -
Fixed bug with prediction from a boosted tree model fitted with
"xgboost"
using a custom objective function (#875).
Other changes
-
Implemented a number of optimizations in parsnip's backend that substantially decrease evaluation time to
fit()
andpredict()
(#901, #902, #910, #921, #929, #923, #931, #932, #933). -
logistic_reg()
will now warn atfit()
when the outcome has more than two levels (#545). -
Rather than being implemented in each method, the check for the
new_data
argument being mistakenly passed asnewdata
tomulti_predict()
now happens in the generic. Packages re-exporting themulti_predict()
generic and implementing now-duplicate checks may see new failures and can remove their own analogous checks. This check already existed in allpredict()
methods (viapredict.model_fit()
) and all parsnipmulti_predict()
methods (#525). -
Functions now indicate what class the outcome was if the outcome is the wrong class (#887).
-
The minimum version for R is now 3.5 (#926).
-
Moved forward with the deprecation of
req_pkgs()
in favor ofrequired_pkgs()
. The function will now error (#871). -
Transitioned all soft-deprecations that were at least a year old to warn-deprecations. These changes apply to
fit_control()
,surv_reg()
,varying()
,varying_args()
, and the"liquidSVM"
engine. -
Various bug fixes and improvements to documentation.