Skip to content

Commit 4eb46b5

Browse files
committed
knitr::convert_chunk_header(type = "yaml")
1 parent c49a93b commit 4eb46b5

File tree

107 files changed

+1830
-782
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+1830
-782
lines changed

man/rmd/C5_rules_C5.0.Rmd

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
```{r, child = "aaa.Rmd", include = FALSE}
1+
```{r}
2+
#| child: aaa.Rmd
3+
#| include: false
24
```
35

46
`r descr_models("C5_rules", "C5.0")`
57

68
## Tuning Parameters
79

8-
```{r C5.0-param-info, echo = FALSE}
10+
```{r}
11+
#| label: C5.0-param-info
12+
#| echo: false
913
defaults <-
1014
tibble::tibble(parsnip = c("trees", "min_n"),
1115
default = c("1L", "2L"))
@@ -18,7 +22,10 @@ param <-
1822

1923
This model has `r nrow(param)` tuning parameters:
2024

21-
```{r C5.0-param-list, echo = FALSE, results = "asis"}
25+
```{r}
26+
#| label: C5.0-param-list
27+
#| echo: false
28+
#| results: asis
2229
param$item
2330
```
2431

@@ -28,7 +35,8 @@ Note that C5.0 has a tool for _early stopping_ during boosting where less iterat
2835

2936
`r uses_extension("C5_rules", "C5.0", "classification")`
3037

