Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mec-iS committed Mar 4, 2024
1 parent 32d7e45 commit 92cb697
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/naive_bayes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ mod tests {

#[test]
fn test_predict() {
let matrix = DenseMatrix::from_2d_array(&[&[1, 2, 3], &[4, 5, 6], &[7, 8, 9]]);
let matrix = DenseMatrix::from_2d_array(&[&[1, 2, 3], &[4, 5, 6], &[7, 8, 9]]).unwrap();

let val = vec![];
match Model::fit(TestDistribution(&val)).unwrap().predict(&matrix) {
Expand Down
2 changes: 1 addition & 1 deletion src/tree/decision_tree_classifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ mod tests {
&[0., 0., 1., 1.],
&[0., 0., 0., 0.],
&[0., 0., 0., 1.],
]);
]).unwrap();
let y: Vec<u32> = vec![1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0];
let tree = DecisionTreeClassifier::fit(&x, &y, Default::default()).unwrap();
assert_eq!(
Expand Down

0 comments on commit 92cb697

Please sign in to comment.