Module org.elasticsearch.xcore
Class Precision
java.lang.Object
org.elasticsearch.xpack.core.ml.dataframe.evaluation.outlierdetection.Precision
- All Implemented Interfaces:
NamedWriteable,Writeable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject,EvaluationMetric
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldprotected final double[]Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringaggName(double threshold, org.elasticsearch.xpack.core.ml.dataframe.evaluation.outlierdetection.AbstractConfusionMatrixMetric.Condition condition) org.elasticsearch.core.Tuple<List<AggregationBuilder>, List<PipelineAggregationBuilder>> aggs(EvaluationParameters parameters, EvaluationFields fields) Builds the aggregation that collect required data to compute the metricprotected List<AggregationBuilder> protected AggregationBuilderbuildAgg(String actualField, String predictedProbabilityField, double threshold, org.elasticsearch.xpack.core.ml.dataframe.evaluation.outlierdetection.AbstractConfusionMatrixMetric.Condition condition) booleanevaluate(InternalAggregations aggs) static PrecisionfromXContent(org.elasticsearch.xcontent.XContentParser parser) getName()Returns the name of the metric (which may differ to the writeable name)Returns the set of fields that this metric requires in order to be calculated.Gets the evaluation result for this metric.inthashCode()voidprocess(InternalAggregations aggs) Processes given aggregations as a step towards computing resultorg.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
NAME
public static final org.elasticsearch.xcontent.ParseField NAME -
AT
public static final org.elasticsearch.xcontent.ParseField AT -
thresholds
protected final double[] thresholds
-
-
Constructor Details
-
Precision
-
Precision
- Throws:
IOException
-
-
Method Details
-
fromXContent
-
getWriteableName
-
getName
Description copied from interface:EvaluationMetricReturns the name of the metric (which may differ to the writeable name) -
equals
-
hashCode
public int hashCode() -
aggsAt
-
evaluate
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
getRequiredFields
Description copied from interface:EvaluationMetricReturns the set of fields that this metric requires in order to be calculated.- Specified by:
getRequiredFieldsin interfaceEvaluationMetric
-
aggs
public org.elasticsearch.core.Tuple<List<AggregationBuilder>,List<PipelineAggregationBuilder>> aggs(EvaluationParameters parameters, EvaluationFields fields) Description copied from interface:EvaluationMetricBuilds the aggregation that collect required data to compute the metric- Specified by:
aggsin interfaceEvaluationMetric- Parameters:
parameters- settings that may be needed by aggregationsfields- fields that may be needed by aggregations- Returns:
- the aggregations required to compute the metric
-
process
Description copied from interface:EvaluationMetricProcesses given aggregations as a step towards computing result- Specified by:
processin interfaceEvaluationMetric- Parameters:
aggs- aggregations fromSearchResponse
-
getResult
Description copied from interface:EvaluationMetricGets the evaluation result for this metric.- Specified by:
getResultin interfaceEvaluationMetric- Returns:
Optional.empty()if the result is not available yet,Optional.of(result)otherwise
-
aggName
protected String aggName(double threshold, org.elasticsearch.xpack.core.ml.dataframe.evaluation.outlierdetection.AbstractConfusionMatrixMetric.Condition condition) -
buildAgg
protected AggregationBuilder buildAgg(String actualField, String predictedProbabilityField, double threshold, org.elasticsearch.xpack.core.ml.dataframe.evaluation.outlierdetection.AbstractConfusionMatrixMetric.Condition condition)
-