31-
```{r C5.0-cls}
38+
```{r}
39+
#| label: C5.0-cls
3240
library(rules)
3341
3442
C5_rules(
@@ -42,17 +50,20 @@ C5_rules(
4250

4351
## Preprocessing requirements
4452

45-
```{r child = "template-tree-split-factors.Rmd"}
53+
```{r}
54+
#| child: template-tree-split-factors.Rmd
4655
```
4756

4857
## Case weights
4958

50-
```{r child = "template-uses-case-weights.Rmd"}
59+
```{r}
60+
#| child: template-uses-case-weights.Rmd
5161
```
5262

5363
## Saving fitted model objects
5464

55-
```{r child = "template-butcher.Rmd"}
65+
```{r}
66+
#| child: template-butcher.Rmd
5667
```
5768

5869

man/rmd/aaa.Rmd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
```{r, include = FALSE}
1+
```{r}
2+
#| include: false
23
# pillar/cli options to try to lock down formatting
34
options(useFancyQuotes = FALSE)
45
options(dplyr.print_min = 6, dplyr.print_max = 6)

man/rmd/auto_ml_h2o.Rmd

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
```{r, child = "aaa.Rmd", include = FALSE}
1+
```{r}
2+
#| child: aaa.Rmd
3+
#| include: false
24
```
35

46
`r descr_models("auto_ml", "h2o")`
@@ -19,7 +21,8 @@ Engine arguments of interest
1921

2022
[agua::h2o_train_auto()] is a wrapper around [h2o::h2o.automl()].
2123

22-
```{r h2o-reg}
24+
```{r}
25+
#| label: h2o-reg
2326
auto_ml() |>
2427
set_engine("h2o") |>
2528
set_mode("regression") |>
@@ -29,7 +32,8 @@ auto_ml() |>
2932

3033
## Translation from parsnip to the original package (classification)
3134

32-
```{r h2o-cls}
35+
```{r}
36+
#| label: h2o-cls
3337
auto_ml() |>
3438
set_engine("h2o") |>
3539
set_mode("classification") |>
@@ -38,15 +42,18 @@ auto_ml() |>
3842

3943
## Preprocessing requirements
4044

41-
```{r child = "template-makes-dummies.Rmd"}
45+
```{r}
46+
#| child: template-makes-dummies.Rmd
4247
```
4348

4449
## Initializing h2o
4550

46-
```{r child = "template-h2o-init.Rmd"}
51+
```{r}
52+
#| child: template-h2o-init.Rmd
4753
```
4854

4955
## Saving fitted model objects
5056

51-
```{r child = "template-bundle.Rmd"}
57+
```{r}
58+
#| child: template-bundle.Rmd
5259
```

man/rmd/bag_mars_earth.Rmd

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
```{r, child = "aaa.Rmd", include = FALSE}
1+
```{r}
2+
#| child: aaa.Rmd
3+
#| include: false
24
```
35

46
`r descr_models("bag_mars", "earth")`
57

68
## Tuning Parameters
79

8-
```{r earth-param-info, echo = FALSE}
10+
```{r}
11+
#| label: earth-param-info
12+
#| echo: false
913
defaults <-
1014
tibble::tibble(parsnip = c("num_terms", "prod_degree", "prune_method"),
1115
default = c("see below", "1L", "'backward'"))
@@ -18,7 +22,10 @@ param <-
1822

1923
This model has `r nrow(param)` tuning parameters:
2024

21-
```{r earth-param-list, echo = FALSE, results = "asis"}
25+
```{r}
26+
#| label: earth-param-list
27+
#| echo: false
28+
#| results: asis
2229
param$item
2330
```
2431

@@ -28,7 +35,8 @@ The default value of `num_terms` depends on the number of predictor columns. For
2835

2936
`r uses_extension("bag_mars", "earth", "regression")`
3037

31-
```{r earth-reg}
38+
```{r}
39+
#| label: earth-reg
3240
bag_mars(num_terms = integer(1), prod_degree = integer(1), prune_method = character(1)) |>
3341
set_engine("earth") |>
3442
set_mode("regression") |>
@@ -39,7 +47,8 @@ bag_mars(num_terms = integer(1), prod_degree = integer(1), prune_method = charac
3947

4048
`r uses_extension("bag_mars", "earth", "classification")`
4149

42-
```{r earth-cls}
50+
```{r}
51+
#| label: earth-cls
4352
library(baguette)
4453
4554
bag_mars(
@@ -54,12 +63,14 @@ bag_mars(
5463

5564
## Preprocessing requirements
5665

57-
```{r child = "template-makes-dummies.Rmd"}
66+
```{r}
67+
#| child: template-makes-dummies.Rmd
5868
```
5969

6070
## Case weights
6171

62-
```{r child = "template-uses-case-weights.Rmd"}
72+
```{r}
73+
#| child: template-uses-case-weights.Rmd
6374
```
6475

6576
Note that the `earth` package documentation has: "In the current implementation, _building models with weights can be slow_."

man/rmd/bag_mlp_nnet.Rmd

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
```{r, child = "aaa.Rmd", include = FALSE}
1+
```{r}
2+
#| child: aaa.Rmd
3+
#| include: false
24
```
35

46
`r descr_models("bag_mlp", "nnet")`
57

68
## Tuning Parameters
79

8-
```{r nnet-param-info, echo = FALSE}
10+
```{r}
11+
#| label: nnet-param-info
12+
#| echo: false
913
defaults <-
1014
tibble::tibble(parsnip = c("penalty", "hidden_units", "epochs"),
1115
default = c("0.0", "10L", "1000L"))
@@ -19,7 +23,10 @@ param <-
1923

2024
This model has `r nrow(param)` tuning parameters:
2125

22-
```{r nnet-param-list, echo = FALSE, results = "asis"}
26+
```{r}
27+
#| label: nnet-param-list
28+
#| echo: false
29+
#| results: asis
2330
param$item
2431
```
2532

@@ -29,7 +36,8 @@ These defaults are set by the `baguette` package and are different than those in
2936

3037
`r uses_extension("bag_mlp", "nnet", "classification")`
3138

32-
```{r nnet-cls}
39+
```{r}
40+
#| label: nnet-cls
3341
library(baguette)
3442
3543
bag_mlp(penalty = double(1), hidden_units = integer(1)) |>
@@ -43,7 +51,8 @@ bag_mlp(penalty = double(1), hidden_units = integer(1)) |>
4351

4452
`r uses_extension("bag_mlp", "nnet", "regression")`
4553

46-
```{r nnet-reg}
54+
```{r}
55+
#| label: nnet-reg
4756
library(baguette)
4857
4958
bag_mlp(penalty = double(1), hidden_units = integer(1)) |>
@@ -55,15 +64,18 @@ bag_mlp(penalty = double(1), hidden_units = integer(1)) |>
5564

5665
## Preprocessing requirements
5766

58-
```{r child = "template-makes-dummies.Rmd"}
67+
```{r}
68+
#| child: template-makes-dummies.Rmd
5969
```
6070

61-
```{r child = "template-same-scale.Rmd"}
71+
```{r}
72+
#| child: template-same-scale.Rmd
6273
```
6374

6475
## Case weights
6576

66-
```{r child = "template-no-case-weights.Rmd"}
77+
```{r}
78+
#| child: template-no-case-weights.Rmd
6779
```
6880

6981

man/rmd/bag_tree_C5.0.Rmd

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
```{r, child = "aaa.Rmd", include = FALSE}
1+
```{r}
2+
#| child: aaa.Rmd
3+
#| include: false
24
```
35

46
`r descr_models("bag_tree", "C5.0")`
57

68
## Tuning Parameters
79

8-
```{r C5.0-param-info, echo = FALSE}
10+
```{r}
11+
#| label: C5.0-param-info
12+
#| echo: false
913
defaults <-
1014
tibble::tibble(parsnip = c("min_n"),
1115
default = c("2L"))
@@ -19,15 +23,19 @@ param <-
1923

2024
This model has `r nrow(param)` tuning parameters:
2125

22-
```{r C5.0-param-list, echo = FALSE, results = "asis"}
26+
```{r}
27+
#| label: C5.0-param-list
28+
#| echo: false
29+
#| results: asis
2330
param$item
2431
```
2532

2633
## Translation from parsnip to the original package (classification)
2734

2835
`r uses_extension("bag_tree", "C5.0", "classification")`
2936

30-
```{r C5.0-cls}
37+
```{r}
38+
#| label: C5.0-cls
3139
library(baguette)
3240
3341
bag_tree(min_n = integer()) |>
@@ -38,12 +46,14 @@ bag_tree(min_n = integer()) |>
3846

3947
## Preprocessing requirements
4048

41-
```{r child = "template-tree-split-factors.Rmd"}
49+
```{r}
50+
#| child: template-tree-split-factors.Rmd
4251
```
4352

4453
## Case weights
4554

46-
```{r child = "template-uses-case-weights.Rmd"}
55+
```{r}
56+
#| child: template-uses-case-weights.Rmd
4757
```
4858

4959

0 commit comments

Comments
 (0)