Module org.elasticsearch.xcore
Interface EvaluationMetric
- All Superinterfaces:
NamedWriteable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject,Writeable
- All Known Implementing Classes:
AbstractAucRoc,Accuracy,AucRoc,AucRoc,ConfusionMatrix,Huber,MeanSquaredError,MeanSquaredLogarithmicError,MulticlassConfusionMatrix,Precision,Precision,Recall,Recall,RSquared
public interface EvaluationMetric
extends org.elasticsearch.xcontent.ToXContentObject, NamedWriteable
EvaluationMetric class represents a metric to evaluate.-
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
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Method Summary
Modifier and TypeMethodDescriptionorg.elasticsearch.core.Tuple<List<AggregationBuilder>, List<PipelineAggregationBuilder>> aggs(EvaluationParameters parameters, EvaluationFields fields) Builds the aggregation that collect required data to compute the metricgetName()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.Optional<? extends EvaluationMetricResult> Gets the evaluation result for this metric.voidprocess(InternalAggregations aggs) Processes given aggregations as a step towards computing resultMethods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable
getWriteableNameMethods inherited from interface org.elasticsearch.xcontent.ToXContent
toXContentMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Method Details
-
getName
String getName()Returns the name of the metric (which may differ to the writeable name) -
getRequiredFields
Returns the set of fields that this metric requires in order to be calculated. -
aggs
org.elasticsearch.core.Tuple<List<AggregationBuilder>,List<PipelineAggregationBuilder>> aggs(EvaluationParameters parameters, EvaluationFields fields) Builds the aggregation that collect required data to compute the metric- 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
Processes given aggregations as a step towards computing result- Parameters:
aggs- aggregations fromSearchResponse
-
getResult
Optional<? extends EvaluationMetricResult> getResult()Gets the evaluation result for this metric.- Returns:
Optional.empty()if the result is not available yet,Optional.of(result)otherwise
-