Skip to content

Commit

Permalink
change expected anomalies to make tests less likely to fail
Browse files Browse the repository at this point in the history
  • Loading branch information
nmandery committed May 12, 2021
1 parent e52217f commit 2bd303c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fn main() {

// no anomaly
assert!(forest.score(&[1.0, 3.0, 25.0]) < 0.5);
assert!(forest.score(&[1.0, 3.0, 35.0]) < 0.5);
assert!(forest.score(&[-1.0, 3.0, 25.0]) < 0.5);

// anomalies
assert!(forest.score(&[-12.0, 6.0, 25.0]) > 0.5);
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
//!
//! // no anomaly
//! assert!(forest.score(&[1.0, 3.0, 25.0]) < 0.5);
//! assert!(forest.score(&[1.0, 3.0, 35.0]) < 0.5);
//! assert!(forest.score(&[-1.0, 3.0, 25.0]) < 0.5);
//!
//! // anomalies
//! assert!(forest.score(&[-12.0, 6.0, 25.0]) > 0.5);
Expand Down Expand Up @@ -383,7 +383,7 @@ mod tests {
fn assert_anomalies_forest_3d_f64(forest: &Forest<f64, 3>) {
// no anomaly
assert!(forest.score(&[1.0, 3.0, 25.0]) < 0.5);
assert!(forest.score(&[1.0, 3.0, 35.0]) < 0.5);
assert!(forest.score(&[-1.0, 3.0, 25.0]) < 0.5);

// anomalies
assert!(forest.score(&[-12.0, 6.0, 25.0]) > 0.5);
Expand Down

0 comments on commit 2bd303c

Please sign in to comment.