[ML] Lowers multi-bucket impact thresholds used for anomaly display (#24136) (#24191)

* [ML] Lowers multi-bucket impact thresholds used for anomaly display

* [ML] Adjust thresholds used in multi bucket impact unit tests
This commit is contained in:
Pete Harverson 2018-10-18 12:59:58 +01:00 committed by GitHub
parent e42ecd794f
commit 44c89d9360
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 9 deletions

View file

@ -7,9 +7,12 @@
// Thresholds for indicating the impact of multi-bucket features in an anomaly.
// As a rule-of-thumb, a threshold value T corresponds to the multi-bucket probability
// being 1000^(T/5) times smaller than the single bucket probability.
// So, for example, for HIGH it is 63 times smaller.
export const MULTI_BUCKET_IMPACT = {
HIGH: 4,
MEDIUM: 3,
HIGH: 3,
MEDIUM: 2,
LOW: 1,
NONE: -5
};

View file

@ -284,19 +284,19 @@ describe('ML - anomaly utils', () => {
describe('getMultiBucketImpactLabel', () => {
it('returns high for 4 <= score <= 5', () => {
expect(getMultiBucketImpactLabel(4)).to.be('high');
it('returns high for 3 <= score <= 5', () => {
expect(getMultiBucketImpactLabel(3)).to.be('high');
expect(getMultiBucketImpactLabel(5)).to.be('high');
});
it('returns medium for 3 <= score < 4', () => {
expect(getMultiBucketImpactLabel(3)).to.be('medium');
expect(getMultiBucketImpactLabel(3.99)).to.be('medium');
it('returns medium for 2 <= score < 3', () => {
expect(getMultiBucketImpactLabel(2)).to.be('medium');
expect(getMultiBucketImpactLabel(2.99)).to.be('medium');
});
it('returns low for 1 <= score < 3', () => {
it('returns low for 1 <= score < 2', () => {
expect(getMultiBucketImpactLabel(1)).to.be('low');
expect(getMultiBucketImpactLabel(2.99)).to.be('low');
expect(getMultiBucketImpactLabel(1.99)).to.be('low');
});
it('returns none for -5 <= score < 1', () => {