Skip to content

Commit

Permalink
merge pr #95: regenerate example objects with new fingerprint
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch authored Jan 5, 2022
2 parents 2856fbb + abd189f commit 8b78f5a
Show file tree
Hide file tree
Showing 25 changed files with 72 additions and 82 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,25 @@ jobs:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: '3.6'}
- {os: ubuntu-16.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest", http-user-agent: "R/4.0.0 (ubuntu-16.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
- {os: windows-latest, r: 'oldrel-1'}
- {os: ubuntu-18.04, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-18.04, r: 'release'}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-pandoc@v1

- uses: r-lib/actions/setup-r@master
- uses: r-lib/actions/setup-r@v1
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}

- uses: r-lib/actions/setup-pandoc@master
use-public-rspm: true

- name: Query dependencies
run: |
Expand Down Expand Up @@ -70,6 +71,7 @@ jobs:
remotes::install_cran("vctrs")
remotes::install_cran("parsnip")
remotes::install_cran("tune")
remotes::install_cran("kknn")
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}
Expand Down
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ BugReports: https://github.com/tidymodels/stacks/issues
Depends:
R (>= 2.10)
Imports:
tune (>= 0.1.2.9000),
tune (>= 0.1.3),
dplyr (>= 1.0.0),
rlang (>= 0.4.0),
tibble (>= 2.1.3),
purrr (>= 0.3.2),
parsnip (>= 0.0.4),
workflows (>= 0.2.2),
recipes (>= 0.1.15),
rsample (>= 0.0.9),
workflowsets (>= 0.0.0.9001),
rsample (>= 0.1.1),
workflowsets (>= 0.1.0),
butcher (>= 0.1.3),
yardstick,
tidyr,
Expand All @@ -58,5 +58,5 @@ Suggests:
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.1.9001
RoxygenNote: 7.1.2
VignetteBuilder: knitr
4 changes: 2 additions & 2 deletions R/collect_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ collect_parameters.data_stack <- function(stack, candidates, ...) {
attributes(stack)$model_metrics,
candidates,
attributes(stack)$model_defs,
stack
stack = stack
)
}

Expand All @@ -79,7 +79,7 @@ collect_parameters.model_stack <- function(stack, candidates, ...) {
candidates,
stack$model_defs,
stack$coefs,
stack
stack = stack
)
}

Expand Down
Binary file modified data/class_folds.rda
Binary file not shown.
Binary file modified data/class_res_nn.rda
Binary file not shown.
Binary file modified data/class_res_rf.rda
Binary file not shown.
Binary file modified data/log_res_nn.rda
Binary file not shown.
Binary file modified data/log_res_rf.rda
Binary file not shown.
Binary file modified data/reg_folds.rda
Binary file not shown.
Binary file modified data/reg_res_lr.rda
Binary file not shown.
Binary file modified data/reg_res_sp.rda
Binary file not shown.
Binary file modified data/reg_res_svm.rda
Binary file not shown.
Binary file modified data/tree_frogs_class_test.rda
Binary file not shown.
Binary file modified data/tree_frogs_reg_test.rda
Binary file not shown.
2 changes: 1 addition & 1 deletion man/example_data.Rd

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

6 changes: 1 addition & 5 deletions man/stacks_description.Rd

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

Binary file modified tests/testthat/helper_data.Rda
Binary file not shown.
4 changes: 2 additions & 2 deletions tests/testthat/out/data_stack_class.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
> st_class_1
# A data stack with 1 model definition and 10 candidate members:
# class_res_rf: 10 model configurations
# A data stack with 1 model definition and 9.66666666666667 candidate members:
# class_res_rf: 9.66666666666667 model configurations
# Outcome: reflex (factor)

30 changes: 13 additions & 17 deletions tests/testthat/out/model_stack_class.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,24 @@
Message: -- A stacked ensemble model -------------------------------------

Message:
Out of 20 possible candidate members, the ensemble retained 22.
Penalty: 1e-05.
Out of 19 possible candidate members, the ensemble retained 6.
Penalty: 0.1.
Mixture: 1.

Message: Across the 3 classes, there are an average of 7.33 coefficients per class.
Message: Across the 3 classes, there are an average of 3 coefficients per class.

