Skip to content

Commit

Permalink
merge pr #86: v0.2.1 release candidate
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch committed Jul 23, 2021
2 parents 7db8d82 + dd85dfe commit 0b6306d
Show file tree
Hide file tree
Showing 45 changed files with 1,169 additions and 1,160 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: stacks
Title: Tidy Model Stacking
Version: 0.2.0.9000
Version: 0.2.1
Authors@R: c(
person(given = "Simon",
family = "Couch",
Expand Down
25 changes: 8 additions & 17 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
# stacks

## v0.2.0.9000

To be released as 0.2.1

* Various bug fixes and improvements to documentation.

### Bug fixes
# v0.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.

## v0.2.0
# v0.2.0

### Breaking changes
## 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
## New features

* The package now supports elastic net models as a meta-learner via
the `mixture` argument to `blend_predictions`.
Expand All @@ -34,7 +25,7 @@ be regenerated before predicting, plotting, printing, etc.
* Objects tuned with racing methods from the {finetune} package can now be
added as candidate members.

### Bug fixes
## Bug fixes

* Fixed bug in determining member hyperparameters during member
fitting when using non-RMSE/ROC AUC metrics.
Expand All @@ -43,7 +34,7 @@ be regenerated before predicting, plotting, printing, etc.
are not valid column names and use `make.names` for associated candidate
members.

### Miscellaneous improvements
## Miscellaneous improvements

* Drop {digest} dependency in favor of {tune}/{rsample} "fingerprinting"
to check consistency of resamples.
Expand All @@ -55,6 +46,6 @@ be regenerated before predicting, plotting, printing, etc.
more informative.
* Various improvements to documentation.

### v0.1.0
# v0.1.0

Initial release!
4 changes: 2 additions & 2 deletions R/add_candidates.R
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ add_candidates.default <- function(data_stack, candidates, name, ...) {
.set_mode_ <- function(stack, candidates, name) {
wf_spec <-
attr(candidates, "workflow") %>%
workflows::pull_workflow_spec()
workflows::extract_spec_parsnip()

new_mode <- wf_spec$mode
old_mode <- attr(stack, "mode")
Expand Down Expand Up @@ -363,7 +363,7 @@ update_stack_data <- function(stack, new_data) {
stack_workflow <- function(x) {
res <-
workflows::workflow() %>%
workflows::add_model(workflows::pull_workflow_spec(x))
workflows::add_model(workflows::extract_spec_parsnip(x))

pre <- workflows::pull_workflow_preprocessor(x)

Expand Down
2 changes: 1 addition & 1 deletion R/print.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ top_coefs <- function(x, penalty = x$penalty$penalty, n = 10) {
sub_models <-
purrr::map_dfr(x$cols_map, ~ tibble::tibble(terms = .x), .id = "model_name")
model_types <-
purrr::map(x$model_defs, workflows::pull_workflow_spec) %>%
purrr::map(x$model_defs, workflows::extract_spec_parsnip) %>%
purrr::map_dfr(~ tibble::tibble(model_type = class(.x)[1]), .id = "model_name")
res <-
dplyr::left_join(betas, sub_models, by = "terms") %>%
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ stacks is generalized with respect to:
* Cross-validation scheme: Any resampling algorithm implemented in [rsample](https://rsample.tidymodels.org/) or adjacent packages is fair game for resampling data for use in training a model stack.
* Error metric: Any metric function implemented in [yardstick](https://yardstick.tidymodels.org/) or adjacent packages is fair game for evaluating model stacks and their members. That package provides some infrastructure for creating your own metric functions as well!

stacks uses a regularized linear model to combine predictions from ensemble members, though this model type is only one of many possible learning algorithms that could be used to fit a stacked ensemble model. For implementations of additional ensemble learning algorithms, check out [h2o](http://docs.h2o.ai/h2o/latest-stable/h2o-r/docs/reference/h2o.stackedEnsemble.html) and [SuperLearner](https://CRAN.R-project.org/package=SuperLearner).
stacks uses a regularized linear model to combine predictions from ensemble members, though this model type is only one of many possible learning algorithms that could be used to fit a stacked ensemble model. For implementations of additional ensemble learning algorithms, check out [h2o](https://docs.h2o.ai/h2o/latest-stable/h2o-r/docs/reference/h2o.stackedEnsemble.html) and [SuperLearner](https://CRAN.R-project.org/package=SuperLearner).

Rather than diving right into the implementation, we'll focus here on how the pieces fit together, conceptually, in building an ensemble with `stacks`. See the `basics` vignette for an example of the API in action!

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ ensemble members, though this model type is only one of many possible
learning algorithms that could be used to fit a stacked ensemble model.
For implementations of additional ensemble learning algorithms, check
out
[h2o](http://docs.h2o.ai/h2o/latest-stable/h2o-r/docs/reference/h2o.stackedEnsemble.html)
[h2o](https://docs.h2o.ai/h2o/latest-stable/h2o-r/docs/reference/h2o.stackedEnsemble.html)
and [SuperLearner](https://CRAN.R-project.org/package=SuperLearner).

Rather than diving right into the implementation, we’ll focus here on
Expand Down
2 changes: 1 addition & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# stacks 0.2.0
# stacks 0.2.1

## Test environments

Expand Down
141 changes: 45 additions & 96 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0b6306d

Please sign in to comment.