Fix outlier detection for "fast outliers"

closes #329
This commit is contained in:
sharkdp authored and David Peter committed 2020-10-15 22:37:54 +02:00
1 parent daf5ced498
commit 674b5422ab
3 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -392,7 +392,7 @@ pub fn run_benchmark(
let scores = modified_zscores(&times_real);
if scores[0] > OUTLIER_THRESHOLD {
warnings.push(Warnings::SlowInitialRun(times_real[0]));
} else if scores.iter().any(|&s| s > OUTLIER_THRESHOLD) {
} else if scores.iter().any(|&s| s.abs() > OUTLIER_THRESHOLD) {
warnings.push(Warnings::OutliersDetected);
}
+1 -1
View File
@@ -12,7 +12,7 @@ use statistical::median;
pub const OUTLIER_THRESHOLD: f64 = 1.4826 * 10.0;
/// Compute modifized Z-scores for a given sample. A (unmodified) Z-score is defined by
/// `(x_i - x_mean)/x_stddev` whereas the modified Z-score is defined by `|x_i - x_median|/MAD`
/// `(x_i - x_mean)/x_stddev` whereas the modified Z-score is defined by `(x_i - x_median)/MAD`
/// where MAD is the median average deviation.
///
/// References: