Class Anomaly

java.lang.Object
co.elastic.clients.elasticsearch.ml.Anomaly
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class Anomaly extends Object implements JsonpSerializable
See Also:
  • Field Details

  • Method Details

    • of

    • actual

      public final List<Double> actual()
      The actual value for the bucket.

      API name: actual

    • anomalyScoreExplanation

      @Nullable public final AnomalyExplanation anomalyScoreExplanation()
      Information about the factors impacting the initial anomaly score.

      API name: anomaly_score_explanation

    • bucketSpan

      public final long bucketSpan()
      Required - The length of the bucket in seconds. This value matches the bucket_span that is specified in the job.

      API name: bucket_span

    • byFieldName

      @Nullable public final String byFieldName()
      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.

      API name: by_field_name

    • byFieldValue

      @Nullable public final String byFieldValue()
      The value of by_field_name.

      API name: by_field_value

    • causes

      public final List<AnomalyCause> causes()
      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.

      API name: causes

    • detectorIndex

      public final int detectorIndex()
      Required - A unique identifier for the detector.

      API name: detector_index

    • fieldName

      @Nullable public final String fieldName()
      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.

      API name: field_name

    • function

      @Nullable public final String function()
      The function in which the anomaly occurs, as specified in the detector configuration. For example, max.

      API name: function

    • functionDescription

      @Nullable public final String functionDescription()
      The description of the function in which the anomaly occurs, as specified in the detector configuration.

      API name: function_description

    • geoResults

      @Nullable public final GeoResults geoResults()
      If the detector function is lat_long, this object contains comma delimited strings for the latitude and longitude of the actual and typical values.

      API name: geo_results

    • influencers

      public final List<Influence> influencers()
      If influencers were specified in the detector configuration, this array contains influencers that contributed to or were to blame for an anomaly.

      API name: influencers

    • initialRecordScore

      public final double initialRecordScore()
      Required - 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.

      API name: initial_record_score

    • isInterim

      public final boolean isInterim()
      Required - If true, this is an interim result. In other words, the results are calculated based on partial input data.

      API name: is_interim

    • jobId

      public final String jobId()
      Required - Identifier for the anomaly detection job.

      API name: job_id

    • overFieldName

      @Nullable public final String overFieldName()
      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.

      API name: over_field_name

    • overFieldValue

      @Nullable public final String overFieldValue()
      The value of over_field_name.

      API name: over_field_value

    • partitionFieldName

      @Nullable public final String partitionFieldName()
      The field used to segment the analysis. When you use this property, you have completely independent baselines for each value of this field.

      API name: partition_field_name

    • partitionFieldValue

      @Nullable public final String partitionFieldValue()
      The value of partition_field_name.

      API name: partition_field_value

    • probability

      public final double probability()
      Required - 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.

      API name: probability

    • recordScore

      public final double recordScore()
      Required - 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.

      API name: record_score

    • resultType

      public final String resultType()
      Required - Internal. This is always set to record.

      API name: result_type

    • timestamp

      public final long timestamp()
      Required - The start time of the bucket for which these results were calculated.

      API name: timestamp

    • typical

      public final List<Double> typical()
      The typical value for the bucket, according to analytical modeling.

      API name: typical

    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setupAnomalyDeserializer

      protected static void setupAnomalyDeserializer(ObjectDeserializer<Anomaly.Builder> op)