Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f872528
commit 58377f4
Showing
11 changed files
with
163 additions
and
157 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,154 @@ | ||
# can print empty workflow | ||
|
||
Code | ||
workflow() | ||
Output | ||
== Workflow ==================================================================== | ||
Preprocessor: None | ||
Model: None | ||
|
||
# can print workflow with recipe | ||
|
||
Code | ||
add_recipe(workflow(), rec) | ||
Output | ||
== Workflow ==================================================================== | ||
Preprocessor: Recipe | ||
Model: None | ||
-- Preprocessor ---------------------------------------------------------------- | ||
0 Recipe Steps | ||
|
||
# can print workflow with formula | ||
|
||
Code | ||
add_formula(workflow(), y ~ x) | ||
Output | ||
== Workflow ==================================================================== | ||
Preprocessor: Formula | ||
Model: None | ||
-- Preprocessor ---------------------------------------------------------------- | ||
y ~ x | ||
|
||
# can print workflow with variables | ||
|
||
Code | ||
add_variables(workflow(), y, c(x1, x2)) | ||
Output | ||
== Workflow ==================================================================== | ||
Preprocessor: Variables | ||
Model: None | ||
-- Preprocessor ---------------------------------------------------------------- | ||
Outcomes: y | ||
Predictors: c(x1, x2) | ||
|
||
# can print workflow with model | ||
|
||
Code | ||
add_model(workflow(), model) | ||
Output | ||
== Workflow ==================================================================== | ||
Preprocessor: None | ||
Model: linear_reg() | ||
-- Model ----------------------------------------------------------------------- | ||
Linear Regression Model Specification (regression) | ||
Computational engine: lm | ||
|
||
# can print workflow with model with engine specific args | ||
|
||
Code | ||
add_model(workflow(), model) | ||
Output | ||
== Workflow ==================================================================== | ||
Preprocessor: None | ||
Model: linear_reg() | ||
-- Model ----------------------------------------------------------------------- | ||
Linear Regression Model Specification (regression) | ||
Main Arguments: | ||
penalty = 0.01 | ||
Engine-Specific Arguments: | ||
dfmax = 5 | ||
Computational engine: glmnet | ||
|
||
# can print workflow with fit model | ||
|
||
Code | ||
fit(workflow, mtcars) | ||
Output | ||
== Workflow [trained] ========================================================== | ||
Preprocessor: Formula | ||
Model: linear_reg() | ||
-- Preprocessor ---------------------------------------------------------------- | ||
mpg ~ cyl | ||
-- Model ----------------------------------------------------------------------- | ||
Call: | ||
stats::lm(formula = ..y ~ ., data = data) | ||
Coefficients: | ||
(Intercept) cyl | ||
37.885 -2.876 | ||
|
||
# can print workflow with >10 recipe steps | ||
|
||
Code | ||
add_recipe(workflow(), rec) | ||
Output | ||
== Workflow ==================================================================== | ||
Preprocessor: Recipe | ||
Model: None | ||
-- Preprocessor ---------------------------------------------------------------- | ||
11 Recipe Steps | ||
* step_log() | ||
* step_log() | ||
* step_log() | ||
* step_log() | ||
* step_log() | ||
* step_log() | ||
* step_log() | ||
* step_log() | ||
* step_log() | ||
* step_log() | ||
* ... | ||
* and 1 more step. | ||
|
||
--- | ||
|
||
Code | ||
add_recipe(workflow(), rec) | ||
Output | ||
== Workflow ==================================================================== | ||
Preprocessor: Recipe | ||
Model: None | ||
-- Preprocessor ---------------------------------------------------------------- | ||
12 Recipe Steps | ||
* step_log() | ||
* step_log() | ||
* step_log() | ||
* step_log() | ||
* step_log() | ||
* step_log() | ||
* step_log() | ||
* step_log() | ||
* step_log() | ||
* step_log() | ||
* ... | ||
* and 2 more steps. | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
tests/testthat/out/test-print-workflow-recipe-11-steps.txt
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
tests/testthat/out/test-print-workflow-recipe-12-steps.txt
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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