Expand description
This crate implements machine learning models for regression and classification using ensembles of decision trees. It has many similarities to LightGBM, XGBoost, and others, but is written in pure Rust.
For an example of regression, see benchmarks/boston.rs
.rs. For an example of binary classification, see
benchmarks/heart_disease.rs. For an example of multiclass classification, see
benchmarks/iris.rs`.
Modules§
Structs§
- Binary
Classifier BinaryClassifier
s predict binary target values, for example whether a patient has heart disease or not.- Binary
Classifier Train Output - This struct is returned by
BinaryClassifier::train
. - Branch
Node - A
BranchNode
is a branch in a tree. - Branch
Split Continuous - A continuous branch split takes the value of a single number feature, compares it with a
split_value
, and if the value is <=split_value
, the example is sent left, and if it is >split_value
, it is sent right. - Branch
Split Discrete - A discrete branch split takes the value of a single enum feature and looks up in a bitset which way the example should be sent.
- Early
Stopping Options - The parameters in this struct control how to determine whether training should stop early after each round or epoch.
- Leaf
Node - The leaves in a tree hold the values to output for examples that get sent to them.
- Multiclass
Classifier MulticlasClassifier
s predict multiclass target values, for example which of several species a flower is.- Multiclass
Classifier Train Output - This struct is returned by
MulticlassClassifier::train
. - Progress
- Regressor
Regressor
s predict continuous target values, for example the selling price of a home.- Regressor
Train Output - This struct is returned by
Regressor::train
. - Train
Options - These are the options passed to
Regressor::train
,BinaryClassifier::train
, andMulticlassClassifier::train
. - Tree
- Trees are stored as a
Vec
ofNode
s. Each branch in the tree has two indexes into theVec
, one for each of its children.
Enums§
- Binned
Features Layout - This enum defines whether binned features will be layed out in row major or column major order.
- Branch
Split - A
BranchSplit
describes how examples are sent to the left or right child given their feature values. AContinous
split is used for number features, andDiscrete
is used for enum features. - Node
- A node is either a branch or a leaf.
- Split
Direction - Train
Progress Event - This struct describes the training progress.