diff --git a/src/ensemble/random_forest_regressor.rs b/src/ensemble/random_forest_regressor.rs index f1caa8e..90ac479 100644 --- a/src/ensemble/random_forest_regressor.rs +++ b/src/ensemble/random_forest_regressor.rs @@ -203,7 +203,11 @@ impl RandomForestRegressor { trees.push(tree); } - Ok(RandomForestRegressor { parameters, trees, samples: maybe_all_samples }) + Ok(RandomForestRegressor { + parameters, + trees, + samples: maybe_all_samples, + }) } /// Predict class for `x` @@ -232,7 +236,6 @@ impl RandomForestRegressor { result / T::from(n_trees).unwrap() } - /// Predict OOB classes for `x`. `x` is expected to be equal to the dataset used in training. pub fn predict_oob>(&self, x: &M) -> Result { let (n, _) = x.shape(); @@ -370,7 +373,8 @@ mod tests { m: Option::None, keep_samples: true, }, - ).unwrap(); + ) + .unwrap(); let y_hat = regressor.predict(&x).unwrap(); let y_hat_oob = regressor.predict_oob(&x).unwrap();