Class ExplanationResult
java.lang.Object
com.sap.ai.sdk.foundationmodels.rpt.generated.model.ExplanationResult
Explanation data for predictions.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for ExplanationResult. -
Method Summary
Modifier and TypeMethodDescriptionaddTopColumnScoresItem(Map<String, BigDecimal> topColumnScoresItem) Add one topColumnScores instance to thisExplanationResult.addTopRelevantContextRowsItem(List<Integer> topRelevantContextRowsItem) Add one topRelevantContextRows instance to thisExplanationResult.static ExplanationResultcreate()Create a newExplanationResultinstance.booleangetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theExplanationResult.Column scores per query row extracted from the model (higher means more weight was put on this column).2D array where each subarray contains indices of most relevant context rows for that query row.inthashCode()voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisExplanationResultinstance.voidsetTopColumnScores(List<Map<String, BigDecimal>> topColumnScores) Set the topColumnScores of thisExplanationResultinstance.voidsetTopRelevantContextRows(List<List<Integer>> topRelevantContextRows) Set the topRelevantContextRows of thisExplanationResultinstance.toMap()Get the value of all properties of thisExplanationResultinstance including unrecognized properties.topColumnScores(List<Map<String, BigDecimal>> topColumnScores) Set the topColumnScores of thisExplanationResultinstance and return the same instance.topRelevantContextRows(List<List<Integer>> topRelevantContextRows) Set the topRelevantContextRows of thisExplanationResultinstance and return the same instance.toString()
-
Constructor Details
-
ExplanationResult
protected ExplanationResult()Default constructor for ExplanationResult.
-
-
Method Details
-
topColumnScores
@Nonnull public ExplanationResult topColumnScores(@Nullable List<Map<String, BigDecimal>> topColumnScores) Set the topColumnScores of thisExplanationResultinstance and return the same instance.- Parameters:
topColumnScores- Column scores per query row extracted from the model (higher means more weight was put on this column).- Returns:
- The same instance of this
ExplanationResultclass
-
addTopColumnScoresItem
@Nonnull public ExplanationResult addTopColumnScoresItem(@Nonnull Map<String, BigDecimal> topColumnScoresItem) Add one topColumnScores instance to thisExplanationResult.- Parameters:
topColumnScoresItem- The topColumnScores that should be added- Returns:
- The same instance of type
ExplanationResult
-
getTopColumnScores
Column scores per query row extracted from the model (higher means more weight was put on this column).- Returns:
- topColumnScores The topColumnScores of this
ExplanationResultinstance.
-
setTopColumnScores
Set the topColumnScores of thisExplanationResultinstance.- Parameters:
topColumnScores- Column scores per query row extracted from the model (higher means more weight was put on this column).
-
topRelevantContextRows
@Nonnull public ExplanationResult topRelevantContextRows(@Nullable List<List<Integer>> topRelevantContextRows) Set the topRelevantContextRows of thisExplanationResultinstance and return the same instance.- Parameters:
topRelevantContextRows- 2D array where each subarray contains indices of most relevant context rows for that query row. The first dimension indexes query rows, the second dimension indexes all rows as a sequential integer index.- Returns:
- The same instance of this
ExplanationResultclass
-
addTopRelevantContextRowsItem
@Nonnull public ExplanationResult addTopRelevantContextRowsItem(@Nonnull List<Integer> topRelevantContextRowsItem) Add one topRelevantContextRows instance to thisExplanationResult.- Parameters:
topRelevantContextRowsItem- The topRelevantContextRows that should be added- Returns:
- The same instance of type
ExplanationResult
-
getTopRelevantContextRows
2D array where each subarray contains indices of most relevant context rows for that query row. The first dimension indexes query rows, the second dimension indexes all rows as a sequential integer index.- Returns:
- topRelevantContextRows The topRelevantContextRows of this
ExplanationResultinstance.
-
setTopRelevantContextRows
Set the topRelevantContextRows of thisExplanationResultinstance.- Parameters:
topRelevantContextRows- 2D array where each subarray contains indices of most relevant context rows for that query row. The first dimension indexes query rows, the second dimension indexes all rows as a sequential integer index.
-
getCustomFieldNames
Get the names of the unrecognizable properties of theExplanationResult.- 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 thisExplanationResultinstance.- 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 thisExplanationResultinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisExplanationResultinstance. 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 newExplanationResultinstance. No arguments are required.
-
toMap()instead.