Module org.elasticsearch.xcore
Class BoundedWindowInferenceModel
java.lang.Object
org.elasticsearch.xpack.core.ml.inference.trainedmodel.inference.BoundedWindowInferenceModel
- All Implemented Interfaces:
org.apache.lucene.util.Accountable,BoundedInferenceModel,InferenceModel
-
Field Summary
FieldsFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]doubledoublegetName()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
-
DEFAULT_MIN_PREDICTED_VALUE
public static final double DEFAULT_MIN_PREDICTED_VALUE- See Also:
-
-
Constructor Details
-
BoundedWindowInferenceModel
-
-
Method Details
-
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
-
getMinPredictedValue
public double getMinPredictedValue()- Specified by:
getMinPredictedValuein interfaceBoundedInferenceModel
-
getMaxPredictedValue
public double getMaxPredictedValue()- Specified by:
getMaxPredictedValuein interfaceBoundedInferenceModel
-
toString
-