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.
-
#xrai_attribution ⇒ Google::Apis::MlV1::GoogleCloudMlV1XraiAttribution
Attributes credit by computing the XRAI taking advantage of the model's fully differentiable structure.
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.
931 932 933 |
# File 'generated/google/apis/ml_v1/classes.rb', line 931 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
914 915 916 |
# File 'generated/google/apis/ml_v1/classes.rb', line 914 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
921 922 923 |
# File 'generated/google/apis/ml_v1/classes.rb', line 921 def sampled_shapley_attribution @sampled_shapley_attribution end |
#xrai_attribution ⇒ Google::Apis::MlV1::GoogleCloudMlV1XraiAttribution
Attributes credit by computing the XRAI taking advantage
of the model's fully differentiable structure. Refer to this paper for
more details: https://arxiv.org/abs/1906.02825
Currently only implemented for models with natural image inputs.
Corresponds to the JSON property xraiAttribution
929 930 931 |
# File 'generated/google/apis/ml_v1/classes.rb', line 929 def xrai_attribution @xrai_attribution end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
936 937 938 939 940 |
# File 'generated/google/apis/ml_v1/classes.rb', line 936 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) @xrai_attribution = args[:xrai_attribution] if args.key?(:xrai_attribution) end |