Module org.elasticsearch.xcore
Interface Evaluation
- All Superinterfaces:
NamedWriteable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject,Writeable
- All Known Implementing Classes:
Classification,OutlierDetection,Regression
Defines an evaluation
-
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 TypeMethodDescriptiondefault SearchSourceBuilderbuildSearch(EvaluationParameters parameters, QueryBuilder userProvidedQueryBuilder) Builds the search required to collect data to compute the evaluation resultReturns the collection of fields required by evaluationList<? extends EvaluationMetric> Returns the list of metrics to evaluategetName()Returns the evaluation namedefault List<EvaluationMetricResult> Returns the list of evaluation resultsdefault booleandefault <T extends EvaluationMetric>
List<T> initMetrics(List<T> parsedMetrics, Supplier<List<T>> defaultMetricsSupplier) default voidprocess(SearchResponse searchResponse) ProcessesSearchResponsefrom the search actionMethods 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 evaluation name -
getFields
EvaluationFields getFields()Returns the collection of fields required by evaluation -
getMetrics
List<? extends EvaluationMetric> getMetrics()Returns the list of metrics to evaluate- Returns:
- list of metrics to evaluate
-
initMetrics
default <T extends EvaluationMetric> List<T> initMetrics(@Nullable List<T> parsedMetrics, Supplier<List<T>> defaultMetricsSupplier) -
buildSearch
default SearchSourceBuilder buildSearch(EvaluationParameters parameters, QueryBuilder userProvidedQueryBuilder) Builds the search required to collect data to compute the evaluation result- Parameters:
userProvidedQueryBuilder- User-provided query that must be respected when collecting data
-
process
ProcessesSearchResponsefrom the search action- Parameters:
searchResponse- response from the search action
-
hasAllResults
default boolean hasAllResults()- Returns:
- true iff all the metrics have their results computed
-
getResults
Returns the list of evaluation results- Returns:
- list of evaluation results
-