Skip to content

parsnip 1.3.0

Latest
Compare
Choose a tag to compare
@topepo topepo released this 14 Feb 12:14

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.
  • Updates for sparse data formats:

    • fit_xy() can now take dgCMatrix input for x argument (#1121).
    • fit_xy() can now take sparse tibbles as data values (#1165).
    • predict() can now take dgCMatrix and sparse tibble input for new_data argument, and error informatively when model doesn't support it (#1167).
  • New extract_fit_time() method has been added that returns the time it took to train the model (#853).

  • mlp() with keras engine now work for all activation functions currently supported by keras (#1127).

  • mlp() now has a brulee_two_layer engine.

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 for gen_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 on fit_xy() is excessive. parsnip will now only raise an error when fitting a gen_additive_mod() with fit_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 the mixture parameter (#1236)

Breaking Change

  • For quantile prediction, the quantile argument to predict() has been deprecate in facor of quantile_levels. This does not affect models with mode "quantile regression".

  • The quantile regression prediction type was disabled for the deprecated surv_reg() model.

  • NULL is no longer accepted as an engine (#1242).