Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Attribution
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Attribution
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/aiplatform_v1beta1/classes.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb
Overview
Attribution that explains a particular prediction output.
Instance Attribute Summary collapse
-
#approximation_error ⇒ Float
Output only.
-
#baseline_output_value ⇒ Float
Output only.
-
#feature_attributions ⇒ Object
Output only.
-
#instance_output_value ⇒ Float
Output only.
-
#output_display_name ⇒ String
Output only.
-
#output_index ⇒ Array<Fixnum>
Output only.
-
#output_name ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1Attribution
constructor
A new instance of GoogleCloudAiplatformV1beta1Attribution.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1Attribution
Returns a new instance of GoogleCloudAiplatformV1beta1Attribution.
7205 7206 7207 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 7205 def initialize(**args) update!(**args) end |
Instance Attribute Details
#approximation_error ⇒ Float
Output only. Error of feature_attributions caused by approximation used in the explanation method. Lower value means more precise attributions. * For Sampled Shapley attribution, increasing path_count might reduce the error. * For Integrated Gradients attribution, increasing step_count might reduce the error.
- For XRAI attribution, increasing step_count might reduce the error. See
this introduction for more
information.
Corresponds to the JSON property
approximationError
7142 7143 7144 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 7142 def approximation_error @approximation_error end |
#baseline_output_value ⇒ Float
Output only. Model predicted output if the input instance is constructed from
the baselines of all the features defined in ExplanationMetadata.inputs. The
field name of the output is determined by the key in ExplanationMetadata.
outputs. If the Model's predicted output has multiple dimensions (rank > 1),
this is the value in the output located by output_index. If there are multiple
baselines, their output values are averaged.
Corresponds to the JSON property baselineOutputValue
7152 7153 7154 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 7152 def baseline_output_value @baseline_output_value end |
#feature_attributions ⇒ Object
Output only. Attributions of each explained feature. Features are extracted
from the prediction instances according to explanation metadata for inputs.
The value is a struct, whose keys are the name of the feature. The values are
how much the feature in the instance contributed to the predicted result. The
format of the value is determined by the feature's input format: * If the
feature is a scalar value, the attribution value is a floating number. * If
the feature is an array of scalar values, the attribution value is an array. *
If the feature is a struct, the attribution value is a struct. The keys in the
attribution value struct are the same as the keys in the feature struct. The
formats of the values in the attribution struct are determined by the formats
of the values in the feature struct. The ExplanationMetadata.
feature_attributions_schema_uri field, pointed to by the ExplanationSpec field
of the Endpoint.deployed_models object, points to the schema file that
describes the features and their attribution values (if it is populated).
Corresponds to the JSON property featureAttributions
7170 7171 7172 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 7170 def feature_attributions @feature_attributions end |
#instance_output_value ⇒ Float
Output only. Model predicted output on the corresponding explanation instance.
The field name of the output is determined by the key in ExplanationMetadata.
outputs. If the Model predicted output has multiple dimensions, this is the
value in the output located by output_index.
Corresponds to the JSON property instanceOutputValue
7178 7179 7180 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 7178 def instance_output_value @instance_output_value end |
#output_display_name ⇒ String
Output only. The display name of the output identified by output_index. For
example, the predicted class name by a multi-classification Model. This field
is only populated iff the Model predicts display names as a separate field
along with the explained output. The predicted display name must has the same
shape of the explained output, and can be located using output_index.
Corresponds to the JSON property outputDisplayName
7187 7188 7189 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 7187 def output_display_name @output_display_name end |
#output_index ⇒ Array<Fixnum>
Output only. The index that locates the explained prediction output. If the
prediction output is a scalar value, output_index is not populated. If the
prediction output has multiple dimensions, the length of the output_index list
is the same as the number of dimensions of the output. The i-th element in
output_index is the element index of the i-th dimension of the output vector.
Indices start from 0.
Corresponds to the JSON property outputIndex
7197 7198 7199 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 7197 def output_index @output_index end |
#output_name ⇒ String
Output only. Name of the explain output. Specified as the key in
ExplanationMetadata.outputs.
Corresponds to the JSON property outputName
7203 7204 7205 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 7203 def output_name @output_name end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
7210 7211 7212 7213 7214 7215 7216 7217 7218 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 7210 def update!(**args) @approximation_error = args[:approximation_error] if args.key?(:approximation_error) @baseline_output_value = args[:baseline_output_value] if args.key?(:baseline_output_value) @feature_attributions = args[:feature_attributions] if args.key?(:feature_attributions) @instance_output_value = args[:instance_output_value] if args.key?(:instance_output_value) @output_display_name = args[:output_display_name] if args.key?(:output_display_name) @output_index = args[:output_index] if args.key?(:output_index) @output_name = args[:output_name] if args.key?(:output_name) end |