Module org.elasticsearch.xcore
Class ClassificationInferenceResults
java.lang.Object
org.elasticsearch.xpack.core.ml.inference.results.SingleValueInferenceResults
org.elasticsearch.xpack.core.ml.inference.results.ClassificationInferenceResults
- All Implemented Interfaces:
NamedWriteable,Writeable,InferenceResults,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentFragment
-
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 Stringstatic Stringstatic final Stringprotected final StringFields inherited from class org.elasticsearch.xpack.core.ml.inference.results.SingleValueInferenceResults
FEATURE_IMPORTANCEFields inherited from interface org.elasticsearch.inference.InferenceResults
MODEL_ID_RESULTS_FIELDFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionClassificationInferenceResults(double value, String classificationLabel, List<TopClassEntry> topClasses, List<ClassificationFeatureImportance> featureImportance, String topNumClassesField, String resultsField, PredictionFieldType predictionFieldType, int numTopFeatureImportanceValues, Double predictionProbability, Double predictionScore) ClassificationInferenceResults(double value, String classificationLabel, List<TopClassEntry> topClasses, List<ClassificationFeatureImportance> featureImportance, InferenceConfig config, Double predictionProbability, Double predictionScore) -
Method Summary
Modifier and TypeMethodDescriptionasMap()booleaninthashCode()org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.xpack.core.ml.inference.results.SingleValueInferenceResults
valueMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
PREDICTION_PROBABILITY
-
NAME
- See Also:
-
PREDICTION_SCORE
- See Also:
-
resultsField
-
-
Constructor Details
-
ClassificationInferenceResults
public ClassificationInferenceResults(double value, String classificationLabel, List<TopClassEntry> topClasses, List<ClassificationFeatureImportance> featureImportance, InferenceConfig config, Double predictionProbability, Double predictionScore) -
ClassificationInferenceResults
public ClassificationInferenceResults(double value, String classificationLabel, List<TopClassEntry> topClasses, List<ClassificationFeatureImportance> featureImportance, String topNumClassesField, String resultsField, PredictionFieldType predictionFieldType, int numTopFeatureImportanceValues, Double predictionProbability, Double predictionScore) -
ClassificationInferenceResults
- Throws:
IOException
-
-
Method Details
-
getClassificationLabel
-
getTopClasses
-
getPredictionFieldType
-
getFeatureImportance
-
writeTo
- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classSingleValueInferenceResults- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
valueAsString
- Overrides:
valueAsStringin classSingleValueInferenceResults
-
predictedValue
-
getPredictionProbability
-
getPredictionScore
-
getResultsField
-
asMap
-
asMap
-
getWriteableName
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Throws:
IOException
-