Recent Releases of stacks
stacks - stacks 1.1.1
- A re-release of stacks 1.1.0 to address a note to resubmit following a since-resolved check failure.
Scientific Software - Peer-reviewed
- R
Published by simonpcouch about 1 year ago
stacks - stacks 1.1.0
Model stack and data stack print methods no longer raise conditions to print to the console (#228).
Added missing commas and addressed formatting issues throughout the vignettes and articles. Backticks for package names were removed and missing parentheses for functions were added (@Joscelinrocha, #218).
Increased the minimum R version to R 4.1.
Transitioned support for parallel processing fully to the future framework. Parallelism backends registered with foreach will be ignored with a warning (#234).
Scientific Software - Peer-reviewed
- R
Published by simonpcouch about 1 year ago
stacks - stacks 1.0.5
Addressed inflation of butchered model stack object size after saving and reloading (#214).
Fixed type-checking bug for
add_candidates(name).
Scientific Software - Peer-reviewed
- R
Published by simonpcouch almost 2 years ago
stacks - stacks 1.0.4
Introduced support for parallel processing using the future framework. The stacks package previously supported parallelism with foreach, and users can use either framework for now. In a future release, stacks will begin the deprecation cycle for parallelism with foreach, so we encourage users to begin migrating their code now. See the Parallel Processing section in the tune package's "Optimizations" article to learn more (#866).
Improved error message for unsupported model modes (#152).
Scientific Software - Peer-reviewed
- R
Published by simonpcouch about 2 years ago
stacks - stacks 1.0.3
Refine package alt text (#202).
Update example objects, resolving deprecation warnings from recipes (#203).
Fix bug in type checking for
blend_predictions(mixture)(#204).Resolve package-level documentation aliasing notice from CRAN.
Scientific Software - Peer-reviewed
- R
Published by simonpcouch over 2 years ago
stacks - stacks 1.0.2
Added an
augment()method formodel_stackobjects for compatibility with vetiver (#173).Converted all character variables in the
tree_frogsexample data to factor and updated downstream example objects (#177).Fixed bug that resulted in errors when using model formulas with the
"mgcv"engine (#193).Made several optimizations to reduce evaluation time and memory allocation when stacking.
Various bug fixes and improvements to documentation.
Scientific Software - Peer-reviewed
- R
Published by simonpcouch about 3 years ago
stacks - stacks 1.0.1
Tightened integration with the workflowsets package (#161, #165).
- Refined logic with adding candidates via workflowsets to allow for partially trained workflow sets. In the case that a workflow set contains some failed tuning results, stacks will inform the user that they will be excluded from the data stack and only add the results that trained successfully.
- Extended documentation related to the packages' interactions, including a new article on the package website.
Revamped errors, warnings, and messages. Prompts now provide more thorough context about where they arose, include more extensive references to documentation, and are correctly pluralized (#150, #167).
blend_predictions()doesn't error anymore if thecontrolargument isn't acontrol_gridobject. As long as the list passed tocontrolinclude the same elements ascontrol_grid()output,parsnip::condense_control()will handle input (#149).Removes an unneeded data import attribute from the
tree_frogsexample data and its associated objects (#148).Various bug fixes and improvements to documentation.
Scientific Software - Peer-reviewed
- R
Published by simonpcouch over 3 years ago
stacks - stacks 1.0.0
stacks 1.0.0 is the first production release of the package. While this release includes only a few minor bug fixes, it's accompanied by a white paper recently published in the Journal of Open Source software. You can read that paper here!
This release:
- Addresses re-introduction of a bug arising from outcome levels that are not valid column names in the multinomial classification setting (#133).
- Fixes bug where stacks will return incorrect predictions if an elastic net
meta-learner is used, the
typeargument topredictis set to"class", and the outcome levels differ from alphabetical order. - Transitions package internals from functions deprecated from the recipes package.
Scientific Software - Peer-reviewed
- R
Published by simonpcouch almost 4 years ago
stacks - stacks 0.2.4
This is a GitHub-only release and does not reflect CRAN source code. This update includes a data-raw/paper subdirectory containing source for a contributed paper to the Journal of Open Source Software.
Scientific Software - Peer-reviewed
- R
Published by simonpcouch almost 4 years ago
stacks - stacks 0.2.3
While stacks 0.2.3 is a minor release, it includes a number of significant user experience improvements. This release adds an option to significantly reduce runtime for prediction blending, makes errors and warnings more informative, and greatly reduces the size of reloaded model objects in memory.
Regarding that first point, take a look at how adjusting the times argument in blend_predictions drastically affects its runtime:
```r library(tidymodels) library(modeldata)
using a version of the package where times is a param
library(stacks)
data("lending_club")
set.seed(1) lendingclub <- samplen(lending_club, 1000)
folds <- vfoldcv(lendingclub, v = 5)
lrmod <- linearreg(penalty = tune(), mixture = tune()) %>% setengine("glmnet") %>% workflow( preprocessor = fundedamnt ~ intrate + totalbalil, spec = . ) %>% tunegrid( resamples = folds, control = controlstackgrid(), grid = 10 )
system.time( stacks() %>% addcandidates(lrmod) %>% blend_predictions(times = 25) )
> user system elapsed
> 10.280 0.112 10.550
system.time( stacks() %>% addcandidates(lrmod) %>% blend_predictions(times = 10) )
> user system elapsed
> 4.424 0.050 4.554
system.time( stacks() %>% addcandidates(lrmod) %>% blend_predictions(times = 4) )
> user system elapsed
> 2.158 0.018 2.194
```
Related to the second point, there are several different degrees and varieties of tuning "failure" that result in stacks tripping up during model stacking. The package now inspects its inputs more closely and may give you a heads up when you might run into issues later on. Look out for warnings like:
```r
> Warning message:
> The inputted candidates argument my_tuning_results generated notes during tuning/resampling.
> Model stacking may fail due to these issues; see ?collect_notes if so.
```
And, finally, related to model stack object size, check out the the results of butcher::weigh on the results like the above reprex (after saving and reloading) before and after this release:
```r weigh(lrstackbefore)
> # A tibble: 374 × 2
> object size
>
> 1 coefs.preproc.terms 2.64
> 2 coefs.fit.call 2.64
> 3 coefs.spec.eng_args.lower.limits 2.64
> 4 coefs.spec.method.fit.args.lower.limits 2.64
> 5 coefs.spec.method.pred.numeric.post 1.76
> 6 memberfits.lrmod13.fit.fit.spec.method.pred.numeric.post 1.76
> 7 memberfits.lrmod11.fit.fit.spec.method.pred.numeric.post 1.76
> 8 memberfits.lrmod13.pre.actions.formula.blueprint.mold.process 0.0172
> 9 memberfits.lrmod13.pre.mold.blueprint.mold.process 0.0172
> 10 memberfits.lrmod11.pre.actions.formula.blueprint.mold.process 0.0172
> # … with 364 more rows
weigh(lrstackafter)
> # A tibble: 374 × 2
> object size
>
> 1 coefs.preproc.terms 24.7
> 2 coefs.fit.call 24.7
> 3 coefs.spec.eng_args.lower.limits 24.7
> 4 coefs.spec.method.fit.args.lower.limits 24.7
> 5 coefs.spec.method.pred.numeric.post 1.79
> 6 memberfits.lrmod13.fit.fit.spec.method.pred.numeric.post 1.79
> 7 memberfits.lrmod11.fit.fit.spec.method.pred.numeric.post 1.79
> 8 memberfits.lrmod13.pre.actions.formula.blueprint.mold.process 0.0172
> 9 memberfits.lrmod13.pre.mold.blueprint.mold.process 0.0172
> 10 memberfits.lrmod11.pre.actions.formula.blueprint.mold.process 0.0172
> # … with 364 more rows
```
Read more about these changes and their implementations at the issues linked below.🐧
Changelog
- Addressed deprecation warning in
add_candidates(#99). - Improved clarity of warnings/errors related to failed hyperparameter tuning and resample fitting (#110).
- Reduced model stack object size and fixed bug where object size of model stack inflated drastically after saving to file (#116). Also, regenerated example objects with this change--saved model objects may need to be regenerated in order to interface with newer versions of the package.
- Introduced a
timesargument toblend_predictionsthat is passed on torsample::bootstrapswhen fitting stacking coefficients. Reducing this argument from its default (25) greatly reduces the run time ofblend_predictions(#94). - The package will now load packages necessary for model fitting at
fit_members(), if available, and fail informatively if not (#118). - Fixed bug where meta-learner tuning would fail with outcome names and levels including the string
"class"(#125). - The package will now warn when unused dots are passed to any of the core functions (#127).
Scientific Software - Peer-reviewed
- R
Published by simonpcouch about 4 years ago
stacks - stacks 0.2.2
- Fixed errors arising from outcome levels that are not valid column names in the multinomial classification setting.
- Fixed
collect_parametersfailing to return stacking coefficients in the two-class classification setting. - Regenerated example objects with updated {rsample} fingerprinting--saved model objects may need to be regenerated in order to build stacks combining models generated before and after this update.
- Various other bug fixes and improvements to documentation.
Scientific Software - Peer-reviewed
- R
Published by simonpcouch over 4 years ago
stacks - stacks 0.2.1
- Updates for importing workflow sets that use the
add_variables()preprocessor. - Plot fixes for cases where coefficients are negative.
- Performance and member plots now show the effect of multiple mixture values.
- Package diagrams now have alt text.
- Various bug fixes and improvements to documentation.
Scientific Software - Peer-reviewed
- R
Published by simonpcouch almost 5 years ago
stacks - stacks 0.2.0
This release integrates the package more closely with the tidymodels ecosystem, including support for finetune and workflowsets. It also introduces support for fitting ensembles with an elastic net and features a number of bug fixes and other improvements.
Breaking changes
This release of the package changes some elements of the internal structure of model stacks. As such, model stacks stored as saved objects will need to be regenerated before predicting, plotting, printing, etc.
New features
- The package now supports elastic net models as a meta-learner via
the
mixtureargument toblend_predictions. - The package can now add candidates from
workflow_mapobjects from the new {workflowsets} package. The interface toadd_candidatesfor doing so is the same as withtune_resultsobjects, andadd_candidatesis now a generic function. - Objects tuned with racing methods from the {finetune} package can now be added as candidate members.
Bug fixes
- Fixed bug in determining member hyperparameters during member fitting when using non-RMSE/ROC AUC metrics.
- Fixed bug arising from model definition names that are not valid column
names. The package will now message in the case that the provided names
are not valid column names and use
make.namesfor associated candidate members.
Miscellaneous improvements
- Drop {digest} dependency in favor of {tune}/{rsample} "fingerprinting" to check consistency of resamples.
fit_members()will now warn when supplied a model stack whose members have already been fitted.- Integrate with {tune} functionality for appropriately coloring errors, warnings, and messages.
- Improved faceting and axis scales to make
autoplotwithtype = "members"more informative. - Various improvements to documentation.
Scientific Software - Peer-reviewed
- R
Published by simonpcouch about 5 years ago
stacks - stacks 0.1.0
Initial release on CRAN!
Scientific Software - Peer-reviewed
- R
Published by simonpcouch over 5 years ago