Class: Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/aiplatform/v1/explanation_metadata.rb

Overview

Metadata of the input of a feature.

Fields other than InputMetadata.input_baselines are applicable only for Models that are using Vertex AI-provided images for Tensorflow.

Defined Under Namespace

Modules: Encoding Classes: FeatureValueDomain, Visualization

Instance Attribute Summary collapse

Instance Attribute Details

#dense_shape_tensor_name::String

Returns Specifies the shape of the values of the input if the input is a sparse representation. Refer to Tensorflow documentation for more details: https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.

Returns:



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'proto_docs/google/cloud/aiplatform/v1/explanation_metadata.rb', line 160

class InputMetadata
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Domain details of the input feature value. Provides numeric information
  # about the feature, such as its range (min, max). If the feature has been
  # pre-processed, for example with z-scoring, then it provides information
  # about how to recover the original feature. For example, if the input
  # feature is an image and it has been pre-processed to obtain 0-mean and
  # stddev = 1 values, then original_mean, and original_stddev refer to the
  # mean and stddev of the original feature (e.g. image tensor) from which
  # input feature (with mean = 0 and stddev = 1) was obtained.
  # @!attribute [rw] min_value
  #   @return [::Float]
  #     The minimum permissible value for this feature.
  # @!attribute [rw] max_value
  #   @return [::Float]
  #     The maximum permissible value for this feature.
  # @!attribute [rw] original_mean
  #   @return [::Float]
  #     If this input feature has been normalized to a mean value of 0,
  #     the original_mean specifies the mean value of the domain prior to
  #     normalization.
  # @!attribute [rw] original_stddev
  #   @return [::Float]
  #     If this input feature has been normalized to a standard deviation of
  #     1.0, the original_stddev specifies the standard deviation of the domain
  #     prior to normalization.
  class FeatureValueDomain
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Visualization configurations for image explanation.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Type]
  #     Type of the image visualization. Only applicable to
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
  #     OUTLINES shows regions of attribution, while PIXELS shows per-pixel
  #     attribution. Defaults to OUTLINES.
  # @!attribute [rw] polarity
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Polarity]
  #     Whether to only highlight pixels with positive contributions, negative
  #     or both. Defaults to POSITIVE.
  # @!attribute [rw] color_map
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::ColorMap]
  #     The color scheme used for the highlighted areas.
  #
  #     Defaults to PINK_GREEN for
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
  #     which shows positive attributions in green and negative in pink.
  #
  #     Defaults to VIRIDIS for
  #     [XRAI
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
  #     which highlights the most influential regions in yellow and the least
  #     influential in blue.
  # @!attribute [rw] clip_percent_upperbound
  #   @return [::Float]
  #     Excludes attributions above the specified percentile from the
  #     highlighted areas. Using the clip_percent_upperbound and
  #     clip_percent_lowerbound together can be useful for filtering out noise
  #     and making it easier to see areas of strong attribution. Defaults to
  #     99.9.
  # @!attribute [rw] clip_percent_lowerbound
  #   @return [::Float]
  #     Excludes attributions below the specified percentile, from the
  #     highlighted areas. Defaults to 62.
  # @!attribute [rw] overlay_type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::OverlayType]
  #     How the original image is displayed in the visualization.
  #     Adjusting the overlay can help increase visual clarity if the original
  #     image makes it difficult to view the visualization. Defaults to NONE.
  class Visualization
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Type of the image visualization. Only applicable to
    # [Integrated Gradients
    # attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
    module Type
      # Should not be used.
      TYPE_UNSPECIFIED = 0

      # Shows which pixel contributed to the image prediction.
      PIXELS = 1

      # Shows which region contributed to the image prediction by outlining
      # the region.
      OUTLINES = 2
    end

    # Whether to only highlight pixels with positive contributions, negative
    # or both. Defaults to POSITIVE.
    module Polarity
      # Default value. This is the same as POSITIVE.
      POLARITY_UNSPECIFIED = 0

      # Highlights the pixels/outlines that were most influential to the
      # model's prediction.
      POSITIVE = 1

      # Setting polarity to negative highlights areas that does not lead to
      # the models's current prediction.
      NEGATIVE = 2

      # Shows both positive and negative attributions.
      BOTH = 3
    end

    # The color scheme used for highlighting areas.
    module ColorMap
      # Should not be used.
      COLOR_MAP_UNSPECIFIED = 0

      # Positive: green. Negative: pink.
      PINK_GREEN = 1

      # Viridis color map: A perceptually uniform color mapping which is
      # easier to see by those with colorblindness and progresses from yellow
      # to green to blue. Positive: yellow. Negative: blue.
      VIRIDIS = 2

      # Positive: red. Negative: red.
      RED = 3

      # Positive: green. Negative: green.
      GREEN = 4

      # Positive: green. Negative: red.
      RED_GREEN = 6

      # PiYG palette.
      PINK_WHITE_GREEN = 5
    end

    # How the original image is displayed in the visualization.
    module OverlayType
      # Default value. This is the same as NONE.
      OVERLAY_TYPE_UNSPECIFIED = 0

      # No overlay.
      NONE = 1

      # The attributions are shown on top of the original image.
      ORIGINAL = 2

      # The attributions are shown on top of grayscaled version of the
      # original image.
      GRAYSCALE = 3

      # The attributions are used as a mask to reveal predictive parts of
      # the image and hide the un-predictive parts.
      MASK_BLACK = 4
    end
  end

  # Defines how a feature is encoded. Defaults to IDENTITY.
  module Encoding
    # Default value. This is the same as IDENTITY.
    ENCODING_UNSPECIFIED = 0

    # The tensor represents one feature.
    IDENTITY = 1

    # The tensor represents a bag of features where each index maps to
    # a feature.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [27, 6.0, 150]
    # index_feature_mapping = ["age", "height", "weight"]
    # ```
    BAG_OF_FEATURES = 2

    # The tensor represents a bag of features where each index maps to a
    # feature. Zero values in the tensor indicates feature being
    # non-existent.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [2, 0, 5, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    BAG_OF_FEATURES_SPARSE = 3

    # The tensor is a list of binaries representing whether a feature exists
    # or not (1 indicates existence).
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [1, 0, 1, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    INDICATOR = 4

    # The tensor is encoded into a 1-dimensional array represented by an
    # encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [0.1, 0.2, 0.3, 0.4, 0.5]
    # ```
    COMBINED_EMBEDDING = 5

    # Select this encoding when the input tensor is encoded into a
    # 2-dimensional array represented by an encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. The first dimension of the encoded
    # tensor's shape is the same as the input tensor's shape. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [[0.1, 0.2, 0.3, 0.4, 0.5],
    #            [0.2, 0.1, 0.4, 0.3, 0.5],
    #            [0.5, 0.1, 0.3, 0.5, 0.4],
    #            [0.5, 0.3, 0.1, 0.2, 0.4],
    #            [0.4, 0.3, 0.2, 0.5, 0.1]]
    # ```
    CONCAT_EMBEDDING = 6
  end
end

#encoded_baselines::Array<::Google::Protobuf::Value>

Returns A list of baselines for the encoded tensor.

The shape of each baseline should match the shape of the encoded tensor. If a scalar is provided, Vertex AI broadcasts to the same shape as the encoded tensor.

Returns:

  • (::Array<::Google::Protobuf::Value>)

    A list of baselines for the encoded tensor.

    The shape of each baseline should match the shape of the encoded tensor. If a scalar is provided, Vertex AI broadcasts to the same shape as the encoded tensor.



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'proto_docs/google/cloud/aiplatform/v1/explanation_metadata.rb', line 160

class InputMetadata
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Domain details of the input feature value. Provides numeric information
  # about the feature, such as its range (min, max). If the feature has been
  # pre-processed, for example with z-scoring, then it provides information
  # about how to recover the original feature. For example, if the input
  # feature is an image and it has been pre-processed to obtain 0-mean and
  # stddev = 1 values, then original_mean, and original_stddev refer to the
  # mean and stddev of the original feature (e.g. image tensor) from which
  # input feature (with mean = 0 and stddev = 1) was obtained.
  # @!attribute [rw] min_value
  #   @return [::Float]
  #     The minimum permissible value for this feature.
  # @!attribute [rw] max_value
  #   @return [::Float]
  #     The maximum permissible value for this feature.
  # @!attribute [rw] original_mean
  #   @return [::Float]
  #     If this input feature has been normalized to a mean value of 0,
  #     the original_mean specifies the mean value of the domain prior to
  #     normalization.
  # @!attribute [rw] original_stddev
  #   @return [::Float]
  #     If this input feature has been normalized to a standard deviation of
  #     1.0, the original_stddev specifies the standard deviation of the domain
  #     prior to normalization.
  class FeatureValueDomain
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Visualization configurations for image explanation.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Type]
  #     Type of the image visualization. Only applicable to
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
  #     OUTLINES shows regions of attribution, while PIXELS shows per-pixel
  #     attribution. Defaults to OUTLINES.
  # @!attribute [rw] polarity
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Polarity]
  #     Whether to only highlight pixels with positive contributions, negative
  #     or both. Defaults to POSITIVE.
  # @!attribute [rw] color_map
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::ColorMap]
  #     The color scheme used for the highlighted areas.
  #
  #     Defaults to PINK_GREEN for
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
  #     which shows positive attributions in green and negative in pink.
  #
  #     Defaults to VIRIDIS for
  #     [XRAI
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
  #     which highlights the most influential regions in yellow and the least
  #     influential in blue.
  # @!attribute [rw] clip_percent_upperbound
  #   @return [::Float]
  #     Excludes attributions above the specified percentile from the
  #     highlighted areas. Using the clip_percent_upperbound and
  #     clip_percent_lowerbound together can be useful for filtering out noise
  #     and making it easier to see areas of strong attribution. Defaults to
  #     99.9.
  # @!attribute [rw] clip_percent_lowerbound
  #   @return [::Float]
  #     Excludes attributions below the specified percentile, from the
  #     highlighted areas. Defaults to 62.
  # @!attribute [rw] overlay_type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::OverlayType]
  #     How the original image is displayed in the visualization.
  #     Adjusting the overlay can help increase visual clarity if the original
  #     image makes it difficult to view the visualization. Defaults to NONE.
  class Visualization
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Type of the image visualization. Only applicable to
    # [Integrated Gradients
    # attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
    module Type
      # Should not be used.
      TYPE_UNSPECIFIED = 0

      # Shows which pixel contributed to the image prediction.
      PIXELS = 1

      # Shows which region contributed to the image prediction by outlining
      # the region.
      OUTLINES = 2
    end

    # Whether to only highlight pixels with positive contributions, negative
    # or both. Defaults to POSITIVE.
    module Polarity
      # Default value. This is the same as POSITIVE.
      POLARITY_UNSPECIFIED = 0

      # Highlights the pixels/outlines that were most influential to the
      # model's prediction.
      POSITIVE = 1

      # Setting polarity to negative highlights areas that does not lead to
      # the models's current prediction.
      NEGATIVE = 2

      # Shows both positive and negative attributions.
      BOTH = 3
    end

    # The color scheme used for highlighting areas.
    module ColorMap
      # Should not be used.
      COLOR_MAP_UNSPECIFIED = 0

      # Positive: green. Negative: pink.
      PINK_GREEN = 1

      # Viridis color map: A perceptually uniform color mapping which is
      # easier to see by those with colorblindness and progresses from yellow
      # to green to blue. Positive: yellow. Negative: blue.
      VIRIDIS = 2

      # Positive: red. Negative: red.
      RED = 3

      # Positive: green. Negative: green.
      GREEN = 4

      # Positive: green. Negative: red.
      RED_GREEN = 6

      # PiYG palette.
      PINK_WHITE_GREEN = 5
    end

    # How the original image is displayed in the visualization.
    module OverlayType
      # Default value. This is the same as NONE.
      OVERLAY_TYPE_UNSPECIFIED = 0

      # No overlay.
      NONE = 1

      # The attributions are shown on top of the original image.
      ORIGINAL = 2

      # The attributions are shown on top of grayscaled version of the
      # original image.
      GRAYSCALE = 3

      # The attributions are used as a mask to reveal predictive parts of
      # the image and hide the un-predictive parts.
      MASK_BLACK = 4
    end
  end

  # Defines how a feature is encoded. Defaults to IDENTITY.
  module Encoding
    # Default value. This is the same as IDENTITY.
    ENCODING_UNSPECIFIED = 0

    # The tensor represents one feature.
    IDENTITY = 1

    # The tensor represents a bag of features where each index maps to
    # a feature.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [27, 6.0, 150]
    # index_feature_mapping = ["age", "height", "weight"]
    # ```
    BAG_OF_FEATURES = 2

    # The tensor represents a bag of features where each index maps to a
    # feature. Zero values in the tensor indicates feature being
    # non-existent.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [2, 0, 5, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    BAG_OF_FEATURES_SPARSE = 3

    # The tensor is a list of binaries representing whether a feature exists
    # or not (1 indicates existence).
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [1, 0, 1, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    INDICATOR = 4

    # The tensor is encoded into a 1-dimensional array represented by an
    # encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [0.1, 0.2, 0.3, 0.4, 0.5]
    # ```
    COMBINED_EMBEDDING = 5

    # Select this encoding when the input tensor is encoded into a
    # 2-dimensional array represented by an encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. The first dimension of the encoded
    # tensor's shape is the same as the input tensor's shape. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [[0.1, 0.2, 0.3, 0.4, 0.5],
    #            [0.2, 0.1, 0.4, 0.3, 0.5],
    #            [0.5, 0.1, 0.3, 0.5, 0.4],
    #            [0.5, 0.3, 0.1, 0.2, 0.4],
    #            [0.4, 0.3, 0.2, 0.5, 0.1]]
    # ```
    CONCAT_EMBEDDING = 6
  end
end

#encoded_tensor_name::String

Returns Encoded tensor is a transformation of the input tensor. Must be provided if choosing [Integrated Gradients attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution] or [XRAI attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution] and the input tensor is not differentiable.

An encoded tensor is generated if the input tensor is encoded by a lookup table.

Returns:

  • (::String)

    Encoded tensor is a transformation of the input tensor. Must be provided if choosing [Integrated Gradients attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution] or [XRAI attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution] and the input tensor is not differentiable.

    An encoded tensor is generated if the input tensor is encoded by a lookup table.



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'proto_docs/google/cloud/aiplatform/v1/explanation_metadata.rb', line 160

class InputMetadata
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Domain details of the input feature value. Provides numeric information
  # about the feature, such as its range (min, max). If the feature has been
  # pre-processed, for example with z-scoring, then it provides information
  # about how to recover the original feature. For example, if the input
  # feature is an image and it has been pre-processed to obtain 0-mean and
  # stddev = 1 values, then original_mean, and original_stddev refer to the
  # mean and stddev of the original feature (e.g. image tensor) from which
  # input feature (with mean = 0 and stddev = 1) was obtained.
  # @!attribute [rw] min_value
  #   @return [::Float]
  #     The minimum permissible value for this feature.
  # @!attribute [rw] max_value
  #   @return [::Float]
  #     The maximum permissible value for this feature.
  # @!attribute [rw] original_mean
  #   @return [::Float]
  #     If this input feature has been normalized to a mean value of 0,
  #     the original_mean specifies the mean value of the domain prior to
  #     normalization.
  # @!attribute [rw] original_stddev
  #   @return [::Float]
  #     If this input feature has been normalized to a standard deviation of
  #     1.0, the original_stddev specifies the standard deviation of the domain
  #     prior to normalization.
  class FeatureValueDomain
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Visualization configurations for image explanation.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Type]
  #     Type of the image visualization. Only applicable to
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
  #     OUTLINES shows regions of attribution, while PIXELS shows per-pixel
  #     attribution. Defaults to OUTLINES.
  # @!attribute [rw] polarity
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Polarity]
  #     Whether to only highlight pixels with positive contributions, negative
  #     or both. Defaults to POSITIVE.
  # @!attribute [rw] color_map
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::ColorMap]
  #     The color scheme used for the highlighted areas.
  #
  #     Defaults to PINK_GREEN for
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
  #     which shows positive attributions in green and negative in pink.
  #
  #     Defaults to VIRIDIS for
  #     [XRAI
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
  #     which highlights the most influential regions in yellow and the least
  #     influential in blue.
  # @!attribute [rw] clip_percent_upperbound
  #   @return [::Float]
  #     Excludes attributions above the specified percentile from the
  #     highlighted areas. Using the clip_percent_upperbound and
  #     clip_percent_lowerbound together can be useful for filtering out noise
  #     and making it easier to see areas of strong attribution. Defaults to
  #     99.9.
  # @!attribute [rw] clip_percent_lowerbound
  #   @return [::Float]
  #     Excludes attributions below the specified percentile, from the
  #     highlighted areas. Defaults to 62.
  # @!attribute [rw] overlay_type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::OverlayType]
  #     How the original image is displayed in the visualization.
  #     Adjusting the overlay can help increase visual clarity if the original
  #     image makes it difficult to view the visualization. Defaults to NONE.
  class Visualization
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Type of the image visualization. Only applicable to
    # [Integrated Gradients
    # attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
    module Type
      # Should not be used.
      TYPE_UNSPECIFIED = 0

      # Shows which pixel contributed to the image prediction.
      PIXELS = 1

      # Shows which region contributed to the image prediction by outlining
      # the region.
      OUTLINES = 2
    end

    # Whether to only highlight pixels with positive contributions, negative
    # or both. Defaults to POSITIVE.
    module Polarity
      # Default value. This is the same as POSITIVE.
      POLARITY_UNSPECIFIED = 0

      # Highlights the pixels/outlines that were most influential to the
      # model's prediction.
      POSITIVE = 1

      # Setting polarity to negative highlights areas that does not lead to
      # the models's current prediction.
      NEGATIVE = 2

      # Shows both positive and negative attributions.
      BOTH = 3
    end

    # The color scheme used for highlighting areas.
    module ColorMap
      # Should not be used.
      COLOR_MAP_UNSPECIFIED = 0

      # Positive: green. Negative: pink.
      PINK_GREEN = 1

      # Viridis color map: A perceptually uniform color mapping which is
      # easier to see by those with colorblindness and progresses from yellow
      # to green to blue. Positive: yellow. Negative: blue.
      VIRIDIS = 2

      # Positive: red. Negative: red.
      RED = 3

      # Positive: green. Negative: green.
      GREEN = 4

      # Positive: green. Negative: red.
      RED_GREEN = 6

      # PiYG palette.
      PINK_WHITE_GREEN = 5
    end

    # How the original image is displayed in the visualization.
    module OverlayType
      # Default value. This is the same as NONE.
      OVERLAY_TYPE_UNSPECIFIED = 0

      # No overlay.
      NONE = 1

      # The attributions are shown on top of the original image.
      ORIGINAL = 2

      # The attributions are shown on top of grayscaled version of the
      # original image.
      GRAYSCALE = 3

      # The attributions are used as a mask to reveal predictive parts of
      # the image and hide the un-predictive parts.
      MASK_BLACK = 4
    end
  end

  # Defines how a feature is encoded. Defaults to IDENTITY.
  module Encoding
    # Default value. This is the same as IDENTITY.
    ENCODING_UNSPECIFIED = 0

    # The tensor represents one feature.
    IDENTITY = 1

    # The tensor represents a bag of features where each index maps to
    # a feature.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [27, 6.0, 150]
    # index_feature_mapping = ["age", "height", "weight"]
    # ```
    BAG_OF_FEATURES = 2

    # The tensor represents a bag of features where each index maps to a
    # feature. Zero values in the tensor indicates feature being
    # non-existent.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [2, 0, 5, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    BAG_OF_FEATURES_SPARSE = 3

    # The tensor is a list of binaries representing whether a feature exists
    # or not (1 indicates existence).
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [1, 0, 1, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    INDICATOR = 4

    # The tensor is encoded into a 1-dimensional array represented by an
    # encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [0.1, 0.2, 0.3, 0.4, 0.5]
    # ```
    COMBINED_EMBEDDING = 5

    # Select this encoding when the input tensor is encoded into a
    # 2-dimensional array represented by an encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. The first dimension of the encoded
    # tensor's shape is the same as the input tensor's shape. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [[0.1, 0.2, 0.3, 0.4, 0.5],
    #            [0.2, 0.1, 0.4, 0.3, 0.5],
    #            [0.5, 0.1, 0.3, 0.5, 0.4],
    #            [0.5, 0.3, 0.1, 0.2, 0.4],
    #            [0.4, 0.3, 0.2, 0.5, 0.1]]
    # ```
    CONCAT_EMBEDDING = 6
  end
end

#encoding::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Encoding

Returns Defines how the feature is encoded into the input tensor. Defaults to IDENTITY.

Returns:



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'proto_docs/google/cloud/aiplatform/v1/explanation_metadata.rb', line 160

class InputMetadata
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Domain details of the input feature value. Provides numeric information
  # about the feature, such as its range (min, max). If the feature has been
  # pre-processed, for example with z-scoring, then it provides information
  # about how to recover the original feature. For example, if the input
  # feature is an image and it has been pre-processed to obtain 0-mean and
  # stddev = 1 values, then original_mean, and original_stddev refer to the
  # mean and stddev of the original feature (e.g. image tensor) from which
  # input feature (with mean = 0 and stddev = 1) was obtained.
  # @!attribute [rw] min_value
  #   @return [::Float]
  #     The minimum permissible value for this feature.
  # @!attribute [rw] max_value
  #   @return [::Float]
  #     The maximum permissible value for this feature.
  # @!attribute [rw] original_mean
  #   @return [::Float]
  #     If this input feature has been normalized to a mean value of 0,
  #     the original_mean specifies the mean value of the domain prior to
  #     normalization.
  # @!attribute [rw] original_stddev
  #   @return [::Float]
  #     If this input feature has been normalized to a standard deviation of
  #     1.0, the original_stddev specifies the standard deviation of the domain
  #     prior to normalization.
  class FeatureValueDomain
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Visualization configurations for image explanation.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Type]
  #     Type of the image visualization. Only applicable to
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
  #     OUTLINES shows regions of attribution, while PIXELS shows per-pixel
  #     attribution. Defaults to OUTLINES.
  # @!attribute [rw] polarity
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Polarity]
  #     Whether to only highlight pixels with positive contributions, negative
  #     or both. Defaults to POSITIVE.
  # @!attribute [rw] color_map
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::ColorMap]
  #     The color scheme used for the highlighted areas.
  #
  #     Defaults to PINK_GREEN for
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
  #     which shows positive attributions in green and negative in pink.
  #
  #     Defaults to VIRIDIS for
  #     [XRAI
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
  #     which highlights the most influential regions in yellow and the least
  #     influential in blue.
  # @!attribute [rw] clip_percent_upperbound
  #   @return [::Float]
  #     Excludes attributions above the specified percentile from the
  #     highlighted areas. Using the clip_percent_upperbound and
  #     clip_percent_lowerbound together can be useful for filtering out noise
  #     and making it easier to see areas of strong attribution. Defaults to
  #     99.9.
  # @!attribute [rw] clip_percent_lowerbound
  #   @return [::Float]
  #     Excludes attributions below the specified percentile, from the
  #     highlighted areas. Defaults to 62.
  # @!attribute [rw] overlay_type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::OverlayType]
  #     How the original image is displayed in the visualization.
  #     Adjusting the overlay can help increase visual clarity if the original
  #     image makes it difficult to view the visualization. Defaults to NONE.
  class Visualization
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Type of the image visualization. Only applicable to
    # [Integrated Gradients
    # attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
    module Type
      # Should not be used.
      TYPE_UNSPECIFIED = 0

      # Shows which pixel contributed to the image prediction.
      PIXELS = 1

      # Shows which region contributed to the image prediction by outlining
      # the region.
      OUTLINES = 2
    end

    # Whether to only highlight pixels with positive contributions, negative
    # or both. Defaults to POSITIVE.
    module Polarity
      # Default value. This is the same as POSITIVE.
      POLARITY_UNSPECIFIED = 0

      # Highlights the pixels/outlines that were most influential to the
      # model's prediction.
      POSITIVE = 1

      # Setting polarity to negative highlights areas that does not lead to
      # the models's current prediction.
      NEGATIVE = 2

      # Shows both positive and negative attributions.
      BOTH = 3
    end

    # The color scheme used for highlighting areas.
    module ColorMap
      # Should not be used.
      COLOR_MAP_UNSPECIFIED = 0

      # Positive: green. Negative: pink.
      PINK_GREEN = 1

      # Viridis color map: A perceptually uniform color mapping which is
      # easier to see by those with colorblindness and progresses from yellow
      # to green to blue. Positive: yellow. Negative: blue.
      VIRIDIS = 2

      # Positive: red. Negative: red.
      RED = 3

      # Positive: green. Negative: green.
      GREEN = 4

      # Positive: green. Negative: red.
      RED_GREEN = 6

      # PiYG palette.
      PINK_WHITE_GREEN = 5
    end

    # How the original image is displayed in the visualization.
    module OverlayType
      # Default value. This is the same as NONE.
      OVERLAY_TYPE_UNSPECIFIED = 0

      # No overlay.
      NONE = 1

      # The attributions are shown on top of the original image.
      ORIGINAL = 2

      # The attributions are shown on top of grayscaled version of the
      # original image.
      GRAYSCALE = 3

      # The attributions are used as a mask to reveal predictive parts of
      # the image and hide the un-predictive parts.
      MASK_BLACK = 4
    end
  end

  # Defines how a feature is encoded. Defaults to IDENTITY.
  module Encoding
    # Default value. This is the same as IDENTITY.
    ENCODING_UNSPECIFIED = 0

    # The tensor represents one feature.
    IDENTITY = 1

    # The tensor represents a bag of features where each index maps to
    # a feature.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [27, 6.0, 150]
    # index_feature_mapping = ["age", "height", "weight"]
    # ```
    BAG_OF_FEATURES = 2

    # The tensor represents a bag of features where each index maps to a
    # feature. Zero values in the tensor indicates feature being
    # non-existent.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [2, 0, 5, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    BAG_OF_FEATURES_SPARSE = 3

    # The tensor is a list of binaries representing whether a feature exists
    # or not (1 indicates existence).
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [1, 0, 1, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    INDICATOR = 4

    # The tensor is encoded into a 1-dimensional array represented by an
    # encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [0.1, 0.2, 0.3, 0.4, 0.5]
    # ```
    COMBINED_EMBEDDING = 5

    # Select this encoding when the input tensor is encoded into a
    # 2-dimensional array represented by an encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. The first dimension of the encoded
    # tensor's shape is the same as the input tensor's shape. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [[0.1, 0.2, 0.3, 0.4, 0.5],
    #            [0.2, 0.1, 0.4, 0.3, 0.5],
    #            [0.5, 0.1, 0.3, 0.5, 0.4],
    #            [0.5, 0.3, 0.1, 0.2, 0.4],
    #            [0.4, 0.3, 0.2, 0.5, 0.1]]
    # ```
    CONCAT_EMBEDDING = 6
  end
end

#feature_value_domain::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::FeatureValueDomain

Returns The domain details of the input feature value. Like min/max, original mean or standard deviation if normalized.

Returns:



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'proto_docs/google/cloud/aiplatform/v1/explanation_metadata.rb', line 160

class InputMetadata
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Domain details of the input feature value. Provides numeric information
  # about the feature, such as its range (min, max). If the feature has been
  # pre-processed, for example with z-scoring, then it provides information
  # about how to recover the original feature. For example, if the input
  # feature is an image and it has been pre-processed to obtain 0-mean and
  # stddev = 1 values, then original_mean, and original_stddev refer to the
  # mean and stddev of the original feature (e.g. image tensor) from which
  # input feature (with mean = 0 and stddev = 1) was obtained.
  # @!attribute [rw] min_value
  #   @return [::Float]
  #     The minimum permissible value for this feature.
  # @!attribute [rw] max_value
  #   @return [::Float]
  #     The maximum permissible value for this feature.
  # @!attribute [rw] original_mean
  #   @return [::Float]
  #     If this input feature has been normalized to a mean value of 0,
  #     the original_mean specifies the mean value of the domain prior to
  #     normalization.
  # @!attribute [rw] original_stddev
  #   @return [::Float]
  #     If this input feature has been normalized to a standard deviation of
  #     1.0, the original_stddev specifies the standard deviation of the domain
  #     prior to normalization.
  class FeatureValueDomain
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Visualization configurations for image explanation.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Type]
  #     Type of the image visualization. Only applicable to
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
  #     OUTLINES shows regions of attribution, while PIXELS shows per-pixel
  #     attribution. Defaults to OUTLINES.
  # @!attribute [rw] polarity
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Polarity]
  #     Whether to only highlight pixels with positive contributions, negative
  #     or both. Defaults to POSITIVE.
  # @!attribute [rw] color_map
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::ColorMap]
  #     The color scheme used for the highlighted areas.
  #
  #     Defaults to PINK_GREEN for
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
  #     which shows positive attributions in green and negative in pink.
  #
  #     Defaults to VIRIDIS for
  #     [XRAI
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
  #     which highlights the most influential regions in yellow and the least
  #     influential in blue.
  # @!attribute [rw] clip_percent_upperbound
  #   @return [::Float]
  #     Excludes attributions above the specified percentile from the
  #     highlighted areas. Using the clip_percent_upperbound and
  #     clip_percent_lowerbound together can be useful for filtering out noise
  #     and making it easier to see areas of strong attribution. Defaults to
  #     99.9.
  # @!attribute [rw] clip_percent_lowerbound
  #   @return [::Float]
  #     Excludes attributions below the specified percentile, from the
  #     highlighted areas. Defaults to 62.
  # @!attribute [rw] overlay_type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::OverlayType]
  #     How the original image is displayed in the visualization.
  #     Adjusting the overlay can help increase visual clarity if the original
  #     image makes it difficult to view the visualization. Defaults to NONE.
  class Visualization
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Type of the image visualization. Only applicable to
    # [Integrated Gradients
    # attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
    module Type
      # Should not be used.
      TYPE_UNSPECIFIED = 0

      # Shows which pixel contributed to the image prediction.
      PIXELS = 1

      # Shows which region contributed to the image prediction by outlining
      # the region.
      OUTLINES = 2
    end

    # Whether to only highlight pixels with positive contributions, negative
    # or both. Defaults to POSITIVE.
    module Polarity
      # Default value. This is the same as POSITIVE.
      POLARITY_UNSPECIFIED = 0

      # Highlights the pixels/outlines that were most influential to the
      # model's prediction.
      POSITIVE = 1

      # Setting polarity to negative highlights areas that does not lead to
      # the models's current prediction.
      NEGATIVE = 2

      # Shows both positive and negative attributions.
      BOTH = 3
    end

    # The color scheme used for highlighting areas.
    module ColorMap
      # Should not be used.
      COLOR_MAP_UNSPECIFIED = 0

      # Positive: green. Negative: pink.
      PINK_GREEN = 1

      # Viridis color map: A perceptually uniform color mapping which is
      # easier to see by those with colorblindness and progresses from yellow
      # to green to blue. Positive: yellow. Negative: blue.
      VIRIDIS = 2

      # Positive: red. Negative: red.
      RED = 3

      # Positive: green. Negative: green.
      GREEN = 4

      # Positive: green. Negative: red.
      RED_GREEN = 6

      # PiYG palette.
      PINK_WHITE_GREEN = 5
    end

    # How the original image is displayed in the visualization.
    module OverlayType
      # Default value. This is the same as NONE.
      OVERLAY_TYPE_UNSPECIFIED = 0

      # No overlay.
      NONE = 1

      # The attributions are shown on top of the original image.
      ORIGINAL = 2

      # The attributions are shown on top of grayscaled version of the
      # original image.
      GRAYSCALE = 3

      # The attributions are used as a mask to reveal predictive parts of
      # the image and hide the un-predictive parts.
      MASK_BLACK = 4
    end
  end

  # Defines how a feature is encoded. Defaults to IDENTITY.
  module Encoding
    # Default value. This is the same as IDENTITY.
    ENCODING_UNSPECIFIED = 0

    # The tensor represents one feature.
    IDENTITY = 1

    # The tensor represents a bag of features where each index maps to
    # a feature.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [27, 6.0, 150]
    # index_feature_mapping = ["age", "height", "weight"]
    # ```
    BAG_OF_FEATURES = 2

    # The tensor represents a bag of features where each index maps to a
    # feature. Zero values in the tensor indicates feature being
    # non-existent.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [2, 0, 5, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    BAG_OF_FEATURES_SPARSE = 3

    # The tensor is a list of binaries representing whether a feature exists
    # or not (1 indicates existence).
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [1, 0, 1, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    INDICATOR = 4

    # The tensor is encoded into a 1-dimensional array represented by an
    # encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [0.1, 0.2, 0.3, 0.4, 0.5]
    # ```
    COMBINED_EMBEDDING = 5

    # Select this encoding when the input tensor is encoded into a
    # 2-dimensional array represented by an encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. The first dimension of the encoded
    # tensor's shape is the same as the input tensor's shape. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [[0.1, 0.2, 0.3, 0.4, 0.5],
    #            [0.2, 0.1, 0.4, 0.3, 0.5],
    #            [0.5, 0.1, 0.3, 0.5, 0.4],
    #            [0.5, 0.3, 0.1, 0.2, 0.4],
    #            [0.4, 0.3, 0.2, 0.5, 0.1]]
    # ```
    CONCAT_EMBEDDING = 6
  end
end

#group_name::String

Returns Name of the group that the input belongs to. Features with the same group name will be treated as one feature when computing attributions. Features grouped together can have different shapes in value. If provided, there will be one single attribution generated in Attribution.feature_attributions, keyed by the group name.

Returns:

  • (::String)

    Name of the group that the input belongs to. Features with the same group name will be treated as one feature when computing attributions. Features grouped together can have different shapes in value. If provided, there will be one single attribution generated in Attribution.feature_attributions, keyed by the group name.



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'proto_docs/google/cloud/aiplatform/v1/explanation_metadata.rb', line 160

class InputMetadata
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Domain details of the input feature value. Provides numeric information
  # about the feature, such as its range (min, max). If the feature has been
  # pre-processed, for example with z-scoring, then it provides information
  # about how to recover the original feature. For example, if the input
  # feature is an image and it has been pre-processed to obtain 0-mean and
  # stddev = 1 values, then original_mean, and original_stddev refer to the
  # mean and stddev of the original feature (e.g. image tensor) from which
  # input feature (with mean = 0 and stddev = 1) was obtained.
  # @!attribute [rw] min_value
  #   @return [::Float]
  #     The minimum permissible value for this feature.
  # @!attribute [rw] max_value
  #   @return [::Float]
  #     The maximum permissible value for this feature.
  # @!attribute [rw] original_mean
  #   @return [::Float]
  #     If this input feature has been normalized to a mean value of 0,
  #     the original_mean specifies the mean value of the domain prior to
  #     normalization.
  # @!attribute [rw] original_stddev
  #   @return [::Float]
  #     If this input feature has been normalized to a standard deviation of
  #     1.0, the original_stddev specifies the standard deviation of the domain
  #     prior to normalization.
  class FeatureValueDomain
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Visualization configurations for image explanation.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Type]
  #     Type of the image visualization. Only applicable to
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
  #     OUTLINES shows regions of attribution, while PIXELS shows per-pixel
  #     attribution. Defaults to OUTLINES.
  # @!attribute [rw] polarity
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Polarity]
  #     Whether to only highlight pixels with positive contributions, negative
  #     or both. Defaults to POSITIVE.
  # @!attribute [rw] color_map
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::ColorMap]
  #     The color scheme used for the highlighted areas.
  #
  #     Defaults to PINK_GREEN for
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
  #     which shows positive attributions in green and negative in pink.
  #
  #     Defaults to VIRIDIS for
  #     [XRAI
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
  #     which highlights the most influential regions in yellow and the least
  #     influential in blue.
  # @!attribute [rw] clip_percent_upperbound
  #   @return [::Float]
  #     Excludes attributions above the specified percentile from the
  #     highlighted areas. Using the clip_percent_upperbound and
  #     clip_percent_lowerbound together can be useful for filtering out noise
  #     and making it easier to see areas of strong attribution. Defaults to
  #     99.9.
  # @!attribute [rw] clip_percent_lowerbound
  #   @return [::Float]
  #     Excludes attributions below the specified percentile, from the
  #     highlighted areas. Defaults to 62.
  # @!attribute [rw] overlay_type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::OverlayType]
  #     How the original image is displayed in the visualization.
  #     Adjusting the overlay can help increase visual clarity if the original
  #     image makes it difficult to view the visualization. Defaults to NONE.
  class Visualization
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Type of the image visualization. Only applicable to
    # [Integrated Gradients
    # attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
    module Type
      # Should not be used.
      TYPE_UNSPECIFIED = 0

      # Shows which pixel contributed to the image prediction.
      PIXELS = 1

      # Shows which region contributed to the image prediction by outlining
      # the region.
      OUTLINES = 2
    end

    # Whether to only highlight pixels with positive contributions, negative
    # or both. Defaults to POSITIVE.
    module Polarity
      # Default value. This is the same as POSITIVE.
      POLARITY_UNSPECIFIED = 0

      # Highlights the pixels/outlines that were most influential to the
      # model's prediction.
      POSITIVE = 1

      # Setting polarity to negative highlights areas that does not lead to
      # the models's current prediction.
      NEGATIVE = 2

      # Shows both positive and negative attributions.
      BOTH = 3
    end

    # The color scheme used for highlighting areas.
    module ColorMap
      # Should not be used.
      COLOR_MAP_UNSPECIFIED = 0

      # Positive: green. Negative: pink.
      PINK_GREEN = 1

      # Viridis color map: A perceptually uniform color mapping which is
      # easier to see by those with colorblindness and progresses from yellow
      # to green to blue. Positive: yellow. Negative: blue.
      VIRIDIS = 2

      # Positive: red. Negative: red.
      RED = 3

      # Positive: green. Negative: green.
      GREEN = 4

      # Positive: green. Negative: red.
      RED_GREEN = 6

      # PiYG palette.
      PINK_WHITE_GREEN = 5
    end

    # How the original image is displayed in the visualization.
    module OverlayType
      # Default value. This is the same as NONE.
      OVERLAY_TYPE_UNSPECIFIED = 0

      # No overlay.
      NONE = 1

      # The attributions are shown on top of the original image.
      ORIGINAL = 2

      # The attributions are shown on top of grayscaled version of the
      # original image.
      GRAYSCALE = 3

      # The attributions are used as a mask to reveal predictive parts of
      # the image and hide the un-predictive parts.
      MASK_BLACK = 4
    end
  end

  # Defines how a feature is encoded. Defaults to IDENTITY.
  module Encoding
    # Default value. This is the same as IDENTITY.
    ENCODING_UNSPECIFIED = 0

    # The tensor represents one feature.
    IDENTITY = 1

    # The tensor represents a bag of features where each index maps to
    # a feature.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [27, 6.0, 150]
    # index_feature_mapping = ["age", "height", "weight"]
    # ```
    BAG_OF_FEATURES = 2

    # The tensor represents a bag of features where each index maps to a
    # feature. Zero values in the tensor indicates feature being
    # non-existent.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [2, 0, 5, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    BAG_OF_FEATURES_SPARSE = 3

    # The tensor is a list of binaries representing whether a feature exists
    # or not (1 indicates existence).
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [1, 0, 1, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    INDICATOR = 4

    # The tensor is encoded into a 1-dimensional array represented by an
    # encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [0.1, 0.2, 0.3, 0.4, 0.5]
    # ```
    COMBINED_EMBEDDING = 5

    # Select this encoding when the input tensor is encoded into a
    # 2-dimensional array represented by an encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. The first dimension of the encoded
    # tensor's shape is the same as the input tensor's shape. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [[0.1, 0.2, 0.3, 0.4, 0.5],
    #            [0.2, 0.1, 0.4, 0.3, 0.5],
    #            [0.5, 0.1, 0.3, 0.5, 0.4],
    #            [0.5, 0.3, 0.1, 0.2, 0.4],
    #            [0.4, 0.3, 0.2, 0.5, 0.1]]
    # ```
    CONCAT_EMBEDDING = 6
  end
end

#index_feature_mapping::Array<::String>

Returns A list of feature names for each index in the input tensor. Required when the input InputMetadata.encoding is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.

Returns:

  • (::Array<::String>)

    A list of feature names for each index in the input tensor. Required when the input InputMetadata.encoding is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'proto_docs/google/cloud/aiplatform/v1/explanation_metadata.rb', line 160

class InputMetadata
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Domain details of the input feature value. Provides numeric information
  # about the feature, such as its range (min, max). If the feature has been
  # pre-processed, for example with z-scoring, then it provides information
  # about how to recover the original feature. For example, if the input
  # feature is an image and it has been pre-processed to obtain 0-mean and
  # stddev = 1 values, then original_mean, and original_stddev refer to the
  # mean and stddev of the original feature (e.g. image tensor) from which
  # input feature (with mean = 0 and stddev = 1) was obtained.
  # @!attribute [rw] min_value
  #   @return [::Float]
  #     The minimum permissible value for this feature.
  # @!attribute [rw] max_value
  #   @return [::Float]
  #     The maximum permissible value for this feature.
  # @!attribute [rw] original_mean
  #   @return [::Float]
  #     If this input feature has been normalized to a mean value of 0,
  #     the original_mean specifies the mean value of the domain prior to
  #     normalization.
  # @!attribute [rw] original_stddev
  #   @return [::Float]
  #     If this input feature has been normalized to a standard deviation of
  #     1.0, the original_stddev specifies the standard deviation of the domain
  #     prior to normalization.
  class FeatureValueDomain
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Visualization configurations for image explanation.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Type]
  #     Type of the image visualization. Only applicable to
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
  #     OUTLINES shows regions of attribution, while PIXELS shows per-pixel
  #     attribution. Defaults to OUTLINES.
  # @!attribute [rw] polarity
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Polarity]
  #     Whether to only highlight pixels with positive contributions, negative
  #     or both. Defaults to POSITIVE.
  # @!attribute [rw] color_map
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::ColorMap]
  #     The color scheme used for the highlighted areas.
  #
  #     Defaults to PINK_GREEN for
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
  #     which shows positive attributions in green and negative in pink.
  #
  #     Defaults to VIRIDIS for
  #     [XRAI
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
  #     which highlights the most influential regions in yellow and the least
  #     influential in blue.
  # @!attribute [rw] clip_percent_upperbound
  #   @return [::Float]
  #     Excludes attributions above the specified percentile from the
  #     highlighted areas. Using the clip_percent_upperbound and
  #     clip_percent_lowerbound together can be useful for filtering out noise
  #     and making it easier to see areas of strong attribution. Defaults to
  #     99.9.
  # @!attribute [rw] clip_percent_lowerbound
  #   @return [::Float]
  #     Excludes attributions below the specified percentile, from the
  #     highlighted areas. Defaults to 62.
  # @!attribute [rw] overlay_type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::OverlayType]
  #     How the original image is displayed in the visualization.
  #     Adjusting the overlay can help increase visual clarity if the original
  #     image makes it difficult to view the visualization. Defaults to NONE.
  class Visualization
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Type of the image visualization. Only applicable to
    # [Integrated Gradients
    # attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
    module Type
      # Should not be used.
      TYPE_UNSPECIFIED = 0

      # Shows which pixel contributed to the image prediction.
      PIXELS = 1

      # Shows which region contributed to the image prediction by outlining
      # the region.
      OUTLINES = 2
    end

    # Whether to only highlight pixels with positive contributions, negative
    # or both. Defaults to POSITIVE.
    module Polarity
      # Default value. This is the same as POSITIVE.
      POLARITY_UNSPECIFIED = 0

      # Highlights the pixels/outlines that were most influential to the
      # model's prediction.
      POSITIVE = 1

      # Setting polarity to negative highlights areas that does not lead to
      # the models's current prediction.
      NEGATIVE = 2

      # Shows both positive and negative attributions.
      BOTH = 3
    end

    # The color scheme used for highlighting areas.
    module ColorMap
      # Should not be used.
      COLOR_MAP_UNSPECIFIED = 0

      # Positive: green. Negative: pink.
      PINK_GREEN = 1

      # Viridis color map: A perceptually uniform color mapping which is
      # easier to see by those with colorblindness and progresses from yellow
      # to green to blue. Positive: yellow. Negative: blue.
      VIRIDIS = 2

      # Positive: red. Negative: red.
      RED = 3

      # Positive: green. Negative: green.
      GREEN = 4

      # Positive: green. Negative: red.
      RED_GREEN = 6

      # PiYG palette.
      PINK_WHITE_GREEN = 5
    end

    # How the original image is displayed in the visualization.
    module OverlayType
      # Default value. This is the same as NONE.
      OVERLAY_TYPE_UNSPECIFIED = 0

      # No overlay.
      NONE = 1

      # The attributions are shown on top of the original image.
      ORIGINAL = 2

      # The attributions are shown on top of grayscaled version of the
      # original image.
      GRAYSCALE = 3

      # The attributions are used as a mask to reveal predictive parts of
      # the image and hide the un-predictive parts.
      MASK_BLACK = 4
    end
  end

  # Defines how a feature is encoded. Defaults to IDENTITY.
  module Encoding
    # Default value. This is the same as IDENTITY.
    ENCODING_UNSPECIFIED = 0

    # The tensor represents one feature.
    IDENTITY = 1

    # The tensor represents a bag of features where each index maps to
    # a feature.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [27, 6.0, 150]
    # index_feature_mapping = ["age", "height", "weight"]
    # ```
    BAG_OF_FEATURES = 2

    # The tensor represents a bag of features where each index maps to a
    # feature. Zero values in the tensor indicates feature being
    # non-existent.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [2, 0, 5, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    BAG_OF_FEATURES_SPARSE = 3

    # The tensor is a list of binaries representing whether a feature exists
    # or not (1 indicates existence).
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [1, 0, 1, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    INDICATOR = 4

    # The tensor is encoded into a 1-dimensional array represented by an
    # encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [0.1, 0.2, 0.3, 0.4, 0.5]
    # ```
    COMBINED_EMBEDDING = 5

    # Select this encoding when the input tensor is encoded into a
    # 2-dimensional array represented by an encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. The first dimension of the encoded
    # tensor's shape is the same as the input tensor's shape. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [[0.1, 0.2, 0.3, 0.4, 0.5],
    #            [0.2, 0.1, 0.4, 0.3, 0.5],
    #            [0.5, 0.1, 0.3, 0.5, 0.4],
    #            [0.5, 0.3, 0.1, 0.2, 0.4],
    #            [0.4, 0.3, 0.2, 0.5, 0.1]]
    # ```
    CONCAT_EMBEDDING = 6
  end
end

#indices_tensor_name::String

Returns Specifies the index of the values of the input tensor. Required when the input tensor is a sparse representation. Refer to Tensorflow documentation for more details: https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.

Returns:



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'proto_docs/google/cloud/aiplatform/v1/explanation_metadata.rb', line 160

class InputMetadata
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Domain details of the input feature value. Provides numeric information
  # about the feature, such as its range (min, max). If the feature has been
  # pre-processed, for example with z-scoring, then it provides information
  # about how to recover the original feature. For example, if the input
  # feature is an image and it has been pre-processed to obtain 0-mean and
  # stddev = 1 values, then original_mean, and original_stddev refer to the
  # mean and stddev of the original feature (e.g. image tensor) from which
  # input feature (with mean = 0 and stddev = 1) was obtained.
  # @!attribute [rw] min_value
  #   @return [::Float]
  #     The minimum permissible value for this feature.
  # @!attribute [rw] max_value
  #   @return [::Float]
  #     The maximum permissible value for this feature.
  # @!attribute [rw] original_mean
  #   @return [::Float]
  #     If this input feature has been normalized to a mean value of 0,
  #     the original_mean specifies the mean value of the domain prior to
  #     normalization.
  # @!attribute [rw] original_stddev
  #   @return [::Float]
  #     If this input feature has been normalized to a standard deviation of
  #     1.0, the original_stddev specifies the standard deviation of the domain
  #     prior to normalization.
  class FeatureValueDomain
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Visualization configurations for image explanation.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Type]
  #     Type of the image visualization. Only applicable to
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
  #     OUTLINES shows regions of attribution, while PIXELS shows per-pixel
  #     attribution. Defaults to OUTLINES.
  # @!attribute [rw] polarity
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Polarity]
  #     Whether to only highlight pixels with positive contributions, negative
  #     or both. Defaults to POSITIVE.
  # @!attribute [rw] color_map
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::ColorMap]
  #     The color scheme used for the highlighted areas.
  #
  #     Defaults to PINK_GREEN for
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
  #     which shows positive attributions in green and negative in pink.
  #
  #     Defaults to VIRIDIS for
  #     [XRAI
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
  #     which highlights the most influential regions in yellow and the least
  #     influential in blue.
  # @!attribute [rw] clip_percent_upperbound
  #   @return [::Float]
  #     Excludes attributions above the specified percentile from the
  #     highlighted areas. Using the clip_percent_upperbound and
  #     clip_percent_lowerbound together can be useful for filtering out noise
  #     and making it easier to see areas of strong attribution. Defaults to
  #     99.9.
  # @!attribute [rw] clip_percent_lowerbound
  #   @return [::Float]
  #     Excludes attributions below the specified percentile, from the
  #     highlighted areas. Defaults to 62.
  # @!attribute [rw] overlay_type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::OverlayType]
  #     How the original image is displayed in the visualization.
  #     Adjusting the overlay can help increase visual clarity if the original
  #     image makes it difficult to view the visualization. Defaults to NONE.
  class Visualization
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Type of the image visualization. Only applicable to
    # [Integrated Gradients
    # attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
    module Type
      # Should not be used.
      TYPE_UNSPECIFIED = 0

      # Shows which pixel contributed to the image prediction.
      PIXELS = 1

      # Shows which region contributed to the image prediction by outlining
      # the region.
      OUTLINES = 2
    end

    # Whether to only highlight pixels with positive contributions, negative
    # or both. Defaults to POSITIVE.
    module Polarity
      # Default value. This is the same as POSITIVE.
      POLARITY_UNSPECIFIED = 0

      # Highlights the pixels/outlines that were most influential to the
      # model's prediction.
      POSITIVE = 1

      # Setting polarity to negative highlights areas that does not lead to
      # the models's current prediction.
      NEGATIVE = 2

      # Shows both positive and negative attributions.
      BOTH = 3
    end

    # The color scheme used for highlighting areas.
    module ColorMap
      # Should not be used.
      COLOR_MAP_UNSPECIFIED = 0

      # Positive: green. Negative: pink.
      PINK_GREEN = 1

      # Viridis color map: A perceptually uniform color mapping which is
      # easier to see by those with colorblindness and progresses from yellow
      # to green to blue. Positive: yellow. Negative: blue.
      VIRIDIS = 2

      # Positive: red. Negative: red.
      RED = 3

      # Positive: green. Negative: green.
      GREEN = 4

      # Positive: green. Negative: red.
      RED_GREEN = 6

      # PiYG palette.
      PINK_WHITE_GREEN = 5
    end

    # How the original image is displayed in the visualization.
    module OverlayType
      # Default value. This is the same as NONE.
      OVERLAY_TYPE_UNSPECIFIED = 0

      # No overlay.
      NONE = 1

      # The attributions are shown on top of the original image.
      ORIGINAL = 2

      # The attributions are shown on top of grayscaled version of the
      # original image.
      GRAYSCALE = 3

      # The attributions are used as a mask to reveal predictive parts of
      # the image and hide the un-predictive parts.
      MASK_BLACK = 4
    end
  end

  # Defines how a feature is encoded. Defaults to IDENTITY.
  module Encoding
    # Default value. This is the same as IDENTITY.
    ENCODING_UNSPECIFIED = 0

    # The tensor represents one feature.
    IDENTITY = 1

    # The tensor represents a bag of features where each index maps to
    # a feature.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [27, 6.0, 150]
    # index_feature_mapping = ["age", "height", "weight"]
    # ```
    BAG_OF_FEATURES = 2

    # The tensor represents a bag of features where each index maps to a
    # feature. Zero values in the tensor indicates feature being
    # non-existent.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [2, 0, 5, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    BAG_OF_FEATURES_SPARSE = 3

    # The tensor is a list of binaries representing whether a feature exists
    # or not (1 indicates existence).
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [1, 0, 1, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    INDICATOR = 4

    # The tensor is encoded into a 1-dimensional array represented by an
    # encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [0.1, 0.2, 0.3, 0.4, 0.5]
    # ```
    COMBINED_EMBEDDING = 5

    # Select this encoding when the input tensor is encoded into a
    # 2-dimensional array represented by an encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. The first dimension of the encoded
    # tensor's shape is the same as the input tensor's shape. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [[0.1, 0.2, 0.3, 0.4, 0.5],
    #            [0.2, 0.1, 0.4, 0.3, 0.5],
    #            [0.5, 0.1, 0.3, 0.5, 0.4],
    #            [0.5, 0.3, 0.1, 0.2, 0.4],
    #            [0.4, 0.3, 0.2, 0.5, 0.1]]
    # ```
    CONCAT_EMBEDDING = 6
  end
end

#input_baselines::Array<::Google::Protobuf::Value>

Returns Baseline inputs for this feature.

If no baseline is specified, Vertex AI chooses the baseline for this feature. If multiple baselines are specified, Vertex AI returns the average attributions across them in Attribution.feature_attributions.

For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape of each baseline must match the shape of the input tensor. If a scalar is provided, we broadcast to the same shape as the input tensor.

For custom images, the element of the baselines must be in the same format as the feature's input in the instance[]. The schema of any single instance may be specified via Endpoint's DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model] [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] instance_schema_uri.

