Class Anomaly.Builder
- All Implemented Interfaces:
WithJson<Anomaly.Builder>
,ObjectBuilder<Anomaly>
- Enclosing class:
- Anomaly
Anomaly
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal Anomaly.Builder
The actual value for the bucket.final Anomaly.Builder
The actual value for the bucket.final Anomaly.Builder
Information about the factors impacting the initial anomaly score.final Anomaly.Builder
Information about the factors impacting the initial anomaly score.final Anomaly.Builder
bucketSpan
(long value) Required - The length of the bucket in seconds.build()
Builds aAnomaly
.final Anomaly.Builder
byFieldName
(String value) The field used to split the data.final Anomaly.Builder
byFieldValue
(String value) The value ofby_field_name
.final Anomaly.Builder
causes
(AnomalyCause value, AnomalyCause... values) For population analysis, an over field must be specified in the detector.final Anomaly.Builder
For population analysis, an over field must be specified in the detector.final Anomaly.Builder
causes
(List<AnomalyCause> list) For population analysis, an over field must be specified in the detector.final Anomaly.Builder
detectorIndex
(int value) Required - A unique identifier for the detector.final Anomaly.Builder
Certain functions require a field to operate on, for example,sum()
.final Anomaly.Builder
The function in which the anomaly occurs, as specified in the detector configuration.final Anomaly.Builder
functionDescription
(String value) The description of the function in which the anomaly occurs, as specified in the detector configuration.final Anomaly.Builder
geoResults
(GeoResults value) If the detector function islat_long
, this object contains comma delimited strings for the latitude and longitude of the actual and typical values.final Anomaly.Builder
If the detector function islat_long
, this object contains comma delimited strings for the latitude and longitude of the actual and typical values.final Anomaly.Builder
influencers
(Influence value, Influence... values) If influencers were specified in the detector configuration, this array contains influencers that contributed to or were to blame for an anomaly.final Anomaly.Builder
If influencers were specified in the detector configuration, this array contains influencers that contributed to or were to blame for an anomaly.final Anomaly.Builder
influencers
(List<Influence> list) If influencers were specified in the detector configuration, this array contains influencers that contributed to or were to blame for an anomaly.final Anomaly.Builder
initialRecordScore
(double value) Required - A normalized score between 0-100, which is based on the probability of the anomalousness of this record.final Anomaly.Builder
isInterim
(boolean value) Required - If true, this is an interim result.final Anomaly.Builder
Required - Identifier for the anomaly detection job.final Anomaly.Builder
overFieldName
(String value) The field used to split the data.final Anomaly.Builder
overFieldValue
(String value) The value ofover_field_name
.final Anomaly.Builder
partitionFieldName
(String value) The field used to segment the analysis.final Anomaly.Builder
partitionFieldValue
(String value) The value ofpartition_field_name
.final Anomaly.Builder
probability
(double value) Required - The probability of the individual anomaly occurring, in the range 0 to 1.final Anomaly.Builder
recordScore
(double value) Required - A normalized score between 0-100, which is based on the probability of the anomalousness of this record.final Anomaly.Builder
resultType
(String value) Required - Internal.protected Anomaly.Builder
self()
final Anomaly.Builder
timestamp
(long value) Required - The start time of the bucket for which these results were calculated.final Anomaly.Builder
The typical value for the bucket, according to analytical modeling.final Anomaly.Builder
The typical value for the bucket, according to analytical modeling.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
actual
The actual value for the bucket.API name:
actual
Adds all elements of
list
toactual
. -
actual
The actual value for the bucket.API name:
actual
Adds one or more values to
actual
. -
anomalyScoreExplanation
Information about the factors impacting the initial anomaly score.API name:
anomaly_score_explanation
-
anomalyScoreExplanation
public final Anomaly.Builder anomalyScoreExplanation(Function<AnomalyExplanation.Builder, ObjectBuilder<AnomalyExplanation>> fn) Information about the factors impacting the initial anomaly score.API name:
anomaly_score_explanation
-
bucketSpan
Required - The length of the bucket in seconds. This value matches thebucket_span
that is specified in the job.API name:
bucket_span
-
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
The value ofby_field_name
.API name:
by_field_value
-
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 theover_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. Thecauses
resource contains similar elements to the record resource, namelyactual
,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
Adds all elements of
list
tocauses
. -
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 theover_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. Thecauses
resource contains similar elements to the record resource, namelyactual
,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
Adds one or more values to
causes
. -
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 theover_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. Thecauses
resource contains similar elements to the record resource, namelyactual
,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
Adds a value to
causes
using a builder lambda. -
detectorIndex
Required - A unique identifier for the detector.API name:
detector_index
-
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
The function in which the anomaly occurs, as specified in the detector configuration. For example,max
.API name:
function
-
functionDescription
The description of the function in which the anomaly occurs, as specified in the detector configuration.API name:
function_description
-
geoResults
If the detector function islat_long
, this object contains comma delimited strings for the latitude and longitude of the actual and typical values.API name:
geo_results
-
geoResults
If the detector function islat_long
, this object contains comma delimited strings for the latitude and longitude of the actual and typical values.API name:
geo_results
-
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
Adds all elements of
list
toinfluencers
. -
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
Adds one or more values to
influencers
. -
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
Adds a value to
influencers
using a builder lambda. -
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
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
Required - Identifier for the anomaly detection job.API name:
job_id
-
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
The value ofover_field_name
.API name:
over_field_value
-
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
The value ofpartition_field_name
.API name:
partition_field_value
-
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 therecord_score
is provided as a human-readable and friendly interpretation of this.API name:
probability
-
recordScore
Required - A normalized score between 0-100, which is based on the probability of the anomalousness of this record. Unlikeinitial_record_score
, this value will be updated by a re-normalization process as new data is analyzed.API name:
record_score
-
resultType
Required - Internal. This is always set torecord
.API name:
result_type
-
timestamp
Required - The start time of the bucket for which these results were calculated.API name:
timestamp
-
typical
The typical value for the bucket, according to analytical modeling.API name:
typical
Adds all elements of
list
totypical
. -
typical
The typical value for the bucket, according to analytical modeling.API name:
typical
Adds one or more values to
typical
. -
self
- Specified by:
self
in classWithJsonObjectBuilderBase<Anomaly.Builder>
-
build
Builds aAnomaly
.- Specified by:
build
in interfaceObjectBuilder<Anomaly>
- Throws:
NullPointerException
- if some of the required fields are null.
-