Enum ExplanationMetadata.InputMetadata.Encoding (0.8.0)

publicenumExplanationMetadata.InputMetadata.EncodingextendsEnum<ExplanationMetadata.InputMetadata.Encoding>implementsProtocolMessageEnum

Defines how a feature is encoded. Defaults to IDENTITY.

Protobuf enum google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Encoding

Implements

ProtocolMessageEnum

Static Fields

Name Description
BAG_OF_FEATURES

The tensor represents a bag of features where each index maps to a feature. InputMetadata.index_feature_mapping must be provided for this encoding. For example: <code><code> input = [27, 6.0, 150] index_feature_mapping = ["age", "height", "weight"] </code></code>

BAG_OF_FEATURES = 2;

BAG_OF_FEATURES_SPARSE

The tensor represents a bag of features where each index maps to a feature. Zero values in the tensor indicates feature being non-existent. InputMetadata.index_feature_mapping must be provided for this encoding. For example: <code><code> input = [2, 0, 5, 0, 1] index_feature_mapping = ["a", "b", "c", "d", "e"] </code></code>

BAG_OF_FEATURES_SPARSE = 3;

BAG_OF_FEATURES_SPARSE_VALUE

The tensor represents a bag of features where each index maps to a feature. Zero values in the tensor indicates feature being non-existent. InputMetadata.index_feature_mapping must be provided for this encoding. For example: <code><code> input = [2, 0, 5, 0, 1] index_feature_mapping = ["a", "b", "c", "d", "e"] </code></code>

BAG_OF_FEATURES_SPARSE = 3;

BAG_OF_FEATURES_VALUE

The tensor represents a bag of features where each index maps to a feature. InputMetadata.index_feature_mapping must be provided for this encoding. For example: <code><code> input = [27, 6.0, 150] index_feature_mapping = ["age", "height", "weight"] </code></code>

BAG_OF_FEATURES = 2;

COMBINED_EMBEDDING

The tensor is encoded into a 1-dimensional array represented by an encoded tensor. InputMetadata.encoded_tensor_name must be provided for this encoding. For example: <code><code> input = ["This", "is", "a", "test", "."] encoded = [0.1, 0.2, 0.3, 0.4, 0.5] </code></code>

COMBINED_EMBEDDING = 5;

COMBINED_EMBEDDING_VALUE

The tensor is encoded into a 1-dimensional array represented by an encoded tensor. InputMetadata.encoded_tensor_name must be provided for this encoding. For example: <code><code> input = ["This", "is", "a", "test", "."] encoded = [0.1, 0.2, 0.3, 0.4, 0.5] </code></code>

COMBINED_EMBEDDING = 5;

CONCAT_EMBEDDING

Select this encoding when the input tensor is encoded into a 2-dimensional array represented by an encoded tensor. 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: <code><code> 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]] </code></code>

CONCAT_EMBEDDING = 6;

CONCAT_EMBEDDING_VALUE

Select this encoding when the input tensor is encoded into a 2-dimensional array represented by an encoded tensor. 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: <code><code> 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]] </code></code>

CONCAT_EMBEDDING = 6;

ENCODING_UNSPECIFIED

Default value. This is the same as IDENTITY.

ENCODING_UNSPECIFIED = 0;

ENCODING_UNSPECIFIED_VALUE

Default value. This is the same as IDENTITY.

ENCODING_UNSPECIFIED = 0;

IDENTITY

The tensor represents one feature.

IDENTITY = 1;

IDENTITY_VALUE

The tensor represents one feature.

IDENTITY = 1;

INDICATOR

The tensor is a list of binaries representing whether a feature exists or not (1 indicates existence). InputMetadata.index_feature_mapping must be provided for this encoding. For example: <code><code> input = [1, 0, 1, 0, 1] index_feature_mapping = ["a", "b", "c", "d", "e"] </code></code>

INDICATOR = 4;

INDICATOR_VALUE

The tensor is a list of binaries representing whether a feature exists or not (1 indicates existence). InputMetadata.index_feature_mapping must be provided for this encoding. For example: <code><code> input = [1, 0, 1, 0, 1] index_feature_mapping = ["a", "b", "c", "d", "e"] </code></code>

INDICATOR = 4;

UNRECOGNIZED

Static Methods

Name Description
forNumber(int value)
getDescriptor()
internalGetValueMap()
valueOf(Descriptors.EnumValueDescriptor desc)
valueOf(int value)

Deprecated. Use #forNumber(int) instead.

valueOf(String name)
values()

Methods

Name Description
getDescriptorForType()
getNumber()
getValueDescriptor()

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.