Skip to content

Commit 51188c5

Browse files
committed
nullable types in anomaly cause, missing field (#3707) (#3717)
(cherry picked from commit 7c6161b) Co-authored-by: Laura Trotta <[email protected]>
1 parent be57442 commit 51188c5

File tree

3 files changed

+147
-41
lines changed

3 files changed

+147
-41
lines changed

output/schema/schema.json

Lines changed: 60 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 19 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/ml/_types/Anomaly.ts

Lines changed: 68 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,78 @@ export class Anomaly {
4747
}
4848

4949
export class AnomalyCause {
50-
actual: double[]
51-
by_field_name: Name
52-
by_field_value: string
53-
correlated_by_field_value: string
54-
field_name: Field
55-
function: string
56-
function_description: string
57-
influencers: Influence[]
58-
over_field_name: Name
59-
over_field_value: string
60-
partition_field_name: string
61-
partition_field_value: string
50+
actual?: double[]
51+
by_field_name?: Name
52+
by_field_value?: string
53+
correlated_by_field_value?: string
54+
field_name?: Field
55+
function?: string
56+
function_description?: string
57+
geo_results?: GeoResults
58+
influencers?: Influence[]
59+
over_field_name?: Name
60+
over_field_value?: string
61+
partition_field_name?: string
62+
partition_field_value?: string
6263
probability: double
63-
typical: double[]
64+
typical?: double[]
6465
}
6566

6667
export class Influence {
6768
influencer_field_name: string
6869
influencer_field_values: string[]
6970
}
71+
72+
export class GeoResults {
73+
/**
74+
* The actual value for the bucket formatted as a `geo_point`.
75+
*/
76+
actual_point?: string
77+
/**
78+
* The typical value for the bucket formatted as a `geo_point`.
79+
*/
80+
typical_point?: string
81+
}
82+
83+
export class AnomalyExplanation {
84+
/**
85+
* Impact from the duration and magnitude of the detected anomaly relative to the historical average.
86+
*/
87+
anomaly_characteristics_impact?: integer
88+
/**
89+
* Length of the detected anomaly in the number of buckets.
90+
*/
91+
anomaly_length?: integer
92+
/**
93+
* Type of the detected anomaly: `spike` or `dip`.
94+
*/
95+
anomaly_type?: string
96+
/**
97+
* Indicates reduction of anomaly score for the bucket with large confidence intervals. If a bucket has large confidence intervals, the score is reduced.
98+
*/
99+
high_variance_penalty?: boolean
100+
/**
101+
* If the bucket contains fewer samples than expected, the score is reduced.
102+
*/
103+
incomplete_bucket_penalty?: boolean
104+
/**
105+
* Lower bound of the 95% confidence interval.
106+
*/
107+
lower_confidence_bound?: double
108+
/**
109+
* Impact of the deviation between actual and typical values in the past 12 buckets.
110+
*/
111+
multi_bucket_impact?: integer
112+
/**
113+
* Impact of the deviation between actual and typical values in the current bucket.
114+
*/
115+
single_bucket_impact?: integer
116+
/**
117+
* Typical (expected) value for this bucket.
118+
*/
119+
typical_value?: double
120+
/**
121+
* Upper bound of the 95% confidence interval.
122+
*/
123+
upper_confidence_bound?: double
124+
}

0 commit comments

Comments
 (0)