Module org.elasticsearch.xcore
Class EnsembleInferenceModel
java.lang.Object
org.elasticsearch.xpack.core.ml.inference.trainedmodel.inference.EnsembleInferenceModel
- All Implemented Interfaces:
org.apache.lucene.util.Accountable,InferenceModel
-
Field Summary
FieldsFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Method Summary
Modifier and TypeMethodDescriptionstatic EnsembleInferenceModelfromXContent(org.elasticsearch.xcontent.XContentParser parser) double[]String[]getName()infer(double[] features, InferenceConfig config) Same asInferenceModel.infer(Map, InferenceConfig, Map)but the features are already extracted.Infer against the provided fieldslongvoidrewriteFeatureIndices(Map<String, Integer> newFeatureIndexMapping) Rewrites underlying feature index mappings.booleantoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
Field Details
-
SHALLOW_SIZE
public static final long SHALLOW_SIZE
-
-
Method Details
-
fromXContent
-
getFeatureNames
- Specified by:
getFeatureNamesin interfaceInferenceModel- Returns:
- The feature names in their desired order
-
targetType
- Specified by:
targetTypein interfaceInferenceModel- Returns:
TargetTypefor the model.
-
infer
public InferenceResults infer(Map<String, Object> fields, InferenceConfig config, Map<String, String> featureDecoderMap) Description copied from interface:InferenceModelInfer against the provided fields- Specified by:
inferin interfaceInferenceModel- Parameters:
fields- The fields and their values to infer againstconfig- The configuration options for inferencefeatureDecoderMap- A map for decoding feature value names to their originating feature. Necessary for feature influence.- Returns:
- The predicted value. For classification this will be discrete values (e.g. 0.0, or 1.0). For regression this is continuous.
-
infer
Description copied from interface:InferenceModelSame asInferenceModel.infer(Map, InferenceConfig, Map)but the features are already extracted.- Specified by:
inferin interfaceInferenceModel
-
supportsFeatureImportance
public boolean supportsFeatureImportance()- Specified by:
supportsFeatureImportancein interfaceInferenceModel- Returns:
- Does the model support feature importance
-
getName
- Specified by:
getNamein interfaceInferenceModel
-
rewriteFeatureIndices
Description copied from interface:InferenceModelRewrites underlying feature index mappings. This is to allow optimization of the underlying models.- Specified by:
rewriteFeatureIndicesin interfaceInferenceModel
-
ramBytesUsed
public long ramBytesUsed()- Specified by:
ramBytesUsedin interfaceorg.apache.lucene.util.Accountable
-
getModels
-
getOutputAggregator
-
getTargetType
-
getClassificationWeights
public double[] getClassificationWeights() -
toString
-