Skip to content

Commit 1735ea6

Browse files
Volodymyr OrlovVolodymyr Orlov
authored andcommitted
fix: broken unit tests
1 parent ecfbaac commit 1735ea6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/ensemble/random_forest_classifier.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ impl<T: RealNumber> RandomForestClassifier<T> {
222222
mod tests {
223223
use super::*;
224224
use crate::linalg::naive::dense_matrix::DenseMatrix;
225+
use crate::metrics::*;
225226

226227
#[test]
227228
fn fit_predict_iris() {
@@ -264,7 +265,8 @@ mod tests {
264265
},
265266
);
266267

267-
assert_eq!(y, classifier.predict(&x));
268+
assert!(accuracy(&y, &classifier.predict(&x)) > 0.9);
269+
268270
}
269271

270272
#[test]

src/linalg/ndarray_bindings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ mod tests {
735735
min_samples_leaf: 1,
736736
min_samples_split: 2,
737737
n_trees: 1000,
738-
mtry: Option::None,
738+
m: Option::None,
739739
},
740740
)
741741
.predict(&x);

0 commit comments

Comments
 (0)