Skip to content

Commit bb74d47

Browse files
authored
Anomaly explanation (#1982)
1 parent d9a50c0 commit bb74d47

File tree

2 files changed

+93
-5
lines changed

2 files changed

+93
-5
lines changed

output/schema/schema.json

Lines changed: 27 additions & 5 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: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,35 +22,101 @@ import { double, integer } from '@_types/Numeric'
2222
import { DurationValue, EpochTime, UnitMillis, UnitSeconds } from '@_types/Time'
2323

2424
export class Anomaly {
25+
/**
26+
* The actual value for the bucket.
27+
*/
2528
actual?: double[]
2629
/**
2730
* Information about the factors impacting the initial anomaly score.
2831
*/
2932
anomaly_score_explanation?: AnomalyExplanation
33+
/**
34+
* The length of the bucket in seconds. This value matches the `bucket_span` that is specified in the job.
35+
*/
3036
bucket_span: DurationValue<UnitSeconds>
37+
/**
38+
* The field used to split the data. In particular, this property is used for analyzing the splits with respect to their own history. It is used for finding unusual values in the context of the split.
39+
*/
3140
by_field_name?: string
41+
/**
42+
* The value of `by_field_name`.
43+
*/
3244
by_field_value?: string
45+
/**
46+
* For population analysis, an over field must be specified in the detector. This property contains an array of anomaly records that are the causes for the anomaly that has been identified for the over field. This sub-resource contains the most anomalous records for the `over_field_name`. For scalability reasons, a maximum of the 10 most significant causes of the anomaly are returned. As part of the core analytical modeling, these low-level anomaly records are aggregated for their parent over field record. The `causes` resource contains similar elements to the record resource, namely `actual`, `typical`, `geo_results.actual_point`, `geo_results.typical_point`, `*_field_name` and `*_field_value`. Probability and scores are not applicable to causes.
47+
*/
3348
causes?: AnomalyCause[]
49+
/**
50+
* A unique identifier for the detector.
51+
*/
3452
detector_index: integer
53+
/**
54+
* Certain functions require a field to operate on, for example, `sum()`. For those functions, this value is the name of the field to be analyzed.
55+
*/
3556
field_name?: string
57+
/**
58+
* The function in which the anomaly occurs, as specified in the detector configuration. For example, `max`.
59+
*/
3660
function?: string
61+
/**
62+
* The description of the function in which the anomaly occurs, as specified in the detector configuration.
63+
*/
3764
function_description?: string
3865
/**
3966
* If the detector function is `lat_long`, this object contains comma delimited strings for the latitude and longitude of the actual and typical values.
4067
*/
4168
geo_results?: GeoResults
69+
/**
70+
* If influencers were specified in the detector configuration, this array contains influencers that contributed to or were to blame for an anomaly.
71+
*/
4272
influencers?: Influence[]
73+
/**
74+
* A normalized score between 0-100, which is based on the probability of the anomalousness of this record. This is the initial value that was calculated at the time the bucket was processed.
75+
*/
4376
initial_record_score: double
77+
/**
78+
* If true, this is an interim result. In other words, the results are calculated based on partial input data.
79+
*/
4480
is_interim: boolean
81+
/**
82+
* Identifier for the anomaly detection job.
83+
*/
4584
job_id: string
85+
/**
86+
* The field used to split the data. In particular, this property is used for analyzing the splits with respect to the history of all splits. It is used for finding unusual values in the population of all splits.
87+
*/
4688
over_field_name?: string
89+
/**
90+
* The value of `over_field_name`.
91+
*/
4792
over_field_value?: string
93+
/**
94+
* The field used to segment the analysis. When you use this property, you have completely independent baselines for each value of this field.
95+
*/
4896
partition_field_name?: string
97+
/**
98+
* The value of `partition_field_name`.
99+
*/
49100
partition_field_value?: string
101+
/**
102+
* The probability of the individual anomaly occurring, in the range 0 to 1. For example, `0.0000772031`. This value can be held to a high precision of over 300 decimal places, so the `record_score` is provided as a human-readable and friendly interpretation of this.
103+
*/
50104
probability: double
105+
/**
106+
* A normalized score between 0-100, which is based on the probability of the anomalousness of this record. Unlike `initial_record_score`, this value will be updated by a re-normalization process as new data is analyzed.
107+
*/
51108
record_score: double
109+
/**
110+
* Internal. This is always set to `record`.
111+
*/
52112
result_type: string
113+
/**
114+
* The start time of the bucket for which these results were calculated.
115+
*/
53116
timestamp: EpochTime<UnitMillis>
117+
/**
118+
* The typical value for the bucket, according to analytical modeling.
119+
*/
54120
typical?: double[]
55121
}
56122

0 commit comments

Comments
 (0)