Skip to content

Releases: tidymodels/parsnip

parsnip 0.2.0

09 Mar 13:07
e8fadbf
Compare
Choose a tag to compare

Model Specification Changes

  • Bayesian additive regression trees (BART) were added via the bart() function.

  • Added the "glm" engine for linear_reg() for numeric outcomes (#624).

  • Added brulee engines for linear_reg(), logistic_reg(), multinom_reg() and mlp().

Bug fixes

  • A bug for class predictions of two-class GAM models was fixed (#541)

  • Fixed a bug for logistic_reg() with the LiblineaR engine (#552).

  • The list column produced when creating survival probability predictions is now always called .pred (with .pred_survival being used inside of the list column).

  • Fixed outcome type checking affecting a subset of regression models (#625).

  • New extract_parameter_set_dials() method to extract parameter sets from model specs.

  • New extract_parameter_dials() method to extract a single parameter from model specs.

  • Prediction using multinom_reg() with the nnet engine with a single row no longer fails (#612).

Other Changes

  • When the xy interface is used and the underlying model expects to use a matrix, a better warning is issued when predictors contain non-numeric columns (including dates).

  • The fit time is only calculated when the verbosity argument of control_parsnip() is 2L or greater. Also, the call to system.time() now uses gcFirst = FALSE. (#611)

  • fit_control() is soft-deprecated in favor of control_parsnip().

  • Argument interval was added for prediction: For types "survival" and "quantile", estimates for the confidence or prediction interval can be added if available (#615).

  • set_dependency() now allows developers to create package requirements that are specific to the model's mode (#604).

  • varying() is soft-deprecated in favor of tune().

  • varying_args() is soft-deprecated in favor of tune_args().

  • An autoplot() method was added for glmnet objects, showing the coefficient paths versus the penalty values (#642).

  • parsnip is now more robust working with keras and tensorflow for a larger range of versions (#596).

  • xgboost engines now use the new iterationrange parameter instead of the deprecated ntreelimit (#656).

Developer

  • Models information can be re-registered as long as the information being registered is the same. This is helpful for packages that add new engines and use devtools::load_all() (#653).

parsnip 0.1.7

21 Jul 13:01
410709f
Compare
Choose a tag to compare

Model Specification Changes

  • A model function (gen_additive_mod()) was added for generalized additive models.

  • Each model now has a default engine that is used when the model is defined. The default for each model is listed in the help documents. This also adds functionality to declare an engine in the model specification function. set_engine() is still required if engine-specific arguments need to be added. (#513)

  • parsnip now checks for a valid combination of engine and mode (#529)

  • The default engine for multinom_reg() was changed to nnet.

Other Changes

  • The helper functions .convert_form_to_xy_fit(), .convert_form_to_xy_new(), .convert_xy_to_form_fit(), and .convert_xy_to_form_new() for converting between formula and matrix interface are now exported for developer use (#508).

  • Fix bug in augment() when non-predictor, non-outcome variables are included in data (#510).

parsnip 0.1.6

27 May 16:58
Compare
Choose a tag to compare

Model Specification Changes

  • A new linear SVM model svm_linear() is now available with the LiblineaR engine (#424) and the kernlab engine (#438), and the LiblineaR engine is available for logistic_reg() as well (#429). These models can use sparse matrices via fit_xy() (#447) and have a tidy method (#474).

  • For models with glmnet engines:

    • A single value is required for penalty (either a single numeric value or a value of tune()) (#481).
    • A special argument called path_values can be used to set the lambda path as a specific set of numbers (independent of the value of penalty). A pure ridge regression models (i.e., mixture = 1) will generate incorrect values if the path does not include zero. See issue #431 for discussion (#486).
  • The liquidSVM engine for svm_rbf() was deprecated due to that package's removal from CRAN. (#425)

  • The xgboost engine for boosted trees was translating mtry to xgboost's colsample_bytree. We now map mtry to colsample_bynode since that is more consistent with how random forest works. colsample_bytree can still be optimized by passing it in as an engine argument. colsample_bynode was added to xgboost after the parsnip package code was written. (#495)

  • For xgboost, mtry and colsample_bytree can be passed as integer counts or proportions, while subsample and validation should always be proportions. xgb_train() now has a new option counts (TRUE or FALSE) that states which scale for mtry and colsample_bytree is being used. (#461)

Other Changes

  • Re-licensed package from GPL-2 to MIT. See consent from copyright holders here.

  • set_mode() now checks if mode is compatible with the model class, similar to new_model_spec() (@jtlandis, #467). Both set_mode() and set_engine() now error for NULL or missing arguments (#503).

  • Re-organized model documentation for update methods (#479).

  • generics::required_pkgs() was extended for parsnip objects.

  • Prediction functions now give a consistent error when a user uses an unavailable value of type (#489)

  • The augment() method was changed to avoid failing if the model does not enable class probabilities. The method now returns tibbles despite the input data class (#487) (#478)

  • xgboost engines now respect the event_level option for predictions (#460).

parsnip 0.1.5

19 Jan 21:56
Compare
Choose a tag to compare
  • An RStudio add-in is availble that makes writing multiple parsnip model specifications to the source window. It can be accessed via the IDE addin menus or by calling parsnip_addin().

  • For xgboost models, users can now pass objective to set_engine("xgboost"). (#403)

  • Changes to test for cases when CRAN cannot get xgboost to work on their Solaris configuration.

  • There is now an augument() method for fitted models. See augment.model_fit. (#401)

  • Column names for x are now required when fit_xy() is used. (#398)

parsnip 0.1.4

28 Oct 01:04
e517880
Compare
Choose a tag to compare
  • show_engines() will provide information on the current set for a model.

  • For three models (glmnet, xgboost, and ranger), enable sparse matrix use via fit_xy() (#373).

  • Some added protections were added for function arguments that are dependent on the data dimensions (e.g., mtry, neighbors, min_n, etc). (#184)

  • Infrastructure was improved for running parsnip models in parallel using PSOCK clusters on Windows.

parsnip 0.1.3

04 Aug 23:23
Compare
Choose a tag to compare
  • A glance() method for model_fit objects was added (#325)

  • Specific tidy() methods for glmnet models fit via parsnip were created so that the coefficients for the specific fitted parsnip model are returned.

Fixes

  • glmnet models were fitting two intercepts (#349)

  • The various update() methods now work with engine-specific parameters.

parsnip 0.0.5

07 Jul 20:49
a469d0a
Compare
Choose a tag to compare

Fixes

  • A bug (#206 and #234) was fixed that caused an error when predicting with a multinomial glmnet model.

Other Changes

  • glmnet was removed as a dependency since the new version depends on 3.6.0 or greater. Keeping it would constrain parsnip to that same requirement. All glmnet tests are run locally.

  • A set of internal functions are now exported. These are helpful when creating a new package that registers new model specifications.

New Features

  • nnet was added as an engine to multinom_reg() #209

Breaking Changes

  • There were some mis-mapped parameters (going between parsnip and the underlying model function) for spark boosted trees and some keras models. See 897c927.

parsnip 0.1.2

03 Jul 17:22
Compare
Choose a tag to compare

Breaking Changes

  • parsnip now has options to set specific types of predictor encodings for different models. For example, ranger models run using parsnip and workflows do the same thing by not creating indicator variables. These encodings can be overridden using the blueprint options in workflows. As a consequence, it is possible to get a different model fit that previous versions of parsnip. More details about specific encoding changes are below. (#326)

Other Changes

  • tidyr >= 1.0.0 is now required.

  • SVM models produced by kernlab now use the formula method (see breaking change notice above). This change was due to how ksvm() made indicator variables for factor predictors (with one-hot encodings). Since the ordinary formula method did not do this, the data are passed as-is to ksvm() so that the results are closer to what one would get if ksmv() were called directly.

  • MARS models produced by earth now use the formula method.

  • For xgboost, a one-hot encoding is used when indicator variables are created.

  • Under-the-hood changes were made so that non-standard data arguments in the modeling packages can be accommodated. (#315)

New Features

  • A new main argument was added to boost_tree() called stop_iter for early stopping. The xgb_train() function gained arguments for early stopping and a percentage of data to leave out for a validation set.

  • If fit() is used and the underlying model uses a formula, the actual formula is pass to the model (instead of a placeholder). This makes the model call better.

  • A function named repair_call() was added. This can help change the underlying models call object to better reflect what they would have obtained if the model function had been used directly (instead of via parsnip). This is only useful when the user chooses a formula interface and the model uses a formula interface. It will also be of limited use when a recipes is used to construct the feature set in workflows or tune.

  • The predict() function now checks to see if required modeling packages are installed. The packages are loaded (but not attached). (#249) (#308) (tidymodels/workflows#45)

  • The function req_pkgs() is a user interface to determining the required packages. (#308)

parsnip 0.1.1

26 May 23:57
Compare
Choose a tag to compare

New Features

  • liquidSVM was added as an engine for svm_rbf() (#300)

Fixes

  • The error message for missing packages was fixed (#289 and #292)

Other Changes

  • S3 dispatch for tidy() was broken on R 4.0.

parsnip 0.1.0

09 Apr 15:01
Compare
Choose a tag to compare
  • Release for enabling more parsnip-adjacent packages.

  • Stan models no longer generate output when fit. Use the refresh option when setting the engine to change this.

  • Data sets have been moved to the modeldata package.