Message:
The 10 highest weighted member classes are:
The 6 highest weighted member classes are:

# A tibble: 10 x 4
member type weight class
<chr> <chr> <dbl> <chr>
1 .pred_mid_class_res_rf_1_04 rand_forest 39.8 low
2 .pred_mid_class_res_rf_1_06 rand_forest 35.3 mid
3 .pred_mid_class_res_rf_1_09 rand_forest 23.5 mid
4 .pred_full_class_res_rf_1_05 rand_forest 21.7 full
5 .pred_full_class_res_rf_1_04 rand_forest 17.0 low
6 .pred_full_class_res_rf_1_09 rand_forest 16.6 mid
7 .pred_mid_class_res_rf_1_02 rand_forest 13.3 low
8 .pred_mid_class_res_rf_1_01 rand_forest 13.3 mid
9 .pred_mid_class_res_rf_1_10 rand_forest 11.9 low
10 .pred_mid_class_res_rf_1_03 rand_forest 11.4 low
# A tibble: 6 x 4
member type weight class
<chr> <chr> <dbl> <chr>
1 .pred_full_class_res_rf_1_05 rand_forest 3.75 full
2 .pred_mid_class_res_rf_1_06 rand_forest 0.674 mid
3 .pred_full_class_res_rf_1_07 rand_forest 0.411 full
4 .pred_full_class_res_rf_1_01 rand_forest 0.0957 full
5 .pred_full_class_res_rf_1_06 rand_forest 0.0193 full
6 .pred_full_class_res_rf_1_04 rand_forest 0.0110 full

Message:
Members have not yet been fitted with `fit_members()`.
Expand Down
30 changes: 13 additions & 17 deletions tests/testthat/out/model_stack_class_fit.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,22 @@
Message: -- A stacked ensemble model -------------------------------------

Message:
Out of 20 possible candidate members, the ensemble retained 22.
Penalty: 1e-05.
Out of 19 possible candidate members, the ensemble retained 6.
Penalty: 0.1.
Mixture: 1.

Message: Across the 3 classes, there are an average of 7.33 coefficients per class.
Message: Across the 3 classes, there are an average of 3 coefficients per class.

Message:
The 10 highest weighted member classes are:
The 6 highest weighted member classes are:

# A tibble: 10 x 4
member type weight class
<chr> <chr> <dbl> <chr>
1 .pred_mid_class_res_rf_1_04 rand_forest 39.8 low
2 .pred_mid_class_res_rf_1_06 rand_forest 35.3 mid
3 .pred_mid_class_res_rf_1_09 rand_forest 23.5 mid
4 .pred_full_class_res_rf_1_05 rand_forest 21.7 full
5 .pred_full_class_res_rf_1_04 rand_forest 17.0 low
6 .pred_full_class_res_rf_1_09 rand_forest 16.6 mid
7 .pred_mid_class_res_rf_1_02 rand_forest 13.3 low
8 .pred_mid_class_res_rf_1_01 rand_forest 13.3 mid
9 .pred_mid_class_res_rf_1_10 rand_forest 11.9 low
10 .pred_mid_class_res_rf_1_03 rand_forest 11.4 low
# A tibble: 6 x 4
member type weight class
<chr> <chr> <dbl> <chr>
1 .pred_full_class_res_rf_1_05 rand_forest 3.75 full
2 .pred_mid_class_res_rf_1_06 rand_forest 0.674 mid
3 .pred_full_class_res_rf_1_07 rand_forest 0.411 full
4 .pred_full_class_res_rf_1_01 rand_forest 0.0957 full
5 .pred_full_class_res_rf_1_06 rand_forest 0.0193 full
6 .pred_full_class_res_rf_1_04 rand_forest 0.0110 full

13 changes: 7 additions & 6 deletions tests/testthat/out/model_stack_log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@
Message: -- A stacked ensemble model -------------------------------------

Message:
Out of 10 possible candidate members, the ensemble retained 2.
Penalty: 0.1.
Out of 10 possible candidate members, the ensemble retained 3.
Penalty: 1e-05.
Mixture: 1.

Message:
The 2 highest weighted member classes are:
The 3 highest weighted member classes are:

