Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ExplanationParameters
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ExplanationParameters
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/aiplatform_v1/classes.rb,
lib/google/apis/aiplatform_v1/representations.rb,
lib/google/apis/aiplatform_v1/representations.rb
Overview
Parameters to configure explaining for Model's predictions.
Instance Attribute Summary collapse
-
#examples ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Examples
Example-based explainability that returns the nearest neighbors from the provided dataset.
-
#integrated_gradients_attribution ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1IntegratedGradientsAttribution
An attribution method that computes the Aumann-Shapley value taking advantage of the model's fully differentiable structure.
-
#output_indices ⇒ Array<Object>
If populated, only returns attributions that have output_index contained in output_indices.
-
#sampled_shapley_attribution ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SampledShapleyAttribution
An attribution method that approximates Shapley values for features that contribute to the label being predicted.
-
#top_k ⇒ Fixnum
If populated, returns attributions for top K indices of outputs (defaults to 1) .
-
#xrai_attribution ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1XraiAttribution
An explanation method that redistributes Integrated Gradients attributions to segmented regions, taking advantage of the model's fully differentiable structure.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1ExplanationParameters
constructor
A new instance of GoogleCloudAiplatformV1ExplanationParameters.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1ExplanationParameters
Returns a new instance of GoogleCloudAiplatformV1ExplanationParameters.
6686 6687 6688 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 6686 def initialize(**args) update!(**args) end |
Instance Attribute Details
#examples ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Examples
Example-based explainability that returns the nearest neighbors from the
provided dataset.
Corresponds to the JSON property examples
6645 6646 6647 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 6645 def examples @examples end |
#integrated_gradients_attribution ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1IntegratedGradientsAttribution
An attribution method that computes the Aumann-Shapley value taking advantage
of the model's fully differentiable structure. Refer to this paper for more
details: https://arxiv.org/abs/1703.01365
Corresponds to the JSON property integratedGradientsAttribution
6652 6653 6654 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 6652 def integrated_gradients_attribution @integrated_gradients_attribution end |
#output_indices ⇒ Array<Object>
If populated, only returns attributions that have output_index contained in
output_indices. It must be an ndarray of integers, with the same shape of the
output it's explaining. If not populated, returns attributions for top_k
indices of outputs. If neither top_k nor output_indices is populated, returns
the argmax index of the outputs. Only applicable to Models that predict
multiple outputs (e,g, multi-class Models that predict multiple classes).
Corresponds to the JSON property outputIndices
6662 6663 6664 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 6662 def output_indices @output_indices end |
#sampled_shapley_attribution ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SampledShapleyAttribution
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
6669 6670 6671 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 6669 def sampled_shapley_attribution @sampled_shapley_attribution end |
#top_k ⇒ Fixnum
If populated, returns attributions for top K indices of outputs (defaults to 1)
. Only applies to Models that predicts more than one outputs (e,g, multi-class
Models). When set to -1, returns explanations for all outputs.
Corresponds to the JSON property topK
6676 6677 6678 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 6676 def top_k @top_k end |
#xrai_attribution ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1XraiAttribution
An explanation method that redistributes Integrated Gradients attributions to
segmented regions, taking advantage of the model's fully differentiable
structure. Refer to this paper for more details: https://arxiv.org/abs/1906.
02825 Supported only by image Models.
Corresponds to the JSON property xraiAttribution
6684 6685 6686 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 6684 def xrai_attribution @xrai_attribution end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
6691 6692 6693 6694 6695 6696 6697 6698 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 6691 def update!(**args) @examples = args[:examples] if args.key?(:examples) @integrated_gradients_attribution = args[:integrated_gradients_attribution] if args.key?(:integrated_gradients_attribution) @output_indices = args[:output_indices] if args.key?(:output_indices) @sampled_shapley_attribution = args[:sampled_shapley_attribution] if args.key?(:sampled_shapley_attribution) @top_k = args[:top_k] if args.key?(:top_k) @xrai_attribution = args[:xrai_attribution] if args.key?(:xrai_attribution) end |