ClarifyShapConfigProperty Struct
The configuration for SHAP analysis using SageMaker Clarify Explainer.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';
const clarifyShapConfigProperty: sagemaker.CfnEndpointConfig.ClarifyShapConfigProperty = {
shapBaselineConfig: {
mimeType: 'mimeType',
shapBaseline: 'shapBaseline',
shapBaselineUri: 'shapBaselineUri',
},
// the properties below are optional
numberOfSamples: 123,
seed: 123,
textConfig: {
granularity: 'granularity',
language: 'language',
},
useLogit: false,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sagemaker as sagemaker
clarify_shap_config_property = sagemaker.CfnEndpointConfig.ClarifyShapConfigProperty(
shap_baseline_config=sagemaker.CfnEndpointConfig.ClarifyShapBaselineConfigProperty(
mime_type="mimeType",
shap_baseline="shapBaseline",
shap_baseline_uri="shapBaselineUri"
),
# the properties below are optional
number_of_samples=123,
seed=123,
text_config=sagemaker.CfnEndpointConfig.ClarifyTextConfigProperty(
granularity="granularity",
language="language"
),
use_logit=False
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sagemaker.*;
ClarifyShapConfigProperty clarifyShapConfigProperty = ClarifyShapConfigProperty.builder()
.shapBaselineConfig(ClarifyShapBaselineConfigProperty.builder()
.mimeType("mimeType")
.shapBaseline("shapBaseline")
.shapBaselineUri("shapBaselineUri")
.build())
// the properties below are optional
.numberOfSamples(123)
.seed(123)
.textConfig(ClarifyTextConfigProperty.builder()
.granularity("granularity")
.language("language")
.build())
.useLogit(false)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker;
var clarifyShapConfigProperty = new ClarifyShapConfigProperty {
ShapBaselineConfig = new ClarifyShapBaselineConfigProperty {
MimeType = "mimeType",
ShapBaseline = "shapBaseline",
ShapBaselineUri = "shapBaselineUri"
},
// the properties below are optional
NumberOfSamples = 123,
Seed = 123,
TextConfig = new ClarifyTextConfigProperty {
Granularity = "granularity",
Language = "language"
},
UseLogit = false
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
clarifyShapConfigProperty := &ClarifyShapConfigProperty{
ShapBaselineConfig: &ClarifyShapBaselineConfigProperty{
MimeType: jsii.String("mimeType"),
ShapBaseline: jsii.String("shapBaseline"),
ShapBaselineUri: jsii.String("shapBaselineUri"),
},
// the properties below are optional
NumberOfSamples: jsii.Number(123),
Seed: jsii.Number(123),
TextConfig: &ClarifyTextConfigProperty{
Granularity: jsii.String("granularity"),
Language: jsii.String("language"),
},
UseLogit: jsii.Boolean(false),
}
Properties
numberOfSamplesoptionalnumbernumber_of_samplesoptionalint | floatnumberOfSamplesoptionalNumberNumberOfSamplesoptionaldoubleNumberOfSamplesoptional*float64 #The number of samples to be used for analysis by the Kernal SHAP algorithm.
notes
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 .
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.
shapBaselineConfigIResolvable | CfnEndpointConfig.shap_baseline_configtyping.Union[IResolvable, ClarifyShapBaselineConfigProperty]shapBaselineConfigIResolvableShapBaselineConfigIResolvableShapBaselineConfiginterface{} required #The configuration for the SHAP baseline of the Kernal SHAP algorithm.
textConfigoptionalIResolvable | CfnEndpointConfig.text_configoptionaltyping.Union[IResolvable, ClarifyTextConfigProperty]textConfigoptionalIResolvableTextConfigoptionalIResolvableTextConfigoptionalinterface{} #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.
useLogitoptionalboolean | IResolvableuse_logitoptionaltyping.Union[bool, IResolvable]useLogitoptionalBooleanUseLogitoptionalboolUseLogitoptionalinterface{} #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.