@Beta @PublicAPI public enum BinaryMetrics extends Enum<BinaryMetrics> implements BinaryVectorComparator
Please note that this enum is marked with @Beta annotation, so it can be subject of incompatible changes or removal in later releases.
BinaryVectorComparator.Util
Enum Constant and Description |
---|
BINARY_COMMONPART
Commonly set bits.
|
BINARY_COMMONPART_NORMALIZED
Common set bit ratio.
|
BINARY_DICE
Dice's similarity measure.
|
BINARY_EUCLIDEAN
Euclidean distance.
|
BINARY_EUCLIDEAN_NORMALIZED
Normalized Euclidean distance.
|
BINARY_TANIMOTO
Tanimoto coefficient.
|
MANHATTAN
Manhattan distance.
|
MANHATTAN_NORMALIZED
Normalized Manhattan metric.
|
PETKE
Petke or Braun-Blanquet similarity.
|
SIMPSON
Simpson similarity.
|
Modifier and Type | Method and Description |
---|---|
static BinaryMetrics |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BinaryMetrics[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
calculateBinaryVectorDissimilarity, calculateBinaryVectorSimilarity, getLowerBoundForBinaryVectors, getUnguardedDissimilarityCalculator, getUpperBoundForBinaryVectors
isDissimilarityZeroIFFEquals, isMetricSpace, isNonNegative, isSymmetric, isTriangeInequalityHolds
public static final BinaryMetrics MANHATTAN
Binary positions with different values.
public static final BinaryMetrics MANHATTAN_NORMALIZED
The similarity/dissimilarity values range of the MANHATTAN
normalized to the unit
interval (0.0 - 1.0, including bounds).
public static final BinaryMetrics BINARY_EUCLIDEAN
Square root of the sums of the difference squares.
public static final BinaryMetrics BINARY_EUCLIDEAN_NORMALIZED
The similarity/dissimilarity values range of the BINARY_EUCLIDEAN
normalized to the unit
interval (0.0 - 1.0, including bounds).
public static final BinaryMetrics BINARY_COMMONPART
The count of bit positions which contains set bits is considered as the similarity value. Please note that this comparison yields non-zero and non-maximal dissimilarity for equal, non-empty descriptors.
public static final BinaryMetrics BINARY_COMMONPART_NORMALIZED
The similarity/dissimilarity values range of the BINARY_COMMONPART
normalized to the unit
interval (0.0 - 1.0, including bounds).
public static final BinaryMetrics BINARY_DICE
Similarity coefficient is twice the common part divided by the sum of components.
When comparing all-zero binary fingerprint we return minimal similarity/maximal dissimilarity.
public static final BinaryMetrics BINARY_TANIMOTO
When comparing all-zero binary fingerprint we return minimal similarity/maximal dissimilarity in the current implementation.
Please note that the triangle inequality holds for the Tanimoto distance; see Lipkus, AlanH.: A proof of the triangle inequality for the Tanimoto distance (Journal of Mathematical Chemistry, 1999, volume 26, pages 263-265)
public static final BinaryMetrics PETKE
Similarity is calculated by |Q & T| / max(|Q|, |T|)
.
When comparing all-zero binary fingerprint we return minimal similarity/maximal dissimilarity in the current implementation.
public static final BinaryMetrics SIMPSON
Similarity is calculated by |Q & T| / min(|Q|, |T|)
.
When comparing all-zero binary fingerprint we return minimal similarity/maximal dissimilarity in the current implementation.
public static BinaryMetrics[] values()
for (BinaryMetrics c : BinaryMetrics.values()) System.out.println(c);
public static BinaryMetrics valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null