Returns:

  • (::Array<::Google::Protobuf::Value>)

    Baseline inputs for this feature.

    If no baseline is specified, Vertex AI chooses the baseline for this feature. If multiple baselines are specified, Vertex AI returns the average attributions across them in Attribution.feature_attributions.

    For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape of each baseline must match the shape of the input tensor. If a scalar is provided, we broadcast to the same shape as the input tensor.

    For custom images, the element of the baselines must be in the same format as the feature's input in the instance[]. The schema of any single instance may be specified via Endpoint's DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model] [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] instance_schema_uri.



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'proto_docs/google/cloud/aiplatform/v1/explanation_metadata.rb', line 160

class InputMetadata
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Domain details of the input feature value. Provides numeric information
  # about the feature, such as its range (min, max). If the feature has been
  # pre-processed, for example with z-scoring, then it provides information
  # about how to recover the original feature. For example, if the input
  # feature is an image and it has been pre-processed to obtain 0-mean and
  # stddev = 1 values, then original_mean, and original_stddev refer to the
  # mean and stddev of the original feature (e.g. image tensor) from which
  # input feature (with mean = 0 and stddev = 1) was obtained.
  # @!attribute [rw] min_value
  #   @return [::Float]
  #     The minimum permissible value for this feature.
  # @!attribute [rw] max_value
  #   @return [::Float]
  #     The maximum permissible value for this feature.
  # @!attribute [rw] original_mean
  #   @return [::Float]
  #     If this input feature has been normalized to a mean value of 0,
  #     the original_mean specifies the mean value of the domain prior to
  #     normalization.
  # @!attribute [rw] original_stddev
  #   @return [::Float]
  #     If this input feature has been normalized to a standard deviation of
  #     1.0, the original_stddev specifies the standard deviation of the domain
  #     prior to normalization.
  class FeatureValueDomain
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Visualization configurations for image explanation.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Type]
  #     Type of the image visualization. Only applicable to
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
  #     OUTLINES shows regions of attribution, while PIXELS shows per-pixel
  #     attribution. Defaults to OUTLINES.
  # @!attribute [rw] polarity
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Polarity]
  #     Whether to only highlight pixels with positive contributions, negative
  #     or both. Defaults to POSITIVE.
  # @!attribute [rw] color_map
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::ColorMap]
  #     The color scheme used for the highlighted areas.
  #
  #     Defaults to PINK_GREEN for
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
  #     which shows positive attributions in green and negative in pink.
  #
  #     Defaults to VIRIDIS for
  #     [XRAI
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
  #     which highlights the most influential regions in yellow and the least
  #     influential in blue.
  # @!attribute [rw] clip_percent_upperbound
  #   @return [::Float]
  #     Excludes attributions above the specified percentile from the
  #     highlighted areas. Using the clip_percent_upperbound and
  #     clip_percent_lowerbound together can be useful for filtering out noise
  #     and making it easier to see areas of strong attribution. Defaults to
  #     99.9.
  # @!attribute [rw] clip_percent_lowerbound
  #   @return [::Float]
  #     Excludes attributions below the specified percentile, from the
  #     highlighted areas. Defaults to 62.
  # @!attribute [rw] overlay_type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::OverlayType]
  #     How the original image is displayed in the visualization.
  #     Adjusting the overlay can help increase visual clarity if the original
  #     image makes it difficult to view the visualization. Defaults to NONE.
  class Visualization
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Type of the image visualization. Only applicable to
    # [Integrated Gradients
    # attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
    module Type
      # Should not be used.
      TYPE_UNSPECIFIED = 0

      # Shows which pixel contributed to the image prediction.
      PIXELS = 1

      # Shows which region contributed to the image prediction by outlining
      # the region.
      OUTLINES = 2
    end

    # Whether to only highlight pixels with positive contributions, negative
    # or both. Defaults to POSITIVE.
    module Polarity
      # Default value. This is the same as POSITIVE.
      POLARITY_UNSPECIFIED = 0

      # Highlights the pixels/outlines that were most influential to the
      # model's prediction.
      POSITIVE = 1

      # Setting polarity to negative highlights areas that does not lead to
      # the models's current prediction.
      NEGATIVE = 2

      # Shows both positive and negative attributions.
      BOTH = 3
    end

    # The color scheme used for highlighting areas.
    module ColorMap
      # Should not be used.
      COLOR_MAP_UNSPECIFIED = 0

      # Positive: green. Negative: pink.
      PINK_GREEN = 1

      # Viridis color map: A perceptually uniform color mapping which is
      # easier to see by those with colorblindness and progresses from yellow
      # to green to blue. Positive: yellow. Negative: blue.
      VIRIDIS = 2

      # Positive: red. Negative: red.
      RED = 3

      # Positive: green. Negative: green.
      GREEN = 4

      # Positive: green. Negative: red.
      RED_GREEN = 6

      # PiYG palette.
      PINK_WHITE_GREEN = 5
    end

    # How the original image is displayed in the visualization.
    module OverlayType
      # Default value. This is the same as NONE.
      OVERLAY_TYPE_UNSPECIFIED = 0

      # No overlay.
      NONE = 1

      # The attributions are shown on top of the original image.
      ORIGINAL = 2

      # The attributions are shown on top of grayscaled version of the
      # original image.
      GRAYSCALE = 3

      # The attributions are used as a mask to reveal predictive parts of
      # the image and hide the un-predictive parts.
      MASK_BLACK = 4
    end
  end

  # Defines how a feature is encoded. Defaults to IDENTITY.
  module Encoding
    # Default value. This is the same as IDENTITY.
    ENCODING_UNSPECIFIED = 0

    # The tensor represents one feature.
    IDENTITY = 1

    # The tensor represents a bag of features where each index maps to
    # a feature.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [27, 6.0, 150]
    # index_feature_mapping = ["age", "height", "weight"]
    # ```
    BAG_OF_FEATURES = 2

    # The tensor represents a bag of features where each index maps to a
    # feature. Zero values in the tensor indicates feature being
    # non-existent.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [2, 0, 5, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    BAG_OF_FEATURES_SPARSE = 3

    # The tensor is a list of binaries representing whether a feature exists
    # or not (1 indicates existence).
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [1, 0, 1, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    INDICATOR = 4

    # The tensor is encoded into a 1-dimensional array represented by an
    # encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [0.1, 0.2, 0.3, 0.4, 0.5]
    # ```
    COMBINED_EMBEDDING = 5

    # Select this encoding when the input tensor is encoded into a
    # 2-dimensional array represented by an encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. The first dimension of the encoded
    # tensor's shape is the same as the input tensor's shape. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [[0.1, 0.2, 0.3, 0.4, 0.5],
    #            [0.2, 0.1, 0.4, 0.3, 0.5],
    #            [0.5, 0.1, 0.3, 0.5, 0.4],
    #            [0.5, 0.3, 0.1, 0.2, 0.4],
    #            [0.4, 0.3, 0.2, 0.5, 0.1]]
    # ```
    CONCAT_EMBEDDING = 6
  end
end

#input_tensor_name::String

Returns Name of the input tensor for this feature. Required and is only applicable to Vertex AI-provided images for Tensorflow.

Returns:

  • (::String)

    Name of the input tensor for this feature. Required and is only applicable to Vertex AI-provided images for Tensorflow.



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'proto_docs/google/cloud/aiplatform/v1/explanation_metadata.rb', line 160

class InputMetadata
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Domain details of the input feature value. Provides numeric information
  # about the feature, such as its range (min, max). If the feature has been
  # pre-processed, for example with z-scoring, then it provides information
  # about how to recover the original feature. For example, if the input
  # feature is an image and it has been pre-processed to obtain 0-mean and
  # stddev = 1 values, then original_mean, and original_stddev refer to the
  # mean and stddev of the original feature (e.g. image tensor) from which
  # input feature (with mean = 0 and stddev = 1) was obtained.
  # @!attribute [rw] min_value
  #   @return [::Float]
  #     The minimum permissible value for this feature.
  # @!attribute [rw] max_value
  #   @return [::Float]
  #     The maximum permissible value for this feature.
  # @!attribute [rw] original_mean
  #   @return [::Float]
  #     If this input feature has been normalized to a mean value of 0,
  #     the original_mean specifies the mean value of the domain prior to
  #     normalization.
  # @!attribute [rw] original_stddev
  #   @return [::Float]
  #     If this input feature has been normalized to a standard deviation of
  #     1.0, the original_stddev specifies the standard deviation of the domain
  #     prior to normalization.
  class FeatureValueDomain
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Visualization configurations for image explanation.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Type]
  #     Type of the image visualization. Only applicable to
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
  #     OUTLINES shows regions of attribution, while PIXELS shows per-pixel
  #     attribution. Defaults to OUTLINES.
  # @!attribute [rw] polarity
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Polarity]
  #     Whether to only highlight pixels with positive contributions, negative
  #     or both. Defaults to POSITIVE.
  # @!attribute [rw] color_map
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::ColorMap]
  #     The color scheme used for the highlighted areas.
  #
  #     Defaults to PINK_GREEN for
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
  #     which shows positive attributions in green and negative in pink.
  #
  #     Defaults to VIRIDIS for
  #     [XRAI
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
  #     which highlights the most influential regions in yellow and the least
  #     influential in blue.
  # @!attribute [rw] clip_percent_upperbound
  #   @return [::Float]
  #     Excludes attributions above the specified percentile from the
  #     highlighted areas. Using the clip_percent_upperbound and
  #     clip_percent_lowerbound together can be useful for filtering out noise
  #     and making it easier to see areas of strong attribution. Defaults to
  #     99.9.
  # @!attribute [rw] clip_percent_lowerbound
  #   @return [::Float]
  #     Excludes attributions below the specified percentile, from the
  #     highlighted areas. Defaults to 62.
  # @!attribute [rw] overlay_type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::OverlayType]
  #     How the original image is displayed in the visualization.
  #     Adjusting the overlay can help increase visual clarity if the original
  #     image makes it difficult to view the visualization. Defaults to NONE.
  class Visualization
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Type of the image visualization. Only applicable to
    # [Integrated Gradients
    # attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
    module Type
      # Should not be used.
      TYPE_UNSPECIFIED = 0

      # Shows which pixel contributed to the image prediction.
      PIXELS = 1

      # Shows which region contributed to the image prediction by outlining
      # the region.
      OUTLINES = 2
    end

    # Whether to only highlight pixels with positive contributions, negative
    # or both. Defaults to POSITIVE.
    module Polarity
      # Default value. This is the same as POSITIVE.
      POLARITY_UNSPECIFIED = 0

      # Highlights the pixels/outlines that were most influential to the
      # model's prediction.
      POSITIVE = 1

      # Setting polarity to negative highlights areas that does not lead to
      # the models's current prediction.
      NEGATIVE = 2

      # Shows both positive and negative attributions.
      BOTH = 3
    end

    # The color scheme used for highlighting areas.
    module ColorMap
      # Should not be used.
      COLOR_MAP_UNSPECIFIED = 0

      # Positive: green. Negative: pink.
      PINK_GREEN = 1

      # Viridis color map: A perceptually uniform color mapping which is
      # easier to see by those with colorblindness and progresses from yellow
      # to green to blue. Positive: yellow. Negative: blue.
      VIRIDIS = 2

      # Positive: red. Negative: red.
      RED = 3

      # Positive: green. Negative: green.
      GREEN = 4

      # Positive: green. Negative: red.
      RED_GREEN = 6

      # PiYG palette.
      PINK_WHITE_GREEN = 5
    end

    # How the original image is displayed in the visualization.
    module OverlayType
      # Default value. This is the same as NONE.
      OVERLAY_TYPE_UNSPECIFIED = 0

      # No overlay.
      NONE = 1

      # The attributions are shown on top of the original image.
      ORIGINAL = 2

      # The attributions are shown on top of grayscaled version of the
      # original image.
      GRAYSCALE = 3

      # The attributions are used as a mask to reveal predictive parts of
      # the image and hide the un-predictive parts.
      MASK_BLACK = 4
    end
  end

  # Defines how a feature is encoded. Defaults to IDENTITY.
  module Encoding
    # Default value. This is the same as IDENTITY.
    ENCODING_UNSPECIFIED = 0

    # The tensor represents one feature.
    IDENTITY = 1

    # The tensor represents a bag of features where each index maps to
    # a feature.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [27, 6.0, 150]
    # index_feature_mapping = ["age", "height", "weight"]
    # ```
    BAG_OF_FEATURES = 2

    # The tensor represents a bag of features where each index maps to a
    # feature. Zero values in the tensor indicates feature being
    # non-existent.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [2, 0, 5, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    BAG_OF_FEATURES_SPARSE = 3

    # The tensor is a list of binaries representing whether a feature exists
    # or not (1 indicates existence).
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [1, 0, 1, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    INDICATOR = 4

    # The tensor is encoded into a 1-dimensional array represented by an
    # encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [0.1, 0.2, 0.3, 0.4, 0.5]
    # ```
    COMBINED_EMBEDDING = 5

    # Select this encoding when the input tensor is encoded into a
    # 2-dimensional array represented by an encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. The first dimension of the encoded
    # tensor's shape is the same as the input tensor's shape. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [[0.1, 0.2, 0.3, 0.4, 0.5],
    #            [0.2, 0.1, 0.4, 0.3, 0.5],
    #            [0.5, 0.1, 0.3, 0.5, 0.4],
    #            [0.5, 0.3, 0.1, 0.2, 0.4],
    #            [0.4, 0.3, 0.2, 0.5, 0.1]]
    # ```
    CONCAT_EMBEDDING = 6
  end
end

#modality::String

Returns Modality of the feature. Valid values are: numeric, image. Defaults to numeric.

Returns:

  • (::String)

    Modality of the feature. Valid values are: numeric, image. Defaults to numeric.



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'proto_docs/google/cloud/aiplatform/v1/explanation_metadata.rb', line 160

class InputMetadata
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Domain details of the input feature value. Provides numeric information
  # about the feature, such as its range (min, max). If the feature has been
  # pre-processed, for example with z-scoring, then it provides information
  # about how to recover the original feature. For example, if the input
  # feature is an image and it has been pre-processed to obtain 0-mean and
  # stddev = 1 values, then original_mean, and original_stddev refer to the
  # mean and stddev of the original feature (e.g. image tensor) from which
  # input feature (with mean = 0 and stddev = 1) was obtained.
  # @!attribute [rw] min_value
  #   @return [::Float]
  #     The minimum permissible value for this feature.
  # @!attribute [rw] max_value
  #   @return [::Float]
  #     The maximum permissible value for this feature.
  # @!attribute [rw] original_mean
  #   @return [::Float]
  #     If this input feature has been normalized to a mean value of 0,
  #     the original_mean specifies the mean value of the domain prior to
  #     normalization.
  # @!attribute [rw] original_stddev
  #   @return [::Float]
  #     If this input feature has been normalized to a standard deviation of
  #     1.0, the original_stddev specifies the standard deviation of the domain
  #     prior to normalization.
  class FeatureValueDomain
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Visualization configurations for image explanation.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Type]
  #     Type of the image visualization. Only applicable to
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
  #     OUTLINES shows regions of attribution, while PIXELS shows per-pixel
  #     attribution. Defaults to OUTLINES.
  # @!attribute [rw] polarity
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Polarity]
  #     Whether to only highlight pixels with positive contributions, negative
  #     or both. Defaults to POSITIVE.
  # @!attribute [rw] color_map
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::ColorMap]
  #     The color scheme used for the highlighted areas.
  #
  #     Defaults to PINK_GREEN for
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
  #     which shows positive attributions in green and negative in pink.
  #
  #     Defaults to VIRIDIS for
  #     [XRAI
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
  #     which highlights the most influential regions in yellow and the least
  #     influential in blue.
  # @!attribute [rw] clip_percent_upperbound
  #   @return [::Float]
  #     Excludes attributions above the specified percentile from the
  #     highlighted areas. Using the clip_percent_upperbound and
  #     clip_percent_lowerbound together can be useful for filtering out noise
  #     and making it easier to see areas of strong attribution. Defaults to
  #     99.9.
  # @!attribute [rw] clip_percent_lowerbound
  #   @return [::Float]
  #     Excludes attributions below the specified percentile, from the
  #     highlighted areas. Defaults to 62.
  # @!attribute [rw] overlay_type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::OverlayType]
  #     How the original image is displayed in the visualization.
  #     Adjusting the overlay can help increase visual clarity if the original
  #     image makes it difficult to view the visualization. Defaults to NONE.
  class Visualization
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Type of the image visualization. Only applicable to
    # [Integrated Gradients
    # attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
    module Type
      # Should not be used.
      TYPE_UNSPECIFIED = 0

      # Shows which pixel contributed to the image prediction.
      PIXELS = 1

      # Shows which region contributed to the image prediction by outlining
      # the region.
      OUTLINES = 2
    end

    # Whether to only highlight pixels with positive contributions, negative
    # or both. Defaults to POSITIVE.
    module Polarity
      # Default value. This is the same as POSITIVE.
      POLARITY_UNSPECIFIED = 0

      # Highlights the pixels/outlines that were most influential to the
      # model's prediction.
      POSITIVE = 1

      # Setting polarity to negative highlights areas that does not lead to
      # the models's current prediction.
      NEGATIVE = 2

      # Shows both positive and negative attributions.
      BOTH = 3
    end

    # The color scheme used for highlighting areas.
    module ColorMap
      # Should not be used.
      COLOR_MAP_UNSPECIFIED = 0

      # Positive: green. Negative: pink.
      PINK_GREEN = 1

      # Viridis color map: A perceptually uniform color mapping which is
      # easier to see by those with colorblindness and progresses from yellow
      # to green to blue. Positive: yellow. Negative: blue.
      VIRIDIS = 2

      # Positive: red. Negative: red.
      RED = 3

      # Positive: green. Negative: green.
      GREEN = 4

      # Positive: green. Negative: red.
      RED_GREEN = 6

      # PiYG palette.
      PINK_WHITE_GREEN = 5
    end

    # How the original image is displayed in the visualization.
    module OverlayType
      # Default value. This is the same as NONE.
      OVERLAY_TYPE_UNSPECIFIED = 0

      # No overlay.
      NONE = 1

      # The attributions are shown on top of the original image.
      ORIGINAL = 2

      # The attributions are shown on top of grayscaled version of the
      # original image.
      GRAYSCALE = 3

      # The attributions are used as a mask to reveal predictive parts of
      # the image and hide the un-predictive parts.
      MASK_BLACK = 4
    end
  end

  # Defines how a feature is encoded. Defaults to IDENTITY.
  module Encoding
    # Default value. This is the same as IDENTITY.
    ENCODING_UNSPECIFIED = 0

    # The tensor represents one feature.
    IDENTITY = 1

    # The tensor represents a bag of features where each index maps to
    # a feature.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [27, 6.0, 150]
    # index_feature_mapping = ["age", "height", "weight"]
    # ```
    BAG_OF_FEATURES = 2

    # The tensor represents a bag of features where each index maps to a
    # feature. Zero values in the tensor indicates feature being
    # non-existent.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [2, 0, 5, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    BAG_OF_FEATURES_SPARSE = 3

    # The tensor is a list of binaries representing whether a feature exists
    # or not (1 indicates existence).
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [1, 0, 1, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    INDICATOR = 4

    # The tensor is encoded into a 1-dimensional array represented by an
    # encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [0.1, 0.2, 0.3, 0.4, 0.5]
    # ```
    COMBINED_EMBEDDING = 5

    # Select this encoding when the input tensor is encoded into a
    # 2-dimensional array represented by an encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. The first dimension of the encoded
    # tensor's shape is the same as the input tensor's shape. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [[0.1, 0.2, 0.3, 0.4, 0.5],
    #            [0.2, 0.1, 0.4, 0.3, 0.5],
    #            [0.5, 0.1, 0.3, 0.5, 0.4],
    #            [0.5, 0.3, 0.1, 0.2, 0.4],
    #            [0.4, 0.3, 0.2, 0.5, 0.1]]
    # ```
    CONCAT_EMBEDDING = 6
  end
end

#visualization::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization

Returns Visualization configurations for image explanation.

Returns:



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'proto_docs/google/cloud/aiplatform/v1/explanation_metadata.rb', line 160

class InputMetadata
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Domain details of the input feature value. Provides numeric information
  # about the feature, such as its range (min, max). If the feature has been
  # pre-processed, for example with z-scoring, then it provides information
  # about how to recover the original feature. For example, if the input
  # feature is an image and it has been pre-processed to obtain 0-mean and
  # stddev = 1 values, then original_mean, and original_stddev refer to the
  # mean and stddev of the original feature (e.g. image tensor) from which
  # input feature (with mean = 0 and stddev = 1) was obtained.
  # @!attribute [rw] min_value
  #   @return [::Float]
  #     The minimum permissible value for this feature.
  # @!attribute [rw] max_value
  #   @return [::Float]
  #     The maximum permissible value for this feature.
  # @!attribute [rw] original_mean
  #   @return [::Float]
  #     If this input feature has been normalized to a mean value of 0,
  #     the original_mean specifies the mean value of the domain prior to
  #     normalization.
  # @!attribute [rw] original_stddev
  #   @return [::Float]
  #     If this input feature has been normalized to a standard deviation of
  #     1.0, the original_stddev specifies the standard deviation of the domain
  #     prior to normalization.
  class FeatureValueDomain
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Visualization configurations for image explanation.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Type]
  #     Type of the image visualization. Only applicable to
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
  #     OUTLINES shows regions of attribution, while PIXELS shows per-pixel
  #     attribution. Defaults to OUTLINES.
  # @!attribute [rw] polarity
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::Polarity]
  #     Whether to only highlight pixels with positive contributions, negative
  #     or both. Defaults to POSITIVE.
  # @!attribute [rw] color_map
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::ColorMap]
  #     The color scheme used for the highlighted areas.
  #
  #     Defaults to PINK_GREEN for
  #     [Integrated Gradients
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
  #     which shows positive attributions in green and negative in pink.
  #
  #     Defaults to VIRIDIS for
  #     [XRAI
  #     attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
  #     which highlights the most influential regions in yellow and the least
  #     influential in blue.
  # @!attribute [rw] clip_percent_upperbound
  #   @return [::Float]
  #     Excludes attributions above the specified percentile from the
  #     highlighted areas. Using the clip_percent_upperbound and
  #     clip_percent_lowerbound together can be useful for filtering out noise
  #     and making it easier to see areas of strong attribution. Defaults to
  #     99.9.
  # @!attribute [rw] clip_percent_lowerbound
  #   @return [::Float]
  #     Excludes attributions below the specified percentile, from the
  #     highlighted areas. Defaults to 62.
  # @!attribute [rw] overlay_type
  #   @return [::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata::Visualization::OverlayType]
  #     How the original image is displayed in the visualization.
  #     Adjusting the overlay can help increase visual clarity if the original
  #     image makes it difficult to view the visualization. Defaults to NONE.
  class Visualization
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Type of the image visualization. Only applicable to
    # [Integrated Gradients
    # attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
    module Type
      # Should not be used.
      TYPE_UNSPECIFIED = 0

      # Shows which pixel contributed to the image prediction.
      PIXELS = 1

      # Shows which region contributed to the image prediction by outlining
      # the region.
      OUTLINES = 2
    end

    # Whether to only highlight pixels with positive contributions, negative
    # or both. Defaults to POSITIVE.
    module Polarity
      # Default value. This is the same as POSITIVE.
      POLARITY_UNSPECIFIED = 0

      # Highlights the pixels/outlines that were most influential to the
      # model's prediction.
      POSITIVE = 1

      # Setting polarity to negative highlights areas that does not lead to
      # the models's current prediction.
      NEGATIVE = 2

      # Shows both positive and negative attributions.
      BOTH = 3
    end

    # The color scheme used for highlighting areas.
    module ColorMap
      # Should not be used.
      COLOR_MAP_UNSPECIFIED = 0

      # Positive: green. Negative: pink.
      PINK_GREEN = 1

      # Viridis color map: A perceptually uniform color mapping which is
      # easier to see by those with colorblindness and progresses from yellow
      # to green to blue. Positive: yellow. Negative: blue.
      VIRIDIS = 2

      # Positive: red. Negative: red.
      RED = 3

      # Positive: green. Negative: green.
      GREEN = 4

      # Positive: green. Negative: red.
      RED_GREEN = 6

      # PiYG palette.
      PINK_WHITE_GREEN = 5
    end

    # How the original image is displayed in the visualization.
    module OverlayType
      # Default value. This is the same as NONE.
      OVERLAY_TYPE_UNSPECIFIED = 0

      # No overlay.
      NONE = 1

      # The attributions are shown on top of the original image.
      ORIGINAL = 2

      # The attributions are shown on top of grayscaled version of the
      # original image.
      GRAYSCALE = 3

      # The attributions are used as a mask to reveal predictive parts of
      # the image and hide the un-predictive parts.
      MASK_BLACK = 4
    end
  end

  # Defines how a feature is encoded. Defaults to IDENTITY.
  module Encoding
    # Default value. This is the same as IDENTITY.
    ENCODING_UNSPECIFIED = 0

    # The tensor represents one feature.
    IDENTITY = 1

    # The tensor represents a bag of features where each index maps to
    # a feature.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [27, 6.0, 150]
    # index_feature_mapping = ["age", "height", "weight"]
    # ```
    BAG_OF_FEATURES = 2

    # The tensor represents a bag of features where each index maps to a
    # feature. Zero values in the tensor indicates feature being
    # non-existent.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [2, 0, 5, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    BAG_OF_FEATURES_SPARSE = 3

    # The tensor is a list of binaries representing whether a feature exists
    # or not (1 indicates existence).
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#index_feature_mapping InputMetadata.index_feature_mapping}
    # must be provided for this encoding. For example:
    # ```
    # input = [1, 0, 1, 0, 1]
    # index_feature_mapping = ["a", "b", "c", "d", "e"]
    # ```
    INDICATOR = 4

    # The tensor is encoded into a 1-dimensional array represented by an
    # encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [0.1, 0.2, 0.3, 0.4, 0.5]
    # ```
    COMBINED_EMBEDDING = 5

    # Select this encoding when the input tensor is encoded into a
    # 2-dimensional array represented by an encoded tensor.
    # {::Google::Cloud::AIPlatform::V1::ExplanationMetadata::InputMetadata#encoded_tensor_name InputMetadata.encoded_tensor_name}
    # must be provided for this encoding. The first dimension of the encoded
    # tensor's shape is the same as the input tensor's shape. For example:
    # ```
    # input = ["This", "is", "a", "test", "."]
    # encoded = [[0.1, 0.2, 0.3, 0.4, 0.5],
    #            [0.2, 0.1, 0.4, 0.3, 0.5],
    #            [0.5, 0.1, 0.3, 0.5, 0.4],
    #            [0.5, 0.3, 0.1, 0.2, 0.4],
    #            [0.4, 0.3, 0.2, 0.5, 0.1]]
    # ```
    CONCAT_EMBEDDING = 6
  end
end