Expand description
§ferrolearn-tree
Decision tree and ensemble tree models for the ferrolearn machine learning framework.
This crate provides implementations of:
DecisionTreeClassifier/DecisionTreeRegressor— CART decision trees with configurable splitting criteria, depth limits, and minimum sample constraints.RandomForestClassifier/RandomForestRegressor— Bootstrap-aggregated ensembles of decision trees with random feature subsets, built in parallel viarayon.GradientBoostingClassifier/GradientBoostingRegressor— Gradient boosting ensembles that sequentially fit trees to the negative gradient of a loss function.HistGradientBoostingClassifier/HistGradientBoostingRegressor— Histogram-based gradient boosting with O(n_bins) split finding, subtraction trick, native NaN support, and optional best-first (leaf-wise) growth.AdaBoostClassifier— Adaptive Boosting using decision tree stumps with SAMME and SAMME.R algorithms.ExtraTreeClassifier/ExtraTreeRegressor— Extremely randomized trees where split thresholds are chosen randomly rather than via exhaustive search.ExtraTreesClassifier/ExtraTreesRegressor— Ensembles of extremely randomized trees with Rayon parallel fitting. No bootstrap by default.IsolationForest— Anomaly detection via random isolation trees.VotingClassifier/VotingRegressor— Ensembles of decision trees with varying hyperparameters, aggregated by majority vote or averaging.RandomTreesEmbedding— Unsupervised feature transformation via one-hot encoded leaf indices across an ensemble of randomly built trees.
§Design
Each model follows the compile-time safety pattern:
- The unfitted struct (e.g.,
DecisionTreeClassifier<F>) holds hyperparameters and implementsFit. - Calling
fit()produces a new fitted type (e.g.,FittedDecisionTreeClassifier<F>) that implementsPredict. - Calling
predict()on an unfitted model is a compile-time error.
§Pipeline Integration
All models implement PipelineEstimator
for f64, allowing them to be used as the final step in a
Pipeline.
§Float Generics
All models are generic over F: num_traits::Float + Send + Sync + 'static,
supporting both f32 and f64.
Re-exports§
pub use adaboost::AdaBoostAlgorithm;pub use adaboost::AdaBoostClassifier;pub use adaboost::FittedAdaBoostClassifier;pub use decision_tree::ClassificationCriterion;pub use decision_tree::DecisionTreeClassifier;pub use decision_tree::DecisionTreeRegressor;pub use decision_tree::FittedDecisionTreeClassifier;pub use decision_tree::FittedDecisionTreeRegressor;pub use decision_tree::Node;pub use decision_tree::RegressionCriterion;pub use extra_tree::ExtraTreeClassifier;pub use extra_tree::ExtraTreeRegressor;pub use extra_tree::FittedExtraTreeClassifier;pub use extra_tree::FittedExtraTreeRegressor;pub use extra_trees_ensemble::ExtraTreesClassifier;pub use extra_trees_ensemble::ExtraTreesRegressor;pub use extra_trees_ensemble::FittedExtraTreesClassifier;pub use extra_trees_ensemble::FittedExtraTreesRegressor;pub use gradient_boosting::ClassificationLoss;pub use gradient_boosting::FittedGradientBoostingClassifier;pub use gradient_boosting::FittedGradientBoostingRegressor;pub use gradient_boosting::GradientBoostingClassifier;pub use gradient_boosting::GradientBoostingRegressor;pub use gradient_boosting::RegressionLoss;pub use hist_gradient_boosting::FittedHistGradientBoostingClassifier;pub use hist_gradient_boosting::FittedHistGradientBoostingRegressor;pub use hist_gradient_boosting::HistClassificationLoss;pub use hist_gradient_boosting::HistGradientBoostingClassifier;pub use hist_gradient_boosting::HistGradientBoostingRegressor;pub use hist_gradient_boosting::HistNode;pub use hist_gradient_boosting::HistRegressionLoss;pub use isolation_forest::FittedIsolationForest;pub use isolation_forest::IsolationForest;pub use random_forest::FittedRandomForestClassifier;pub use random_forest::FittedRandomForestRegressor;pub use random_forest::MaxFeatures;pub use random_forest::RandomForestClassifier;pub use random_forest::RandomForestRegressor;pub use random_trees_embedding::FittedRandomTreesEmbedding;pub use random_trees_embedding::RandomTreesEmbedding;pub use voting::FittedVotingClassifier;pub use voting::FittedVotingRegressor;pub use voting::VotingClassifier;pub use voting::VotingRegressor;
Modules§
- adaboost
- AdaBoost classifier.
- decision_
tree - CART decision tree classifiers and regressors.
- extra_
tree - Extremely randomized tree classifiers and regressors.
- extra_
trees_ ensemble - Extremely randomized trees ensemble classifiers and regressors.
- gradient_
boosting - Gradient boosting classifiers and regressors.
- hist_
gradient_ boosting - Histogram-based gradient boosting classifiers and regressors.
- isolation_
forest - Isolation forest anomaly detection.
- random_
forest - Random forest classifiers and regressors.
- random_
trees_ embedding - Random trees embedding for unsupervised feature transformation.
- voting
- Voting ensemble classifiers and regressors.