-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
transition to snapshot testing (#1190)
--------- Co-authored-by: Emil Hvitfeldt <[email protected]>
- Loading branch information
1 parent
6109bc1
commit b180de8
Showing
67 changed files
with
1,671 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# adding row indicies | ||
|
||
Code | ||
as.matrix(mtcars) %>% add_rowindex() | ||
Condition | ||
Error in `add_rowindex()`: | ||
! `x` should be a data frame. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# can be temporarily overriden at evaluation time | ||
|
||
Code | ||
.cols() | ||
Condition | ||
Error in `descr_env$.cols()`: | ||
! Descriptor context not set | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# numeric model | ||
|
||
Code | ||
num_res <- predict(lm_mod, hpc_bad[1:11, -1]) | ||
Condition | ||
Warning: | ||
Model fit failed; cannot make predictions. | ||
|
||
--- | ||
|
||
Code | ||
ci_res <- predict(lm_mod, hpc_bad[1:11, -1], type = "conf_int") | ||
Condition | ||
Warning: | ||
Model fit failed; cannot make predictions. | ||
|
||
--- | ||
|
||
Code | ||
pi_res <- predict(lm_mod, hpc_bad[1:11, -1], type = "pred_int") | ||
Condition | ||
Warning: | ||
Model fit failed; cannot make predictions. | ||
|
||
# classification model | ||
|
||
Code | ||
cls_res <- predict(log_reg, lending_club %>% dplyr::slice(1:7) %>% dplyr::select( | ||
-Class)) | ||
Condition | ||
Warning: | ||
Model fit failed; cannot make predictions. | ||
|
||
--- | ||
|
||
Code | ||
prb_res <- predict(log_reg, lending_club %>% dplyr::slice(1:7) %>% dplyr::select( | ||
-Class), type = "prob") | ||
Condition | ||
Warning: | ||
Model fit failed; cannot make predictions. | ||
|
||
--- | ||
|
||
Code | ||
ci_res <- predict(log_reg, lending_club %>% dplyr::slice(1:7) %>% dplyr::select( | ||
-Class), type = "conf_int") | ||
Condition | ||
Warning: | ||
Model fit failed; cannot make predictions. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# regression | ||
|
||
Code | ||
xy_res <- fit_xy(reg_mod, x = mtcars[, 1:5], y = mtcars$mpg, control = ctrl) | ||
Condition | ||
Error in `fit_xy()`: | ||
! Please use `fit()` rather than `fit_xy()` to train generalized additive models with the "mgcv" engine. | ||
i See `?model_formula()` to learn more. | ||
|
||
# classification | ||
|
||
Code | ||
xy_res <- fit_xy(cls_mod, x = two_class_dat[, 2:3], y = two_class_dat$Class, | ||
control = ctrl) | ||
Condition | ||
Error in `fit_xy()`: | ||
! Please use `fit()` rather than `fit_xy()` to train generalized additive models with the "mgcv" engine. | ||
i See `?model_formula()` to learn more. | ||
|
Oops, something went wrong.