Package com.google.cloud.aiplatform.v1
Enum FeatureView.IndexConfig.DistanceMeasureType
java.lang.Object
java.lang.Enum<FeatureView.IndexConfig.DistanceMeasureType>
com.google.cloud.aiplatform.v1.FeatureView.IndexConfig.DistanceMeasureType
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite,com.google.protobuf.ProtocolMessageEnum,Serializable,Comparable<FeatureView.IndexConfig.DistanceMeasureType>
- Enclosing class:
- FeatureView.IndexConfig
public static enum FeatureView.IndexConfig.DistanceMeasureType
extends Enum<FeatureView.IndexConfig.DistanceMeasureType>
implements com.google.protobuf.ProtocolMessageEnum
The distance measure used in nearest neighbor search.Protobuf enum
google.cloud.aiplatform.v1.FeatureView.IndexConfig.DistanceMeasureType-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCosine Distance.Should not be set.Dot Product Distance.Euclidean (L_2) Distance. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intCosine Distance.static final intShould not be set.static final intDot Product Distance.static final intEuclidean (L_2) Distance. -
Method Summary
Modifier and TypeMethodDescriptionforNumber(int value) static com.google.protobuf.Descriptors.EnumDescriptorfinal com.google.protobuf.Descriptors.EnumDescriptorfinal intfinal com.google.protobuf.Descriptors.EnumValueDescriptorstatic com.google.protobuf.Internal.EnumLiteMap<FeatureView.IndexConfig.DistanceMeasureType>valueOf(int value) Deprecated.valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this type with the specified name.Returns the enum constant of this type with the specified name.values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
DISTANCE_MEASURE_TYPE_UNSPECIFIED
Should not be set.
DISTANCE_MEASURE_TYPE_UNSPECIFIED = 0; -
SQUARED_L2_DISTANCE
Euclidean (L_2) Distance.
SQUARED_L2_DISTANCE = 1; -
COSINE_DISTANCE
Cosine Distance. Defined as 1 - cosine similarity. We strongly suggest using DOT_PRODUCT_DISTANCE + UNIT_L2_NORM instead of COSINE distance. Our algorithms have been more optimized for DOT_PRODUCT distance which, when combined with UNIT_L2_NORM, is mathematically equivalent to COSINE distance and results in the same ranking.
COSINE_DISTANCE = 2; -
DOT_PRODUCT_DISTANCE
Dot Product Distance. Defined as a negative of the dot product.
DOT_PRODUCT_DISTANCE = 3; -
UNRECOGNIZED
-
-
Field Details
-
DISTANCE_MEASURE_TYPE_UNSPECIFIED_VALUE
public static final int DISTANCE_MEASURE_TYPE_UNSPECIFIED_VALUEShould not be set.
DISTANCE_MEASURE_TYPE_UNSPECIFIED = 0;- See Also:
-
SQUARED_L2_DISTANCE_VALUE
public static final int SQUARED_L2_DISTANCE_VALUEEuclidean (L_2) Distance.
SQUARED_L2_DISTANCE = 1;- See Also:
-
COSINE_DISTANCE_VALUE
public static final int COSINE_DISTANCE_VALUECosine Distance. Defined as 1 - cosine similarity. We strongly suggest using DOT_PRODUCT_DISTANCE + UNIT_L2_NORM instead of COSINE distance. Our algorithms have been more optimized for DOT_PRODUCT distance which, when combined with UNIT_L2_NORM, is mathematically equivalent to COSINE distance and results in the same ranking.
COSINE_DISTANCE = 2;- See Also:
-
DOT_PRODUCT_DISTANCE_VALUE
public static final int DOT_PRODUCT_DISTANCE_VALUEDot Product Distance. Defined as a negative of the dot product.
DOT_PRODUCT_DISTANCE = 3;- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getNumber
public final int getNumber()- Specified by:
getNumberin interfacecom.google.protobuf.Internal.EnumLite- Specified by:
getNumberin interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
Deprecated.Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
value- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
forNumber
- Parameters:
value- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
public static com.google.protobuf.Internal.EnumLiteMap<FeatureView.IndexConfig.DistanceMeasureType> internalGetValueMap() -
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()- Specified by:
getValueDescriptorin interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() -
valueOf
public static FeatureView.IndexConfig.DistanceMeasureType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
desc- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-