Class PredictionConfig
java.lang.Object
com.sap.ai.sdk.foundationmodels.rpt.generated.model.PredictionConfig
Configuration of the prediction model.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class.static enumContext mode for predictions. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for PredictionConfig. -
Method Summary
Modifier and TypeMethodDescriptionaddTargetColumnsItem(TargetColumnConfig targetColumnsItem) Add one targetColumns instance to thisPredictionConfig.contextMode(PredictionConfig.ContextModeEnum contextMode) Set the contextMode of thisPredictionConfiginstance and return the same instance.static PredictionConfig.Buildercreate()Create a type-safe, fluent-api builder object to construct a newPredictionConfiginstance with all required arguments.booleanexplanations(ExplanationConfig explanations) Set the explanations of thisPredictionConfiginstance and return the same instance.Context mode for predictions.getCustomField(String name) Deprecated.Get the names of the unrecognizable properties of thePredictionConfig.Optional configuration for explainability outputs (column scores and relevant context rows).Get targetColumnsinthashCode()voidsetContextMode(PredictionConfig.ContextModeEnum contextMode) Set the contextMode of thisPredictionConfiginstance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisPredictionConfiginstance.voidsetExplanations(ExplanationConfig explanations) Set the explanations of thisPredictionConfiginstance.voidsetTargetColumns(List<TargetColumnConfig> targetColumns) Set the targetColumns of thisPredictionConfiginstance.targetColumns(List<TargetColumnConfig> targetColumns) Set the targetColumns of thisPredictionConfiginstance and return the same instance.toMap()Get the value of all properties of thisPredictionConfiginstance including unrecognized properties.toString()
-
Constructor Details
-
PredictionConfig
protected PredictionConfig()Default constructor for PredictionConfig.
-
-
Method Details
-
targetColumns
Set the targetColumns of thisPredictionConfiginstance and return the same instance.- Parameters:
targetColumns- The targetColumns of thisPredictionConfig- Returns:
- The same instance of this
PredictionConfigclass
-
addTargetColumnsItem
@Nonnull public PredictionConfig addTargetColumnsItem(@Nonnull TargetColumnConfig targetColumnsItem) Add one targetColumns instance to thisPredictionConfig.- Parameters:
targetColumnsItem- The targetColumns that should be added- Returns:
- The same instance of type
PredictionConfig
-
getTargetColumns
Get targetColumns- Returns:
- targetColumns The targetColumns of this
PredictionConfiginstance.
-
setTargetColumns
Set the targetColumns of thisPredictionConfiginstance.- Parameters:
targetColumns- The targetColumns of thisPredictionConfig
-
contextMode
@Nonnull public PredictionConfig contextMode(@Nullable PredictionConfig.ContextModeEnum contextMode) Set the contextMode of thisPredictionConfiginstance and return the same instance.- Parameters:
contextMode- Context mode for predictions. Set it to \"default\" for the best balance between accuracy and latency/cost. Set it to \"deep\" for higher accuracy with >8k context rows at increased latency and cost (only for \"sap-rpt-1.6-large\").- Returns:
- The same instance of this
PredictionConfigclass
-
getContextMode
Context mode for predictions. Set it to \"default\" for the best balance between accuracy and latency/cost. Set it to \"deep\" for higher accuracy with >8k context rows at increased latency and cost (only for \"sap-rpt-1.6-large\").- Returns:
- contextMode The contextMode of this
PredictionConfiginstance.
-
setContextMode
Set the contextMode of thisPredictionConfiginstance.- Parameters:
contextMode- Context mode for predictions. Set it to \"default\" for the best balance between accuracy and latency/cost. Set it to \"deep\" for higher accuracy with >8k context rows at increased latency and cost (only for \"sap-rpt-1.6-large\").
-
explanations
Set the explanations of thisPredictionConfiginstance and return the same instance.- Parameters:
explanations- Optional configuration for explainability outputs (column scores and relevant context rows).- Returns:
- The same instance of this
PredictionConfigclass
-
getExplanations
Optional configuration for explainability outputs (column scores and relevant context rows).- Returns:
- explanations The explanations of this
PredictionConfiginstance.
-
setExplanations
Set the explanations of thisPredictionConfiginstance.- Parameters:
explanations- Optional configuration for explainability outputs (column scores and relevant context rows).
-
getCustomFieldNames
Get the names of the unrecognizable properties of thePredictionConfig.- Returns:
- The set of properties names
-
getCustomField
@Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException Deprecated.UsetoMap()instead.Get the value of an unrecognizable property of thisPredictionConfiginstance.- Parameters:
name- The name of the property- Returns:
- The value of the property
- Throws:
NoSuchElementException- If no property with the given name could be found.
-
toMap
Get the value of all properties of thisPredictionConfiginstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisPredictionConfiginstance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
customFieldName- The name of the propertycustomFieldValue- The value of the property
-
equals
-
hashCode
public int hashCode() -
toString
-
create
Create a type-safe, fluent-api builder object to construct a newPredictionConfiginstance with all required arguments.
-
toMap()instead.