ferrolearn-tree
Decision tree and ensemble tree models for the ferrolearn machine learning framework.
Algorithms
| Model | Description |
|---|---|
DecisionTreeClassifier |
CART classification tree with Gini impurity or entropy splitting |
DecisionTreeRegressor |
CART regression tree with MSE or MAE splitting |
RandomForestClassifier |
Bootstrap-aggregated ensemble with parallel tree building via Rayon |
RandomForestRegressor |
Random forest for regression tasks |
GradientBoostingClassifier |
Sequential gradient boosting with configurable loss functions |
GradientBoostingRegressor |
Gradient boosting for regression (least squares, LAD, Huber) |
AdaBoostClassifier |
Adaptive Boosting with SAMME and SAMME.R algorithms |
Example
use ;
use ;
use ;
let x = from_shape_vec.unwrap;
let y = array!;
let model = new
.with_n_estimators
.with_max_features;
let fitted = model.fit.unwrap;
let predictions = fitted.predict.unwrap;
All tree hyperparameters (max depth, min samples split, min samples leaf, etc.) are configurable via builder methods.
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.