Skip to content

Commit

Permalink
Merge pull request #212 from tidymodels/new-snapshots
Browse files Browse the repository at this point in the history
update snapshots
  • Loading branch information
EmilHvitfeldt authored Jan 10, 2024
2 parents 8a1152c + c141083 commit b8bf336
Show file tree
Hide file tree
Showing 14 changed files with 154 additions and 81 deletions.
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/collapse_cart.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
predictor: 73
-- Operations
* Collapsing factor levels using CART: Neighborhood, Central_Air
* Collapsing factor levels using CART: Neighborhood and Central_Air

---

Expand Down
5 changes: 3 additions & 2 deletions tests/testthat/_snaps/discretize_cart.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
Condition
Error in `step_discretize_cart()`:
Caused by error in `prep()`:
! All columns selected for the step should be double, or integer.
x All columns selected for the step should be double or integer.
* 1 factor variable found: `w`

# tidy method

Expand Down Expand Up @@ -85,7 +86,7 @@
Training data contained 1000 data points and no incomplete rows.
-- Operations
* Discretizing variables using CART: x, z | Trained, weighted
* Discretizing variables using CART: x and z | Trained, weighted

# empty printing

Expand Down
20 changes: 10 additions & 10 deletions tests/testthat/_snaps/discretize_xgb.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xgboost
Output
##### xgb.Booster
raw: 69.1 Kb
raw: 74.2 Kb
call:
xgboost::xgb.train(params = .params, data = .train, nrounds = 100,
watchlist = list(train = .train, test = .test), verbose = 0,
Expand All @@ -19,19 +19,19 @@
cb.early.stop(stopping_rounds = early_stopping_rounds, maximize = maximize,
verbose = verbose)
# of features: 13
niter: 89
best_iteration : 79
best_ntreelimit : 79
best_score : 0.4442069
best_msg : [79] train-logloss:0.420000 test-logloss:0.444207
niter: 96
best_iteration : 86
best_ntreelimit : 86
best_score : 0.4421503
best_msg : [86] train-logloss:0.417583 test-logloss:0.442150
nfeatures : 13
evaluation_log:
iter train_logloss test_logloss
1 0.6279229 0.6303495
2 0.5869984 0.5894989
---
88 0.4180034 0.4449478
89 0.4178084 0.4446590
95 0.4157892 0.4425857
96 0.4156102 0.4432699

# run_xgboost for multi-classification

Expand Down Expand Up @@ -287,7 +287,7 @@
Training data contained 1000 data points and no incomplete rows.
-- Operations
* Discretizing variables using xgboost: x, z | Trained, weighted
* Discretizing variables using xgboost: x and z | Trained, weighted

# empty printing

Expand Down Expand Up @@ -357,5 +357,5 @@
Training data contained 1000 data points and no incomplete rows.
-- Operations
* Discretizing variables using xgboost: x, z | Trained
* Discretizing variables using xgboost: x and z | Trained

23 changes: 12 additions & 11 deletions tests/testthat/_snaps/embed.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
new_values_ch <- bake(class_test, new_data = new_dat_ch, contains("embed"))
Condition
Warning:
There was 1 column that was a factor when the recipe was prepped:
'x3'.
This may cause errors when processing new data.
! There was 1 column that was a factor when the recipe was prepped:
* `x3`
i This may cause errors when processing new data.

---

Code
new_values_ch <- bake(class_test, new_data = new_dat_ch, contains("embed"))
Condition
Warning:
There was 1 column that was a factor when the recipe was prepped:
'x3'.
This may cause errors when processing new data.
! There was 1 column that was a factor when the recipe was prepped:
* `x3`
i This may cause errors when processing new data.

# bad args

Expand All @@ -26,7 +26,8 @@
Condition
Error in `step_embed()`:
Caused by error in `prep()`:
! All columns selected for the step should be string, factor, or ordered.
x All columns selected for the step should be string, factor, or ordered.
* 1 double variable found: `Sepal.Length`

# check_name() is used

Expand All @@ -35,8 +36,8 @@
Condition
Error in `step_embed()`:
Caused by error in `bake()`:
! Name collision occured. The following variable names already exists:
i x3_embed_1
! Name collision occurred. The following variable names already exist:
* `x3_embed_1`

# empty printing

Expand Down Expand Up @@ -79,8 +80,8 @@
rec <- prep(rec)
Condition
Warning:
'keep_original_cols' was added to `step_embed()` after this recipe was created.
Regenerate your recipe to avoid this warning.
`keep_original_cols` was added to `step_embed()` after this recipe was created.
i Regenerate your recipe to avoid this warning.

# printing

Expand Down
14 changes: 7 additions & 7 deletions tests/testthat/_snaps/feature_hash.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
res_te <- bake(rec_tr, te_dat, dplyr::starts_with("x3"))
Condition
Warning:
There was 1 column that was a factor when the recipe was prepped:
'x3'.
This may cause errors when processing new data.
! There was 1 column that was a factor when the recipe was prepped:
* `x3`
i This may cause errors when processing new data.

# check_name() is used

Expand All @@ -15,8 +15,8 @@
Condition
Error in `step_feature_hash()`:
Caused by error in `bake()`:
! Name collision occured. The following variable names already exists:
i x3_hash_01
! Name collision occurred. The following variable names already exist:
* `x3_hash_01`

# empty printing

Expand Down Expand Up @@ -59,8 +59,8 @@
rec <- prep(rec)
Condition
Warning:
'keep_original_cols' was added to `step_feature_hash()` after this recipe was created.
Regenerate your recipe to avoid this warning.
`keep_original_cols` was added to `step_feature_hash()` after this recipe was created.
i Regenerate your recipe to avoid this warning.

# printing

Expand Down
18 changes: 9 additions & 9 deletions tests/testthat/_snaps/lencode_bayes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
new_values_ch <- bake(class_test, new_data = new_dat_ch)
Condition
Warning:
There was 1 column that was a factor when the recipe was prepped:
'x3'.
This may cause errors when processing new data.
! There was 1 column that was a factor when the recipe was prepped:
* `x3`
i This may cause errors when processing new data.

---

Expand All @@ -29,9 +29,9 @@
new_values_ch <- bake(reg_test, new_data = new_dat_ch)
Condition
Warning:
There was 1 column that was a factor when the recipe was prepped:
'x3'.
This may cause errors when processing new data.
! There was 1 column that was a factor when the recipe was prepped:
* `x3`
i This may cause errors when processing new data.

# character encoded predictor

Expand Down Expand Up @@ -64,9 +64,9 @@
new_values_ch <- bake(class_test, new_data = new_dat_ch)
Condition
Warning:
There was 1 column that was a factor when the recipe was prepped:
'x3'.
This may cause errors when processing new data.
! There was 1 column that was a factor when the recipe was prepped:
* `x3`
i This may cause errors when processing new data.

# case weights

Expand Down
15 changes: 8 additions & 7 deletions tests/testthat/_snaps/lencode_glm.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
new_values_ch <- bake(class_test, new_data = new_dat_ch)
Condition
Warning:
There was 1 column that was a factor when the recipe was prepped:
'x3'.
This may cause errors when processing new data.
! There was 1 column that was a factor when the recipe was prepped:
* `x3`
i This may cause errors when processing new data.

---

Code
new_values_ch <- bake(reg_test, new_data = new_dat_ch)
Condition
Warning:
There was 1 column that was a factor when the recipe was prepped:
'x3'.
This may cause errors when processing new data.
! There was 1 column that was a factor when the recipe was prepped:
* `x3`
i This may cause errors when processing new data.

# character encoded predictor

Expand All @@ -31,7 +31,8 @@
Condition
Error in `step_lencode_glm()`:
Caused by error in `prep()`:
! All columns selected for the step should be string, factor, or ordered.
x All columns selected for the step should be string, factor, or ordered.
* 1 double variable found: `Sepal.Length`

# case weights

Expand Down
15 changes: 8 additions & 7 deletions tests/testthat/_snaps/lencode_mixed.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
new_values_ch <- bake(class_test, new_data = new_dat_ch)
Condition
Warning:
There was 1 column that was a factor when the recipe was prepped:
'x3'.
This may cause errors when processing new data.
! There was 1 column that was a factor when the recipe was prepped:
* `x3`
i This may cause errors when processing new data.

---

Code
new_values_ch <- bake(reg_test, new_data = new_dat_ch)
Condition
Warning:
There was 1 column that was a factor when the recipe was prepped:
'x3'.
This may cause errors when processing new data.
! There was 1 column that was a factor when the recipe was prepped:
* `x3`
i This may cause errors when processing new data.

# bad args

Expand All @@ -26,7 +26,8 @@
Condition
Error in `step_lencode_mixed()`:
Caused by error in `prep()`:
! All columns selected for the step should be string, factor, or ordered.
x All columns selected for the step should be string, factor, or ordered.
* 1 double variable found: `Sepal.Length`

# case weights

Expand Down
12 changes: 6 additions & 6 deletions tests/testthat/_snaps/pca_sparse.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Training data contained 1817 data points and no incomplete rows.
-- Operations
* Sparse PCA extraction with: angle_ch_1, area_ch_1, ... | Trained
* Sparse PCA extraction with: angle_ch_1 and area_ch_1, ... | Trained

# check_name() is used

Expand All @@ -23,8 +23,8 @@
Condition
Error in `step_pca_sparse()`:
Caused by error in `bake()`:
! Name collision occured. The following variable names already exists:
i PC1
! Name collision occurred. The following variable names already exist:
* `PC1`

# empty printing

Expand Down Expand Up @@ -67,8 +67,8 @@
rec <- prep(rec)
Condition
Warning:
'keep_original_cols' was added to `step_pca_sparse()` after this recipe was created.
Regenerate your recipe to avoid this warning.
`keep_original_cols` was added to `step_pca_sparse()` after this recipe was created.
i Regenerate your recipe to avoid this warning.

# printing

Expand Down Expand Up @@ -106,5 +106,5 @@
Training data contained 32 data points and no incomplete rows.
-- Operations
* Sparse PCA extraction with: cyl, disp, hp, drat, wt, qsec, vs, ... | Trained
* Sparse PCA extraction with: cyl, disp, hp, drat, wt, qsec, ... | Trained

12 changes: 6 additions & 6 deletions tests/testthat/_snaps/pca_sparse_bayes.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Training data contained 1817 data points and no incomplete rows.
-- Operations
* Sparse PCA extraction with: angle_ch_1, area_ch_1, ... | Trained
* Sparse PCA extraction with: angle_ch_1 and area_ch_1, ... | Trained

# check_name() is used

Expand All @@ -23,8 +23,8 @@
Condition
Error in `step_pca_sparse_bayes()`:
Caused by error in `bake()`:
! Name collision occured. The following variable names already exists:
i PC1
! Name collision occurred. The following variable names already exist:
* `PC1`

# empty printing

Expand Down Expand Up @@ -67,8 +67,8 @@
rec <- prep(rec)
Condition
Warning:
'keep_original_cols' was added to `step_pca_sparse_bayes()` after this recipe was created.
Regenerate your recipe to avoid this warning.
`keep_original_cols` was added to `step_pca_sparse_bayes()` after this recipe was created.
i Regenerate your recipe to avoid this warning.

# printing

Expand Down Expand Up @@ -101,5 +101,5 @@
Training data contained 1817 data points and no incomplete rows.
-- Operations
* Sparse PCA extraction with: angle_ch_1, area_ch_1, ... | Trained
* Sparse PCA extraction with: angle_ch_1 and area_ch_1, ... | Trained

10 changes: 5 additions & 5 deletions tests/testthat/_snaps/pca_truncated.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
Condition
Error in `step_pca_truncated()`:
Caused by error in `bake()`:
! Name collision occured. The following variable names already exists:
i PC1
! Name collision occurred. The following variable names already exist:
* `PC1`

# empty printing

Expand Down Expand Up @@ -49,8 +49,8 @@
rec <- prep(rec)
Condition
Warning:
'keep_original_cols' was added to `step_pca_truncated()` after this recipe was created.
Regenerate your recipe to avoid this warning.
`keep_original_cols` was added to `step_pca_truncated()` after this recipe was created.
i Regenerate your recipe to avoid this warning.

# printing

Expand Down Expand Up @@ -85,5 +85,5 @@
Training data contained 32 data points and no incomplete rows.
-- Operations
* Truncated PCA extraction with: cyl, disp, hp, drat, wt, qsec, ... | Trained
* Truncated PCA extraction with: cyl, disp, hp, drat, wt, ... | Trained

Loading

0 comments on commit b8bf336

Please sign in to comment.