Releases: tidymodels/parsnip
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_rate
andepochs
were 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_time
arguments 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_formula
to learn more. (#770, #1014) -
Improved errors in cases where the outcome column is mis-specified. (#1003)
-
The
new_data
argument for thepredict()
method forcensoring_model_reverse_km
objects has been deprecated (#965). -
When computing censoring weights, the resulting vectors are no longer named (#1023).
-
The
predict()
method forcensoring_model_reverse_km
objects now checks that...
are empty (#1029).
parsnip 1.1.1
-
Fixed bug where prediction on rank deficient
lm()
models produced.pred_res
instead of.pred
. (#985) -
Fixed bug where sparse data was being coerced to non-sparse format doing
predict()
. -
For BART models with the
dbarts
engine,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 ifvalidation
argument was used. (#994)
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.
parsnip 1.0.4
-
For censored regression models, a "reverse Kaplan-Meier" curve is computed for the censoring distribution. This can be used when evaluating this type of model (#855).
-
The model specification methods for
generics::tune_args()
and
generics::tunable()
are now registered unconditionally (tidymodels/workflows#192).
parsnip 1.0.3
-
Adds documentation and tuning infrastructure for the new
flexsurvspline
engine for thesurvival_reg()
model specification from thecensored
package (@mattwarkentin, #831). -
The matrix interface for fitting
fit_xy()
now works for the"censored regression"
mode (#829). -
The
num_leaves
argument ofboost_tree()
slightgbm
engine (via the bonsai package) is now tunable. -
A change in our data checking code resulted in about a 3-fold speed-up in parsnip (#835)
parsnip 1.0.2
-
A bagged neural network model was added (
bag_mlp()
). Engine implementations will live in the baguette package. -
Fixed installation failures due to undocumented knitr installation dependency (#785).
-
fit_xy()
now fails when the model mode is unknown. -
brulee engine-specific tuning parameters were updated. These changes can be used with dials version > 1.0.0.
-
fit()
andfit_xy()
doesn't error anymore ifcontrol
argument isn't acontrol_parsnip()
object. Will work as long as the object passed tocontrol
includes the same elements ascontrol_parsnip()
. -
Improved prompts related to missing (or not loaded) extension packages as well as better handling of model mode conflicts.
parsnip 1.0.1
- Enabled passing additional engine arguments with the xgboost
boost_tree()
engine. To supply engine-specific arguments that are documented inxgboost::xgb.train()
as arguments to be passed viaparams
, supply the list elements directly as named arguments toset_engine()
. Read more in?details_boost_tree_xgboost
(#787).
parsnip 1.0.0
Model Specification Changes
-
Enable the use of case weights for models that support them.
-
show_model_info()
now indicates which models can utilize case weights. -
Model type functions will now message informatively if a needed parsnip extension package is not loaded (#731).
-
Refactored internals of model specification printing functions. These changes are non-breaking for extension packages, but the new
print_model_spec()
helper is exported for use in extensions if desired (#739).
Bug fixes
-
Fixed bug where previously set engine arguments would propagate through
update()
methods despitefresh = TRUE
(#704). -
Fixed a bug where an error would be thrown if arguments to model functions were namespaced (#745).
-
predict(type = "prob")
will now provide an error if the outcome variable has a level called"class"
(#720). -
An inconsistency for probability type predictions for two-class GAM models was fixed (#708)
-
Fixed translated printing for
null_model()
(#752)
Other changes
-
Added a
glm_grouped()
function to convert long data to the grouped format required byglm()
for logistic regression. -
xgb_train()
now allows for case weights -
Added
ctree_train()
andcforest_train()
wrappers for the functions in the partykit package. Engines for these will be added to other parsnip extension packages. -
Exported
xgb_predict()
which wraps xgboost'spredict()
method for use with parsnip extension packages (#688). -
Added a developer function,
.model_param_name_key
that translates names of tuning parameters.
parsnip 0.2.1
-
Fixed a major bug in spark models induced in the previous version (#671).
-
Updated the parsnip add-in with new models and engines.
-
Updated parameter ranges for some
tunable()
methods and added a missing engine argument for brulee models. -
Added information about how to install the mixOmics package for PLS models (#680)