# A tibble: 2 x 3
# A tibble: 3 x 3
member type weight
<chr> <chr> <dbl>
1 .pred_yes_log_res_rf_1_03 rand_forest 3.54
2 .pred_yes_log_res_rf_1_06 rand_forest 0.0457
1 .pred_yes_log_res_rf_1_05 rand_forest 3.56
2 .pred_yes_log_res_rf_1_02 rand_forest 3.22
3 .pred_yes_log_res_rf_1_09 rand_forest 0.226

Message:
Members have not yet been fitted with `fit_members()`.
Expand Down
13 changes: 7 additions & 6 deletions tests/testthat/out/model_stack_log_fit.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
Message: -- A stacked ensemble model -------------------------------------

Message:
Out of 10 possible candidate members, the ensemble retained 2.
Penalty: 0.1.
Out of 10 possible candidate members, the ensemble retained 3.
Penalty: 1e-05.
Mixture: 1.

Message:
The 2 highest weighted member classes are:
The 3 highest weighted member classes are:

# A tibble: 2 x 3
# A tibble: 3 x 3
member type weight
<chr> <chr> <dbl>
1 .pred_yes_log_res_rf_1_03 rand_forest 3.54
2 .pred_yes_log_res_rf_1_06 rand_forest 0.0457
1 .pred_yes_log_res_rf_1_05 rand_forest 3.56
2 .pred_yes_log_res_rf_1_02 rand_forest 3.22
3 .pred_yes_log_res_rf_1_09 rand_forest 0.226

11 changes: 5 additions & 6 deletions tests/testthat/out/model_stack_reg.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@
Message: -- A stacked ensemble model -------------------------------------

Message:
Out of 5 possible candidate members, the ensemble retained 3.
Out of 5 possible candidate members, the ensemble retained 2.
Penalty: 0.1.
Mixture: 1.

Message:
The 3 highest weighted members are:
The 2 highest weighted members are:

# A tibble: 3 x 3
# A tibble: 2 x 3
member type weight
<chr> <chr> <dbl>
1 reg_res_svm_1_5 svm_rbf 2.88
2 reg_res_svm_1_3 svm_rbf 0.895
3 reg_res_svm_1_1 svm_rbf 0.410
1 reg_res_svm_1_3 svm_rbf 1.26
2 reg_res_svm_1_2 svm_rbf 0.136

Message:
Members have not yet been fitted with `fit_members()`.
Expand Down
11 changes: 5 additions & 6 deletions tests/testthat/out/model_stack_reg_fit.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
Message: -- A stacked ensemble model -------------------------------------

Message:
Out of 5 possible candidate members, the ensemble retained 3.
Out of 5 possible candidate members, the ensemble retained 2.
Penalty: 0.1.
Mixture: 1.

Message:
The 3 highest weighted members are:
The 2 highest weighted members are:

# A tibble: 3 x 3
# A tibble: 2 x 3
member type weight
<chr> <chr> <dbl>
1 reg_res_svm_1_5 svm_rbf 2.88
2 reg_res_svm_1_3 svm_rbf 0.895
3 reg_res_svm_1_1 svm_rbf 0.410
1 reg_res_svm_1_3 svm_rbf 1.26
2 reg_res_svm_1_2 svm_rbf 0.136

6 changes: 3 additions & 3 deletions tests/testthat/test_collect_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ test_that("collect_parameters on a data stack works (regression)", {
expect_equal(nrow(res), 5)

expect_equal(ncol(res2), 2)
expect_equal(nrow(res2), 9)
expect_equal(nrow(res2), 10)

expect_equal(ncol(res3), 1)
expect_equal(nrow(res3), 1)
Expand All @@ -73,7 +73,7 @@ test_that("collect_parameters on a model stack works (regression)", {
expect_equal(nrow(res), 5)

expect_equal(ncol(res2), 3)
expect_equal(nrow(res2), 9)
expect_equal(nrow(res2), 10)

expect_true(
all(
Expand All @@ -100,5 +100,5 @@ test_that("collect_parameters works (classification)", {
expect_equal(nrow(res), 10)

expect_equal(ncol(res2), 6)
expect_equal(nrow(res2), 60)
expect_equal(nrow(res2), 57)
})

0 comments on commit 8b78f5a

Please sign in to comment.