Skip to content

Commit

Permalink
[ML] fix count ks test aggregator test consistency (#75793) (#75835)
Browse files Browse the repository at this point in the history
testKsTest_LowerTailedValues is failing due to distribution
issues. The random variables in the sparse case are too
uniform and causing two-sided alternative
tests to not be consistent.

closes #74909

Co-authored-by: Benjamin Trent <ben.w.trent@gmail.com>
  • Loading branch information
elasticsearchmachine and benwtrent committed Jul 29, 2021
1 parent 6d8c033 commit 49b312a
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -32,8 +32,8 @@ public class BucketCountKSTestAggregatorTests extends ESTestCase {
new double[] { 40, 60, 20, 30, 30, 10, 10, 10, 10, 10 }
);
private static final MlAggsHelper.DoubleBucketValues LOWER_TAILED_VALUES_SPARSE = new MlAggsHelper.DoubleBucketValues(
new long[] { 4, 6, 2, 3, 3, 2, 1, 1, 1, 1 },
new double[] { 4, 6, 2, 3, 3, 2, 1, 1, 1, 1 }
new long[] { 4, 8, 2, 3, 3, 2, 1, 1, 1, 0 },
new double[] { 4, 8, 2, 3, 3, 2, 1, 1, 1, 0 }
);

private static final MlAggsHelper.DoubleBucketValues UPPER_TAILED_VALUES = new MlAggsHelper.DoubleBucketValues(
Expand Down

0 comments on commit 49b312a

Please sign in to comment.