Skip to content

Commit

Permalink
add supported models and recipes article
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilHvitfeldt committed Jul 22, 2024
1 parent bc50f7e commit 641868e
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 1 deletion.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
^_pkgdown\.yml$
^docs$
^pkgdown$
^vignettes/articles$
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ Config/testthat/edition: 3
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
Config/Needs/website: tidyverse/tidytemplate
Config/Needs/website: tidyverse/tidytemplate, rmarkdown
2 changes: 2 additions & 0 deletions vignettes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.html
*.R
55 changes: 55 additions & 0 deletions vignettes/articles/supported-models.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: "Supported Models and recipes steps"
---

The supported models currently all come from [tidypredict](https://tidypredict.tidymodels.org/) right now.

## Supported models

The following models are supported by `tidypredict`:

- Linear Regression - `lm()`
- Generalized Linear model - `glm()`
- Random Forest models - `randomForest::randomForest()`
- Random Forest models, via `ranger` - `ranger::ranger()`
- MARS models - `earth::earth()`
- XGBoost models - `xgboost::xgb.Booster.complete()`
- Cubist models - `Cubist::cubist()`
- Tree models, via `partykit` - `partykit::ctree()`

### `parsnip`

`tidypredict` supports models fitted via the `parsnip` interface. The ones confirmed currently work in `tidypredict` are:

- `lm()` - `parsnip`: `linear_reg()` with *"lm"* as the engine.
- `randomForest::randomForest()` - `parsnip`: `rand_forest()` with *"randomForest"* as the engine.
- `ranger::ranger()` - `parsnip`: `rand_forest()` with *"ranger"* as the engine.
- `earth::earth()` - `parsnip`: `mars()` with *"earth"* as the engine.

## Recipes steps

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```

```{r setup}
library(orbital)
```

```{r}
#| echo: false
all_funs <- ls(getNamespace("orbital"))
steps <- grep("orbital.step_", all_funs, value = TRUE)
steps <- gsub("orbital.", "", steps)
```

The following `r length(steps)` recipes steps are supported

```{r, results='asis'}
#| echo: false
cat(paste0("- `", steps, "()`\n"))
```

0 comments on commit 641868e

Please sign in to comment.