medusa.georgios.enhanced_mcl
Class AbstractSimilarity
- java.lang.Object
-
- medusa.georgios.enhanced_mcl.AbstractSimilarity
-
- All Implemented Interfaces:
- java.io.Serializable, DistanceMeasure
public abstract class AbstractSimilarity extends java.lang.Object implements DistanceMeasure
Abstract super class for all similarity measures. A similarity measure quantifies the distance between two instances. Low values denote more distant instances.- See Also:
net.sf.javaml.distance.DistanceMeasure,net.sf.javaml.distance.AbstractDistance,{@jmlSource}, Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description AbstractSimilarity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleancompare(double x, double y)Returns whether the first distance, similarity or correlation is better than the second distance, similarity or correlation.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface medusa.georgios.enhanced_mcl.DistanceMeasure
measure
-
-
-
-
Method Detail
-
compare
public boolean compare(double x, double y)Description copied from interface:DistanceMeasureReturns whether the first distance, similarity or correlation is better than the second distance, similarity or correlation. Both values should bee calculated using the same measure. For similarity measures the higher the similarity the better the measure, for distance measures it is the lower the better and for correlation measure the absolute value must be higher.- Specified by:
comparein interfaceDistanceMeasure- Parameters:
x- the first distance, similarity or correlationy- the second distance, similarity or correlation- Returns:
- true if the first distance is better than the second, false in other cases.
-
-
DMelt 3.0 © DataMelt by jWork.ORG