Model Wrappers for Tree-Based Models

Bindings for additional tree-based model engines for use with the 'parsnip' package. Models include gradient boosted decision trees with 'LightGBM' (Ke et al, 2017.), conditional inference trees and conditional random forests with 'partykit' (Hothorn and Zeileis, 2015. and Hothorn et al, 2006. ), and accelerated oblique random forests with 'aorsf' (Jaeger et al, 2022 ).


bonsai bonsai website

Lifecycle:experimental CRANstatus Codecov testcoverage R-CMD-check

bonsai provides bindings for additional tree-based model engines for use with the parsnip package.

This package is based off of the work done in the treesnip repository 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:

install.packages("bonsai")

You can install the development version of bonsai from GitHub with:

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

Available Engines

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

model engine mode
boost_tree lightgbm regression
boost_tree lightgbm classification
boost_tree catboost regression
boost_tree catboost classification
decision_tree partykit regression
decision_tree partykit classification
rand_forest partykit regression
rand_forest partykit classification
rand_forest aorsf classification
rand_forest aorsf regression

Note that the catboost engine package isn’t available on CRAN, and should thus be installed according to their documentation.

Code of Conduct

Please note that the bonsai project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("bonsai")

0.4.1 by Emil Hvitfeldt, 5 months ago


https://bonsai.tidymodels.org/, https://github.com/tidymodels/bonsai


Report a bug at https://github.com/tidymodels/bonsai/issues


Browse source code at https://github.com/cran/bonsai


Authors: Daniel Falbel [aut] , Athos Damiani [aut] , Roel M. Hogervorst [aut] (ORCID: , Max Kuhn [aut] , Simon Couch [aut] , Emil Hvitfeldt [aut, cre] (ORCID: , Posit Software , PBC [cph, fnd] (ROR: <https://ror.org/03wc8by49>)


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports cli, dials, dplyr, purrr, rlang, stats, tibble, utils, withr

Depends on parsnip

Suggests aorsf, covr, knitr, lightgbm, Matrix, modeldata, partykit, rmarkdown, rsample, testthat, tune


Imported by sae.projection.

Suggested by bundle, fastml, orbital, tidyAML, tidypredict.


See at CRAN