Skip to content

Commit 7f78621

Browse files
committed
Merge branch 'feature/add-adaboost-ensemble' of https://github.com/rathideep22/linfa into feature/add-adaboost-ensemble
2 parents 24d01ad + 441e6ff commit 7f78621

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

algorithms/linfa-ensemble/src/adaboost.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ where
259259
// Handle edge cases for weighted error
260260
if weighted_error <= 0.0 {
261261
// Perfect prediction - add model with maximum weight and stop
262-
model_weights.push(10.0); // Large weight for perfect classifier
262+
model_weights.push(PERFECT_CLASSIFIER_WEIGHT); // Large weight for perfect classifier
263263
models.push(model);
264264
break;
265265
}

algorithms/linfa-ensemble/src/adaboost_hyperparams.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use rand::Rng;
2020
/// * `model_params`: The parameters for the base learner (weak classifier). Typically, shallow
2121
/// decision trees (stumps with max_depth=1 or max_depth=2) are used as weak learners.
2222
///
23-
/// * `rng`: Random number generator used for tie-breaking and reproducibility.
23+
/// * `rng`: Random number generator used for bootstrap sampling and reproducibility.
2424
#[derive(Clone, Copy, Debug, PartialEq)]
2525
pub struct AdaBoostValidParams<P, R> {
2626
/// The maximum number of estimators to train

0 commit comments

Comments
 (0)