medusa.georgios.enhanced_mcl
Interface DistanceMeasure
-
- All Superinterfaces:
- java.io.Serializable
- All Known Implementing Classes:
- AbstractSimilarity
public interface DistanceMeasure extends java.io.SerializableA distance measure is an algorithm to calculate the distance, similarity or correlation between two instances. There are three types of distance measures: distance, similarity and correlation measures. Some distance measures are normalized, i.e. in the interval [0,1], but this is not required by the interface.- See Also:
net.sf.javaml.distance.AbstractDistance,net.sf.javaml.distance.AbstractSimilarity,net.sf.javaml.distance.AbstractCorrelation
-
-
Method Summary
All Methods Instance Methods Abstract 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.doublemeasure(Instance x, Instance y)Calculates the distance between two instances.
-
-
-
Method Detail
-
measure
double measure(Instance x, Instance y)
Calculates the distance between two instances.- Parameters:
i- the first instancej- the second instance- Returns:
- the distance between the two instances
-
compare
boolean compare(double x, double y)Returns 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.- 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