---
title: "Supported Models and recipes steps"
description: >
  A complete list of supported parsnip models, recipes steps, and tailor
  adjustments that can be converted to orbital objects.
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Supported Models and recipes steps}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

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

## Supported models

This table doesn't exhaustively list fully unsupported models. Please file [an issue](https://github.com/tidymodels/orbital/issues) to add model to table.

```{r}
#| echo: false
#| message: false
if (!rlang::is_installed(c("gt", "tibble"))) {
  knitr::knit_exit()
}
```

```{r}
#| echo: false
#| message: false
#| error: false
#| output: false
library(gt)
library(dplyr)

tibble::tribble(
  ~parsnip,               ~engine,              ~numeric, ~class, ~prob,
  "`boost_tree()`",       "`\"catboost\"`",     "✅",     "✅",    "✅",
  "`boost_tree()`",       "`\"lightgbm\"`",     "✅",     "✅",    "✅",
  "`boost_tree()`",       "`\"xgboost\"`",      "✅",     "✅",    "✅",
  "`cubist_rules()`",     "`\"Cubist\"`",       "✅",     "❌",    "❌",
  "`decision_tree()`",    "`\"partykit\"`",     "✅",     "✅",    "✅",
  "`decision_tree()`",    "`\"rpart\"`",        "✅",     "✅",    "✅",
  "`linear_reg()`",       "`\"lm\"`",           "✅",     "❌",    "❌",
  "`linear_reg()`",       "`\"glmnet\"`",       "✅",     "❌",    "❌",
  "`logistic_reg()`",     "`\"glm\"`",          "❌",     "✅",    "✅",
  "`logistic_reg()`",     "`\"glmnet\"`",       "❌",     "✅",    "✅",
  "`mars()`",             "`\"earth\"`",        "✅",     "✅",    "✅",
  "`multinom_reg()`",     "`\"glmnet\"`",       "❌",     "✅",    "✅",
  "`naive_Bayes()`",      "`\"naivebayes\"`",   "❌",     "⚪",    "⚪",
  "`nearest_neighbor()`", "`any`",              "❌",     "❌",    "❌",
  "`rand_forest()`",      "`\"randomForest\"`", "✅",     "✅",    "✅",
  "`rand_forest()`",      "`\"ranger\"`",       "✅",     "✅",    "✅"
) |>
  gt() |>
  tab_spanner(
    label = "Model",
    columns = c(parsnip, engine)
  ) |>
  tab_spanner(
    label = "Regression",
    columns = c(numeric)
  ) |>
  tab_spanner(
    label = "Classification",
    columns = c(class, prob)
  ) |>
  tab_header(
    title = "Supported Prediction Types"
  ) |>
  cols_align(
    "center",
    columns = c(numeric, class, prob)
  ) |>
  tab_footnote("✅: Supported") |>
  tab_footnote("❌: Cannot be supported") |>
  tab_footnote("⚪: Not yet supported") |>
  fmt_markdown(
    columns = c(parsnip, engine)
  )
```

## Recipes steps

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

```{r}
#| label: setup
#| echo: false
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"))
```

## tailor adjustments

The following 4 tailor methods are supported


- `tailor::adjust_equivocal_zone()`
- `tailor::adjust_numeric_range()`
- `tailor::adjust_predictions_custom()`
- `tailor::adjust_probability_threshold()`
