Class: AWSCDK::Sagemaker::CfnEndpointConfig::ClarifyTextConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Sagemaker::CfnEndpointConfig::ClarifyTextConfigProperty
- Defined in:
- sagemaker/cfn_endpoint_config.rb
Overview
A parameter used to configure the SageMaker Clarify explainer to treat text features as text so that explanations are provided for individual units of text.
Required only for natural language processing (NLP) explainability.
Instance Attribute Summary collapse
-
#granularity ⇒ String
readonly
The unit of granularity for the analysis of text features.
- #language ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(granularity:, language:) ⇒ ClarifyTextConfigProperty
constructor
A new instance of ClarifyTextConfigProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(granularity:, language:) ⇒ ClarifyTextConfigProperty
Returns a new instance of ClarifyTextConfigProperty.
1328 1329 1330 1331 1332 1333 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1328 def initialize(granularity:, language:) @granularity = granularity Jsii::Type.check_type(@granularity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "granularity") @language = language Jsii::Type.check_type(@language, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "language") end |
Instance Attribute Details
#granularity ⇒ String (readonly)
The unit of granularity for the analysis of text features.
For example, if the unit is 'token' , then each token (like a word in English) of the text is treated as a feature. SHAP values are computed for each unit/feature.
1341 1342 1343 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1341 def granularity @granularity end |
Class Method Details
.jsii_properties ⇒ Object
1350 1351 1352 1353 1354 1355 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1350 def self.jsii_properties { :granularity => "granularity", :language => "language", } end |
Instance Method Details
#to_jsii ⇒ Object
1357 1358 1359 1360 1361 1362 1363 1364 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1357 def to_jsii result = {} result.merge!({ "granularity" => @granularity, "language" => @language, }) result.compact end |