/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace SageMaker { namespace Model { /** *

The configuration for SHAP analysis using SageMaker Clarify * Explainer.

See Also:

AWS * API Reference

*/ class ClarifyShapConfig { public: AWS_SAGEMAKER_API ClarifyShapConfig(); AWS_SAGEMAKER_API ClarifyShapConfig(Aws::Utils::Json::JsonView jsonValue); AWS_SAGEMAKER_API ClarifyShapConfig& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_SAGEMAKER_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The configuration for the SHAP baseline of the Kernal SHAP algorithm.

*/ inline const ClarifyShapBaselineConfig& GetShapBaselineConfig() const{ return m_shapBaselineConfig; } /** *

The configuration for the SHAP baseline of the Kernal SHAP algorithm.

*/ inline bool ShapBaselineConfigHasBeenSet() const { return m_shapBaselineConfigHasBeenSet; } /** *

The configuration for the SHAP baseline of the Kernal SHAP algorithm.

*/ inline void SetShapBaselineConfig(const ClarifyShapBaselineConfig& value) { m_shapBaselineConfigHasBeenSet = true; m_shapBaselineConfig = value; } /** *

The configuration for the SHAP baseline of the Kernal SHAP algorithm.

*/ inline void SetShapBaselineConfig(ClarifyShapBaselineConfig&& value) { m_shapBaselineConfigHasBeenSet = true; m_shapBaselineConfig = std::move(value); } /** *

The configuration for the SHAP baseline of the Kernal SHAP algorithm.

*/ inline ClarifyShapConfig& WithShapBaselineConfig(const ClarifyShapBaselineConfig& value) { SetShapBaselineConfig(value); return *this;} /** *

The configuration for the SHAP baseline of the Kernal SHAP algorithm.

*/ inline ClarifyShapConfig& WithShapBaselineConfig(ClarifyShapBaselineConfig&& value) { SetShapBaselineConfig(std::move(value)); return *this;} /** *

The number of samples to be used for analysis by the Kernal SHAP algorithm. *

The number of samples determines the size of the synthetic * dataset, which has an impact on latency of explainability requests. For more * information, see the Synthetic data of Configure * and create an endpoint.

*/ inline int GetNumberOfSamples() const{ return m_numberOfSamples; } /** *

The number of samples to be used for analysis by the Kernal SHAP algorithm. *

The number of samples determines the size of the synthetic * dataset, which has an impact on latency of explainability requests. For more * information, see the Synthetic data of Configure * and create an endpoint.

*/ inline bool NumberOfSamplesHasBeenSet() const { return m_numberOfSamplesHasBeenSet; } /** *

The number of samples to be used for analysis by the Kernal SHAP algorithm. *

The number of samples determines the size of the synthetic * dataset, which has an impact on latency of explainability requests. For more * information, see the Synthetic data of Configure * and create an endpoint.

*/ inline void SetNumberOfSamples(int value) { m_numberOfSamplesHasBeenSet = true; m_numberOfSamples = value; } /** *

The number of samples to be used for analysis by the Kernal SHAP algorithm. *

The number of samples determines the size of the synthetic * dataset, which has an impact on latency of explainability requests. For more * information, see the Synthetic data of Configure * and create an endpoint.

*/ inline ClarifyShapConfig& WithNumberOfSamples(int value) { SetNumberOfSamples(value); return *this;} /** *

A Boolean toggle to indicate if you want to use the logit function (true) or * log-odds units (false) for model predictions. Defaults to false.

*/ inline bool GetUseLogit() const{ return m_useLogit; } /** *

A Boolean toggle to indicate if you want to use the logit function (true) or * log-odds units (false) for model predictions. Defaults to false.

*/ inline bool UseLogitHasBeenSet() const { return m_useLogitHasBeenSet; } /** *

A Boolean toggle to indicate if you want to use the logit function (true) or * log-odds units (false) for model predictions. Defaults to false.

*/ inline void SetUseLogit(bool value) { m_useLogitHasBeenSet = true; m_useLogit = value; } /** *

A Boolean toggle to indicate if you want to use the logit function (true) or * log-odds units (false) for model predictions. Defaults to false.

*/ inline ClarifyShapConfig& WithUseLogit(bool value) { SetUseLogit(value); return *this;} /** *

The starting value used to initialize the random number generator in the * explainer. Provide a value for this parameter to obtain a deterministic SHAP * result.

*/ inline int GetSeed() const{ return m_seed; } /** *

The starting value used to initialize the random number generator in the * explainer. Provide a value for this parameter to obtain a deterministic SHAP * result.

*/ inline bool SeedHasBeenSet() const { return m_seedHasBeenSet; } /** *

The starting value used to initialize the random number generator in the * explainer. Provide a value for this parameter to obtain a deterministic SHAP * result.

*/ inline void SetSeed(int value) { m_seedHasBeenSet = true; m_seed = value; } /** *

The starting value used to initialize the random number generator in the * explainer. Provide a value for this parameter to obtain a deterministic SHAP * result.

*/ inline ClarifyShapConfig& WithSeed(int value) { SetSeed(value); return *this;} /** *

A parameter that indicates if text features are treated as text and * explanations are provided for individual units of text. Required for natural * language processing (NLP) explainability only.

*/ inline const ClarifyTextConfig& GetTextConfig() const{ return m_textConfig; } /** *

A parameter that indicates if text features are treated as text and * explanations are provided for individual units of text. Required for natural * language processing (NLP) explainability only.

*/ inline bool TextConfigHasBeenSet() const { return m_textConfigHasBeenSet; } /** *

A parameter that indicates if text features are treated as text and * explanations are provided for individual units of text. Required for natural * language processing (NLP) explainability only.

*/ inline void SetTextConfig(const ClarifyTextConfig& value) { m_textConfigHasBeenSet = true; m_textConfig = value; } /** *

A parameter that indicates if text features are treated as text and * explanations are provided for individual units of text. Required for natural * language processing (NLP) explainability only.

*/ inline void SetTextConfig(ClarifyTextConfig&& value) { m_textConfigHasBeenSet = true; m_textConfig = std::move(value); } /** *

A parameter that indicates if text features are treated as text and * explanations are provided for individual units of text. Required for natural * language processing (NLP) explainability only.

*/ inline ClarifyShapConfig& WithTextConfig(const ClarifyTextConfig& value) { SetTextConfig(value); return *this;} /** *

A parameter that indicates if text features are treated as text and * explanations are provided for individual units of text. Required for natural * language processing (NLP) explainability only.

*/ inline ClarifyShapConfig& WithTextConfig(ClarifyTextConfig&& value) { SetTextConfig(std::move(value)); return *this;} private: ClarifyShapBaselineConfig m_shapBaselineConfig; bool m_shapBaselineConfigHasBeenSet = false; int m_numberOfSamples; bool m_numberOfSamplesHasBeenSet = false; bool m_useLogit; bool m_useLogitHasBeenSet = false; int m_seed; bool m_seedHasBeenSet = false; ClarifyTextConfig m_textConfig; bool m_textConfigHasBeenSet = false; }; } // namespace Model } // namespace SageMaker } // namespace Aws