Class ClassificationInferenceOptions.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<ClassificationInferenceOptions.Builder>
co.elastic.clients.elasticsearch.ml.ClassificationInferenceOptions.Builder
- All Implemented Interfaces:
WithJson<ClassificationInferenceOptions.Builder>,ObjectBuilder<ClassificationInferenceOptions>
- Enclosing class:
- ClassificationInferenceOptions
public static class ClassificationInferenceOptions.Builder extends WithJsonObjectBuilderBase<ClassificationInferenceOptions.Builder> implements ObjectBuilder<ClassificationInferenceOptions>
Builder for
ClassificationInferenceOptions.-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description ClassificationInferenceOptionsbuild()Builds aClassificationInferenceOptions.ClassificationInferenceOptions.BuildernumTopClasses(java.lang.Integer value)Specifies the number of top class predictions to return.ClassificationInferenceOptions.BuildernumTopFeatureImportanceValues(java.lang.Integer value)Specifies the maximum number of feature importance values per document.ClassificationInferenceOptions.BuilderpredictionFieldType(java.lang.String value)Specifies the type of the predicted field to write.ClassificationInferenceOptions.BuilderresultsField(java.lang.String value)The field that is added to incoming documents to contain the inference prediction.protected ClassificationInferenceOptions.Builderself()ClassificationInferenceOptions.BuildertopClassesResultsField(java.lang.String value)Specifies the field to which the top classes are written.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
numTopClasses
public final ClassificationInferenceOptions.Builder numTopClasses(@Nullable java.lang.Integer value)Specifies the number of top class predictions to return. Defaults to 0.API name:
num_top_classes -
numTopFeatureImportanceValues
public final ClassificationInferenceOptions.Builder numTopFeatureImportanceValues(@Nullable java.lang.Integer value)Specifies the maximum number of feature importance values per document.API name:
num_top_feature_importance_values -
predictionFieldType
public final ClassificationInferenceOptions.Builder predictionFieldType(@Nullable java.lang.String value)Specifies the type of the predicted field to write. Acceptable values are: string, number, boolean. When boolean is provided 1.0 is transformed to true and 0.0 to false.API name:
prediction_field_type -
resultsField
The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.API name:
results_field -
topClassesResultsField
public final ClassificationInferenceOptions.Builder topClassesResultsField(@Nullable java.lang.String value)Specifies the field to which the top classes are written. Defaults to top_classes.API name:
top_classes_results_field -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<ClassificationInferenceOptions.Builder>
-
build
Builds aClassificationInferenceOptions.- Specified by:
buildin interfaceObjectBuilder<ClassificationInferenceOptions>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-