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.
7537 7538 7539 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 7537 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
7496 7497 7498 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 7496 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
7503 7504 7505 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 7503 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
7513 7514 7515 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 7513 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
7520 7521 7522 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 7520 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
7527 7528 7529 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 7527 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
7535 7536 7537 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 7535 def xrai_attribution @xrai_attribution end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
7542 7543 7544 7545 7546 7547 7548 7549 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 7542 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 |