Module org.elasticsearch.xcore
Class ClassificationConfig
java.lang.Object
org.elasticsearch.xpack.core.ml.inference.trainedmodel.ClassificationConfig
- All Implemented Interfaces:
NamedWriteable,VersionedNamedWriteable,Writeable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject,InferenceConfig,LenientlyParsedInferenceConfig,StrictlyParsedInferenceConfig,NamedXContentObject
public class ClassificationConfig
extends Object
implements LenientlyParsedInferenceConfig, StrictlyParsedInferenceConfig
-
Nested Class Summary
Nested ClassesNested 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 ClassificationConfigstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldFields inherited from interface org.elasticsearch.xpack.core.ml.inference.trainedmodel.InferenceConfig
DEFAULT_RESULTS_FIELD, DEFAULT_TOP_CLASSES_RESULTS_FIELD, RESULTS_FIELDFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionClassificationConfig(Integer numTopClasses) ClassificationConfig(Integer numTopClasses, String resultsField, String topClassesResultsField, Integer featureImportance, PredictionFieldType predictionFieldType) -
Method Summary
Modifier and TypeMethodDescriptionapply(InferenceConfigUpdate update) Return a copy of this with the settings updated by the values inupdate.static ClassificationConfig.Builderbuilder()booleanstatic ClassificationConfigfromXContentLenient(org.elasticsearch.xcontent.XContentParser parser) static ClassificationConfigfromXContentStrict(org.elasticsearch.xcontent.XContentParser parser) All nodes in the cluster must have at least this MlConfigVersion attributeAll communication in the cluster must use at least this versiongetName()intintinthashCode()booleanbooleanisTargetTypeSupported(TargetType targetType) booleanorg.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xpack.core.ml.inference.trainedmodel.InferenceConfig
getDefaultInput, getMinimalSupportedVersion, getMinLicenseSupported, getMinLicenseSupportedForAction, incompatibleUpdateException, supportsIngestPipeline, supportsPipelineAggregation, supportsSearchRescorer, validateTrainedModelInputMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
NAME
public static final org.elasticsearch.xcontent.ParseField NAME -
NUM_TOP_CLASSES
public static final org.elasticsearch.xcontent.ParseField NUM_TOP_CLASSES -
TOP_CLASSES_RESULTS_FIELD
public static final org.elasticsearch.xcontent.ParseField TOP_CLASSES_RESULTS_FIELD -
NUM_TOP_FEATURE_IMPORTANCE_VALUES
public static final org.elasticsearch.xcontent.ParseField NUM_TOP_FEATURE_IMPORTANCE_VALUES -
PREDICTION_FIELD_TYPE
public static final org.elasticsearch.xcontent.ParseField PREDICTION_FIELD_TYPE -
EMPTY_PARAMS
-
-
Constructor Details
-
ClassificationConfig
-
ClassificationConfig
public ClassificationConfig(Integer numTopClasses, String resultsField, String topClassesResultsField, Integer featureImportance, PredictionFieldType predictionFieldType) -
ClassificationConfig
- Throws:
IOException
-
-
Method Details
-
fromXContentStrict
public static ClassificationConfig fromXContentStrict(org.elasticsearch.xcontent.XContentParser parser) -
fromXContentLenient
public static ClassificationConfig fromXContentLenient(org.elasticsearch.xcontent.XContentParser parser) -
apply
Description copied from interface:InferenceConfigReturn a copy of this with the settings updated by the values inupdate.- Specified by:
applyin interfaceInferenceConfig- Parameters:
update- The update to apply- Returns:
- A new updated config
-
getNumTopClasses
public int getNumTopClasses() -
getTopClassesResultsField
-
getResultsField
- Specified by:
getResultsFieldin interfaceInferenceConfig
-
getNumTopFeatureImportanceValues
public int getNumTopFeatureImportanceValues() -
getPredictionFieldType
-
requestingImportance
public boolean requestingImportance()- Specified by:
requestingImportancein interfaceInferenceConfig
-
isAllocateOnly
public boolean isAllocateOnly()- Specified by:
isAllocateOnlyin interfaceInferenceConfig
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable- Specified by:
getWriteableNamein interfaceVersionedNamedWriteable
-
getName
- Specified by:
getNamein interfaceNamedXContentObject- Returns:
- The name of the XContentObject that is to be serialized
-
isTargetTypeSupported
- Specified by:
isTargetTypeSupportedin interfaceInferenceConfig
-
getMinimalSupportedMlConfigVersion
Description copied from interface:InferenceConfigAll nodes in the cluster must have at least this MlConfigVersion attribute- Specified by:
getMinimalSupportedMlConfigVersionin interfaceInferenceConfig
-
getMinimalSupportedTransportVersion
Description copied from interface:InferenceConfigAll communication in the cluster must use at least this version- Specified by:
getMinimalSupportedTransportVersionin interfaceInferenceConfig
-
builder
-