Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tidymodels/bonsai

parsnip wrappers for tree-based models
https://github.com/tidymodels/bonsai

Last synced: 6 days ago
JSON representation

parsnip wrappers for tree-based models

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# bonsai

[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![CRAN status](https://www.r-pkg.org/badges/version/bonsai)](https://CRAN.R-project.org/package=bonsai)
[![Codecov test coverage](https://codecov.io/gh/tidymodels/bonsai/branch/main/graph/badge.svg)](https://app.codecov.io/gh/tidymodels/bonsai?branch=main)
[![R-CMD-check](https://github.com/tidymodels/bonsai/workflows/R-CMD-check/badge.svg)](https://github.com/tidymodels/bonsai/actions)

bonsai provides bindings for additional tree-based model engines for use with the [parsnip](https://parsnip.tidymodels.org/) package.

This package is based off of the work done in the [treesnip repository](https://github.com/curso-r/treesnip) by Athos Damiani, Daniel Falbel, and Roel Hogervorst. bonsai is the official CRAN version of the package; new development will reside here.

## Installation

You can install the most recent official release of bonsai with:

``` r
install.packages("bonsai")
```

You can install the development version of bonsai from [GitHub](https://github.com/) with:

``` r
# install.packages("pak")
pak::pak("tidymodels/bonsai")
```

## Available Engines

The bonsai package provides additional engines for the models in the following table:

```{r, echo = FALSE, message = FALSE}
library(parsnip)

parsnip_models <- get_from_env("models") %>%
setNames(., .) %>%
purrr::map_dfr(get_from_env, .id = "model")

library(bonsai)

bonsai_models <- get_from_env("models") %>%
setNames(., .) %>%
purrr::map_dfr(get_from_env, .id = "model")

dplyr::anti_join(
bonsai_models, parsnip_models,
by = c("model", "engine", "mode")
) %>%
knitr::kable()
```

## Code of Conduct

Please note that the bonsai project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.