Class EuclideanMeasure
- java.lang.Object
-
- org.aksw.limes.core.measures.measure.AMeasure
-
- org.aksw.limes.core.measures.measure.space.ASpaceMeasure
-
- org.aksw.limes.core.measures.measure.space.EuclideanMeasure
-
- All Implemented Interfaces:
IMeasure,ISpaceMeasure
public class EuclideanMeasure extends ASpaceMeasure
Implements a similarity measure based on the euclidean distance. A Minkowski measure with p=1.- Author:
- Axel-C. Ngonga Ngomo (ngonga@informatik.uni-leipzig.de)
-
-
Field Summary
-
Fields inherited from class org.aksw.limes.core.measures.measure.space.ASpaceMeasure
D2R, radius
-
-
Constructor Summary
Constructors Constructor Description EuclideanMeasure()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()Returns name of a measure.doublegetRuntimeApproximation(double mappingSize)Returns the runtime approximation of a measure.doublegetSimilarity(Object object1, Object object2)Returns the similarity between two objects.doublegetSimilarity(Instance instance1, Instance instance2, String properties1, String properties2)Returns the similarity between two instances, given their corresponding properties.doublegetThreshold(int dimension, double simThreshold)Return the threshold for a dimension.StringgetType()Returns type of a measure.-
Methods inherited from class org.aksw.limes.core.measures.measure.space.ASpaceMeasure
setDimension
-
-
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:IMeasureReturns name of a measure.- Returns:
- Measure name as a string
-
getThreshold
public double getThreshold(int dimension, double simThreshold)Return the threshold for a dimension. This is used for blocking. Given that the Euclidean metric does not squeeze space as the Mahalanobis does, we simply return the simThreshold- Parameters:
dimension-simThreshold-
-
getRuntimeApproximation
public double getRuntimeApproximation(double mappingSize)
Description copied from interface:IMeasureReturns the runtime approximation of a measure.- Parameters:
mappingSize- , the mapping size returned by the measure- Returns:
- The runtime of the measure
-
getType
public String getType()
Description copied from interface:IMeasureReturns type of a measure.- Returns:
- The runtime of the measure
-
getSimilarity
public double getSimilarity(Object object1, Object object2)
Description copied from interface:IMeasureReturns the similarity between two objects.- Parameters:
object1- , the source objectobject2- , the target object- Returns:
- The similarity of the objects
-
getSimilarity
public double getSimilarity(Instance instance1, Instance instance2, String properties1, String properties2)
Description copied from interface:IMeasureReturns the similarity between two instances, given their corresponding properties.- Parameters:
instance1- , the source instanceinstance2- , the target instanceproperties1- , the source propertyproperties2- , the target property- Returns:
- The similarity of the instances
-
-