diff --git a/output/schema/schema.json b/output/schema/schema.json index 938c7676af..667bfce409 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -120982,6 +120982,18 @@ } } }, + { + "description": "Information about the factors impacting the initial anomaly score.", + "name": "anomaly_score_explanation", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "AnomalyExplanation", + "namespace": "ml._types" + } + } + }, { "name": "bucket_span", "required": true, @@ -121241,7 +121253,7 @@ } } ], - "specLocation": "ml/_types/Anomaly.ts#L24-L47" + "specLocation": "ml/_types/Anomaly.ts#L24-L51" }, { "kind": "interface", @@ -121414,7 +121426,137 @@ } } ], - "specLocation": "ml/_types/Anomaly.ts#L49-L64" + "specLocation": "ml/_types/Anomaly.ts#L53-L68" + }, + { + "kind": "interface", + "name": { + "name": "AnomalyExplanation", + "namespace": "ml._types" + }, + "properties": [ + { + "description": "Impact from the duration and magnitude of the detected anomaly relative to the historical average.", + "name": "anomaly_characteristics_impact", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "Length of the detected anomaly in the number of buckets.", + "name": "anomaly_length", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "Type of the detected anomaly: `spike` or `dip`.", + "name": "anomaly_type", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "Indicates reduction of anomaly score for the bucket with large confidence intervals. If a bucket has large confidence intervals, the score is reduced.", + "name": "high_variance_penalty", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "If the bucket contains fewer samples than expected, the score is reduced.", + "name": "incomplete_bucket_penalty", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "Lower bound of the 95% confidence interval.", + "name": "lower_confidence_bound", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } + } + }, + { + "description": "Impact of the deviation between actual and typical values in the past 12 buckets.", + "name": "multi_bucket_impact", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "Impact of the deviation between actual and typical values in the current bucket.", + "name": "single_bucket_impact", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "Typical (expected) value for this bucket.", + "name": "typical_value", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } + } + }, + { + "description": "Upper bound of the 95% confidence interval.", + "name": "upper_confidence_bound", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } + } + } + ], + "specLocation": "ml/_types/Anomaly.ts#L75-L116" }, { "kind": "interface", @@ -126949,7 +127091,7 @@ } } ], - "specLocation": "ml/_types/Anomaly.ts#L66-L69" + "specLocation": "ml/_types/Anomaly.ts#L70-L73" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 3925c8d4ed..03fcbeb54d 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -11631,6 +11631,7 @@ export interface MlAnalysisMemoryLimit { export interface MlAnomaly { actual?: double[] + anomaly_score_explanation?: MlAnomalyExplanation bucket_span: DurationValue by_field_name?: string by_field_value?: string @@ -11671,6 +11672,19 @@ export interface MlAnomalyCause { typical: double[] } +export interface MlAnomalyExplanation { + anomaly_characteristics_impact?: integer + anomaly_length?: integer + anomaly_type?: string + high_variance_penalty?: boolean + incomplete_bucket_penalty?: boolean + lower_confidence_bound?: double + multi_bucket_impact?: integer + single_bucket_impact?: integer + typical_value?: double + upper_confidence_bound?: double +} + export interface MlApiKeyAuthorization { id: string name: string diff --git a/specification/ml/_types/Anomaly.ts b/specification/ml/_types/Anomaly.ts index 621231ecd4..514a3c4659 100644 --- a/specification/ml/_types/Anomaly.ts +++ b/specification/ml/_types/Anomaly.ts @@ -23,6 +23,10 @@ import { DurationValue, EpochTime, UnitMillis, UnitSeconds } from '@_types/Time' export class Anomaly { actual?: double[] + /** + * Information about the factors impacting the initial anomaly score. + */ + anomaly_score_explanation?: AnomalyExplanation bucket_span: DurationValue by_field_name?: string by_field_value?: string @@ -67,3 +71,46 @@ export class Influence { influencer_field_name: string influencer_field_values: string[] } + +export class AnomalyExplanation { + /** + * Impact from the duration and magnitude of the detected anomaly relative to the historical average. + */ + anomaly_characteristics_impact?: integer + /** + * Length of the detected anomaly in the number of buckets. + */ + anomaly_length?: integer + /** + * Type of the detected anomaly: `spike` or `dip`. + */ + anomaly_type?: string + /** + * Indicates reduction of anomaly score for the bucket with large confidence intervals. If a bucket has large confidence intervals, the score is reduced. + */ + high_variance_penalty?: boolean + /** + * If the bucket contains fewer samples than expected, the score is reduced. + */ + incomplete_bucket_penalty?: boolean + /** + * Lower bound of the 95% confidence interval. + */ + lower_confidence_bound?: double + /** + * Impact of the deviation between actual and typical values in the past 12 buckets. + */ + multi_bucket_impact?: integer + /** + * Impact of the deviation between actual and typical values in the current bucket. + */ + single_bucket_impact?: integer + /** + * Typical (expected) value for this bucket. + */ + typical_value?: double + /** + * Upper bound of the 95% confidence interval. + */ + upper_confidence_bound?: double +}