Enum SetSimilarity
java.lang.Object
java.lang.Enum<SetSimilarity>
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.util.SetSimilarity
- All Implemented Interfaces:
Serializable
,Comparable<SetSimilarity>
,java.lang.constant.Constable
Different methods for set comparison like Overlap coefficient, Jaccard or Sørensen–Dice_coefficient (DSC).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionReturns absolute number of the intersection.Returns 1 if intersection is not empty and 0 if it is empty.Sørensen-Dice coefficient (DSC): twice the number of intersection set divided by the sum of the number of elements in each set.Jaccard index: intersection divided by the size of the union.The intersection divided by the larger of the size of the two sets.The intersection divided by the smaller of the size of the two sets. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
compute
(int sizeIntersection, int sizeX, int sizeY) Compute the set comparison.<E> double
Compute the set comparison.static SetSimilarity
Returns the enum constant of this type with the specified name.static SetSimilarity[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
BOOLEAN
Returns 1 if intersection is not empty and 0 if it is empty. -
ABSOLUTE
Returns absolute number of the intersection. Not a real comparison. -
MIN
The intersection divided by the smaller of the size of the two sets. Also known as Overlap coefficient. -
MAX
The intersection divided by the larger of the size of the two sets. -
JACCARD
Jaccard index: intersection divided by the size of the union. -
DICE
Sørensen-Dice coefficient (DSC): twice the number of intersection set divided by the sum of the number of elements in each set.
-
-
Constructor Details
-
SetSimilarity
private SetSimilarity()
-
-
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
-
compute
Compute the set comparison.- Type Parameters:
E
- Generic type of the sets- Parameters:
x
- set xy
- set y- Returns:
- set comparison value
-
compute
public double compute(int sizeIntersection, int sizeX, int sizeY) Compute the set comparison.- Parameters:
sizeIntersection
- the number of intersection of the two setssizeX
- size of set xsizeY
- size of set y- Returns:
- set comparison value
-