Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions man/rmd/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.quarto/
**/*.quarto_ipynb
10 changes: 10 additions & 0 deletions man/rmd/C5_rules_C5.0.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ C5_rules(
#| child: template-uses-case-weights.Rmd
```

## Prediction types

```{r}
#| label: predict-types

parsnip:::get_from_env("C5_rules_predict") |>
dplyr::select(mode, type)

```

## Saving fitted model objects

```{r}
Expand Down
19 changes: 16 additions & 3 deletions man/rmd/auto_ml_h2o.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ Engine arguments of interest

```{r}
#| label: h2o-reg
auto_ml() |>
set_engine("h2o") |>
set_mode("regression") |>

library(agua)

auto_ml() |>
set_engine("h2o") |>
set_mode("regression") |>
translate()
```

Expand All @@ -52,6 +55,16 @@ auto_ml() |>
#| child: template-h2o-init.Rmd
```

## Prediction types

```{r}
#| label: predict-types

parsnip:::get_from_env("auto_ml_predict") |>
dplyr::select(mode, type)

```

## Saving fitted model objects

```{r}
Expand Down
10 changes: 10 additions & 0 deletions man/rmd/bag_mars_earth.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ bag_mars(

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

## Prediction types

```{r}
#| label: predict-types

parsnip:::get_from_env("bag_mars_predict") |>
dplyr::select(mode, type)

```

## References

- Breiman, L. 1996. "Bagging predictors". Machine Learning. 24 (2): 123-140
Expand Down
10 changes: 10 additions & 0 deletions man/rmd/bag_mlp_nnet.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ bag_mlp(penalty = double(1), hidden_units = integer(1)) |>
#| child: template-no-case-weights.Rmd
```

## Prediction types

```{r}
#| label: predict-types

parsnip:::get_from_env("bag_mlp_predict") |>
dplyr::select(mode, type)

```


## References

Expand Down
10 changes: 10 additions & 0 deletions man/rmd/bag_tree_C5.0.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ bag_tree(min_n = integer()) |>
#| child: template-uses-case-weights.Rmd
```

## Prediction types

```{r}
#| label: predict-types

parsnip:::get_from_env("bag_mars_predict") |>
dplyr::filter(engine == "C5.0") |>
dplyr::select(mode, type)

```

## References

Expand Down
11 changes: 11 additions & 0 deletions man/rmd/bag_tree_rpart.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,17 @@ bag_tree(tree_depth = integer(1), min_n = integer(1), cost_complexity = double(1
#| child: template-uses-case-weights.Rmd
```

## Prediction types

```{r}
#| label: predict-types

parsnip:::get_from_env("bag_mars_predict") |>
dplyr::filter(engine == "rpart") |>
dplyr::select(mode, type)

```

## Other details

```{r}
Expand Down
9 changes: 9 additions & 0 deletions man/rmd/bart_dbarts.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ parsnip::bart(

[dbarts::bart()] will also convert the factors to indicators if the user does not create them first.

## Prediction types

```{r}
#| label: predict-types

parsnip:::get_from_env("bart_predict") |>
dplyr::select(mode, type)

```

## References

Expand Down
11 changes: 11 additions & 0 deletions man/rmd/boost_tree_C5.0.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ boost_tree(trees = integer(), min_n = integer(), sample_size = numeric()) |>
#| child: template-uses-case-weights.Rmd
```

## Prediction types

```{r}
#| label: predict-types

parsnip:::get_from_env("boost_tree_predict") |>
dplyr::filter(engine == "C5.0") |>
dplyr::select(mode, type)

```

## Saving fitted model objects

```{r}
Expand Down
11 changes: 11 additions & 0 deletions man/rmd/boost_tree_h2o.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,17 @@ Non-numeric predictors (i.e., factors) are internally converted to numeric. In t
#| child: template-mtry-prop.Rmd
```

## Prediction types

```{r}
#| label: predict-types

parsnip:::get_from_env("boost_tree_predict") |>
dplyr::filter(stringr::(str_starts(engine, "h2o"))) |>
dplyr::select(mode, type)

```

## Initializing h2o

```{r}
Expand Down
11 changes: 11 additions & 0 deletions man/rmd/boost_tree_lightgbm.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ Non-numeric predictors (i.e., factors) are internally converted to numeric. In t
#| child: template-mtry-prop.Rmd
```

## Prediction types

```{r}
#| label: predict-types

parsnip:::get_from_env("boost_tree_predict") |>
dplyr::filter(engine == "lightgbm") |>
dplyr::select(mode, type)

```

### Bagging

The `sample_size` argument is translated to the `bagging_fraction` parameter in the `param` argument of `lgb.train`. The argument is interpreted by lightgbm as a _proportion_ rather than a count, so bonsai internally reparameterizes the `sample_size` argument with [dials::sample_prop()] during tuning.
Expand Down
11 changes: 11 additions & 0 deletions man/rmd/boost_tree_mboost.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,17 @@ boost_tree() |>
#| child: template-tree-split-factors.Rmd
```

## Prediction types

```{r}
#| label: predict-types

parsnip:::get_from_env("boost_tree_predict") |>
dplyr::filter(engine == "mboost") |>
dplyr::select(mode, type)

```

## Other details

```{r}
Expand Down
11 changes: 11 additions & 0 deletions man/rmd/boost_tree_spark.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@ boost_tree(

Note that, for spark engines, the `case_weight` argument value should be a character string to specify the column with the numeric case weights.

## Prediction types

```{r}
#| label: predict-types

parsnip:::get_from_env("boost_tree_predict") |>
dplyr::filter(engine == "spark") |>
dplyr::select(mode, type)

```

## Other details

```{r}
Expand Down
11 changes: 11 additions & 0 deletions man/rmd/boost_tree_xgboost.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ For classification, non-numeric outcomes (i.e., factors) are internally converte
#| child: template-uses-case-weights.Rmd
```

## Prediction types

```{r}
#| label: predict-types

parsnip:::get_from_env("boost_tree_predict") |>
dplyr::filter(engine == "xgboost") |>
dplyr::select(mode, type)

```

## Sparse Data

```{r}
Expand Down
10 changes: 10 additions & 0 deletions man/rmd/cubist_rules_Cubist.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ cubist_rules(
#| child: template-tree-split-factors.Rmd
```

## Prediction types

```{r}
#| label: predict-types

parsnip:::get_from_env("cubist_rules_predict") |>
dplyr::select(mode, type)

```

## References

- Quinlan R (1992). "Learning with Continuous Classes." Proceedings of the 5th Australian Joint Conference On Artificial Intelligence, pp. 343-348.
Expand Down
11 changes: 11 additions & 0 deletions man/rmd/decision_tree_C5.0.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,17 @@ decision_tree(min_n = integer()) |>
#| child: template-uses-case-weights.Rmd
```

## Prediction types

```{r}
#| label: predict-types

parsnip:::get_from_env("decision_tree_predict") |>
dplyr::filter(engine == "C5.0") |>
dplyr::select(mode, type)

```

## Saving fitted model objects

```{r}
Expand Down
11 changes: 11 additions & 0 deletions man/rmd/decision_tree_partykit.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,17 @@ decision_tree(tree_depth = integer(1), min_n = integer(1)) |>
#| child: template-tree-split-factors.Rmd
```

## Prediction types

```{r}
#| label: predict-types

parsnip:::get_from_env("decision_tree_predict") |>
dplyr::filter(engine == "partykit") |>
dplyr::select(mode, type)

```

## Other details

```{r}
Expand Down
11 changes: 11 additions & 0 deletions man/rmd/decision_tree_rpart.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,17 @@ decision_tree(
#| child: template-uses-case-weights.Rmd
```

## Prediction types

```{r}
#| label: predict-types

parsnip:::get_from_env("decision_tree_predict") |>
dplyr::filter(engine == "rpart") |>
dplyr::select(mode, type)

```

## Other details

```{r}
Expand Down
11 changes: 11 additions & 0 deletions man/rmd/decision_tree_spark.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@ decision_tree(tree_depth = integer(1), min_n = integer(1)) |>

Note that, for spark engines, the `case_weight` argument value should be a character string to specify the column with the numeric case weights.


## Prediction types

```{r}
#| label: predict-types

parsnip:::get_from_env("decision_tree_predict") |>
dplyr::filter(engine == "spark") |>
dplyr::select(mode, type)

```
## Other details

```{r}
Expand Down
10 changes: 10 additions & 0 deletions man/rmd/discrim_flexible_earth.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ discrim_flexible(
#| child: template-uses-case-weights.Rmd
```

## Prediction types

```{r}
#| label: predict-types

parsnip:::get_from_env("discrim_flexible_predict") |>
dplyr::select(mode, type)

```

## References

- Hastie, Tibshirani & Buja (1994) Flexible Discriminant Analysis by Optimal
Expand Down
11 changes: 11 additions & 0 deletions man/rmd/discrim_linear_MASS.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ discrim_linear() |>
#| child: template-no-case-weights.Rmd
```

## Prediction types

```{r}
#| label: predict-types

parsnip:::get_from_env("discrim_linear_predict") |>
dplyr::filter(engine == "MASS") |>
dplyr::select(mode, type)

```

## References

- Kuhn, M, and K Johnson. 2013. _Applied Predictive Modeling_. Springer.
11 changes: 11 additions & 0 deletions man/rmd/discrim_linear_mda.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ discrim_linear(penalty = numeric(0)) |>
#| child: template-uses-case-weights.Rmd
```

## Prediction types

```{r}
#| label: predict-types

parsnip:::get_from_env("discrim_linear_predict") |>
dplyr::filter(engine == "mda") |>
dplyr::select(mode, type)

```

## References

- Hastie, Tibshirani & Buja (1994) Flexible Discriminant Analysis by Optimal
Expand Down
Loading