smartcore/tree/
mod.rs

1//! # Classification and regression trees
2//!
3//! Tree-based methods are simple, nonparametric and useful algorithms in machine learning that are easy to understand and interpret.
4//!
5//! Decision trees recursively partition the predictor space \\(X\\) into k distinct and non-overlapping rectangular regions \\(R_1, R_2,..., R_k\\)
6//! and fit a simple prediction model within each region. In order to make a prediction for a given observation, \\(\hat{y}\\)
7//! decision tree typically use the mean or the mode of the training observations in the region \\(R_j\\) to which it belongs.
8//!
9//! Decision trees suffer from high variance and often does not deliver best prediction accuracy when compared to other supervised learning approaches, such as linear and logistic regression.
10//! Hence some techniques such as [Random Forests](../ensemble/index.html) use more than one decision tree to improve performance of the algorithm.
11//!
12//! `smartcore` uses [CART](https://en.wikipedia.org/wiki/Predictive_analytics#Classification_and_regression_trees_.28CART.29) learning technique to build both classification and regression trees.
13//!
14//! ## References:
15//!
16//! * ["Classification and regression trees", Breiman, L, Friedman, J H, Olshen, R A, and Stone, C J, 1984](https://www.sciencebase.gov/catalog/item/545d07dfe4b0ba8303f728c1)
17//! * ["An Introduction to Statistical Learning", James G., Witten D., Hastie T., Tibshirani R., Chapter 8](http://faculty.marshall.usc.edu/gareth-james/ISL/)
18//!
19//! <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
20//! <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
21
22/// Classification tree for dependent variables that take a finite number of unordered values.
23pub mod decision_tree_classifier;
24/// Regression tree for for dependent variables that take continuous or ordered discrete values.
25pub mod decision_tree_regressor;