Class: Google::Apis::MlV1::GoogleCloudMlV1ExplanationConfig
- Inherits:
-
Object
- Object
- Google::Apis::MlV1::GoogleCloudMlV1ExplanationConfig
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/ml_v1/classes.rb,
generated/google/apis/ml_v1/representations.rb,
generated/google/apis/ml_v1/representations.rb
Overview
Message holding configuration options for explaining model predictions. There are two feature attribution methods supported for TensorFlow models: integrated gradients and sampled Shapley. Learn more about feature attributions.
Instance Attribute Summary collapse
-
#integrated_gradients_attribution ⇒ Google::Apis::MlV1::GoogleCloudMlV1IntegratedGradientsAttribution
Attributes credit by computing the Aumann-Shapley value taking advantage of the model's fully differentiable structure.
-
#sampled_shapley_attribution ⇒ Google::Apis::MlV1::GoogleCloudMlV1SampledShapleyAttribution
An attribution method that approximates Shapley values for features that contribute to the label being predicted.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudMlV1ExplanationConfig
constructor
A new instance of GoogleCloudMlV1ExplanationConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ GoogleCloudMlV1ExplanationConfig
Returns a new instance of GoogleCloudMlV1ExplanationConfig.
366 367 368 |
# File 'generated/google/apis/ml_v1/classes.rb', line 366 def initialize(**args) update!(**args) end |
Instance Attribute Details
#integrated_gradients_attribution ⇒ Google::Apis::MlV1::GoogleCloudMlV1IntegratedGradientsAttribution
Attributes credit by computing the Aumann-Shapley value taking advantage
of the model's fully differentiable structure. Refer to this paper for
more details: http://proceedings.mlr.press/v70/sundararajan17a.html
Corresponds to the JSON property integratedGradientsAttribution
357 358 359 |
# File 'generated/google/apis/ml_v1/classes.rb', line 357 def integrated_gradients_attribution @integrated_gradients_attribution end |
#sampled_shapley_attribution ⇒ Google::Apis::MlV1::GoogleCloudMlV1SampledShapleyAttribution
An attribution method that approximates Shapley values for features that
contribute to the label being predicted. A sampling strategy is used to
approximate the value rather than considering all subsets of features.
Corresponds to the JSON property sampledShapleyAttribution
364 365 366 |
# File 'generated/google/apis/ml_v1/classes.rb', line 364 def sampled_shapley_attribution @sampled_shapley_attribution end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
371 372 373 374 |
# File 'generated/google/apis/ml_v1/classes.rb', line 371 def update!(**args) @integrated_gradients_attribution = args[:integrated_gradients_attribution] if args.key?(:integrated_gradients_attribution) @sampled_shapley_attribution = args[:sampled_shapley_attribution] if args.key?(:sampled_shapley_attribution) end |