File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
algorithms/linfa-ensemble Expand file tree Collapse file tree 2 files changed +7
-7
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 33//! Ensemble methods combine the predictions of several base estimators built with a given
44//! learning algorithm in order to improve generalizability / robustness over a single estimator.
55//!
6- //! ## Random Forest
6+ //! ## Bootstrap Aggregation (aka Bagging)
77//!
8- //! A typical example of ensemble method is random forest , which combines the predictions of
9- //! several decision trees (see `linfa-trees`) trained on different parts of the same training set .
8+ //! A typical example of ensemble method is Bootstrapo AGgregation , which combines the predictions of
9+ //! several decision trees (see `linfa-trees`) trained on different samples subset of the training dataset .
1010//!
1111//! ## Reference
1212//!
1313//! * [Scikit-Learn User Guide](https://scikit-learn.org/stable/modules/ensemble.html)
1414//!
1515//! ## Example
1616//!
17- //! This example shows how to train a random forest model using 100 decision trees,
17+ //! This example shows how to train a bagging model using 100 decision trees,
1818//! each trained on 70% of the training data (bootstrap sampling).
1919//!
2020//! ```no_run
3030//! .shuffle(&mut rng)
3131//! .split_with_ratio(0.8);
3232//!
33- //! // Train a random forest model on the iris dataset
34- //! let random_forest_model = EnsembleLearnerParams::new(DecisionTree::params())
33+ //! // Train the model on the iris dataset
34+ //! let bagging_model = EnsembleLearnerParams::new(DecisionTree::params())
3535//! .ensemble_size(100)
3636//! .bootstrap_proportion(0.7)
3737//! .fit(&train)
3838//! .unwrap();
3939//!
4040//! // Make predictions on the test set
41- //! let predictions = random_forest_model .predict(&test);
41+ //! let predictions = bagging_model .predict(&test);
4242//! ```
4343//!
4444mod algorithm;
You can’t perform that action at this time.
0 commit comments