# ClarifyShapConfigProperty

The configuration for SHAP analysis using SageMaker Clarify Explainer.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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
};
```

Golang:

```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

- `numberOfSamples`: number — 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](https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-online-explainability-create-endpoint.html) .

- `seed`: number — 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.

- `shapBaselineConfig`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnEndpointConfig.ClarifyShapBaselineConfigProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnEndpointConfig.ClarifyShapBaselineConfigProperty.html) (required) — The configuration for the SHAP baseline of the Kernal SHAP algorithm.

- `textConfig`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnEndpointConfig.ClarifyTextConfigProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnEndpointConfig.ClarifyTextConfigProperty.html) — 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.

- `useLogit`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — 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.
