@Reference(authors="M.-M. Deza, E. Deza", title="Dictionary of distances", booktitle="Dictionary of distances", url="https://doi.org/10.1007/978-3-642-00234-2", bibkey="doi:10.1007/978-3-642-00234-2") @Alias(value="de.lmu.ifi.dbs.elki.distance.distancefunction.Kulczynski1DistanceFunction") public class Kulczynski1SimilarityFunction extends AbstractNumberVectorDistanceFunction implements SpatialPrimitiveDistanceFunction<NumberVector>, PrimitiveSimilarityFunction<NumberVector>
\[ s_\text{Kulczynski-1}(\vec{x},\vec{y}):= \tfrac{\sum\nolimits_i\min\{x_i,y_i\}}{\sum\nolimits_i |x_i-y_i|} \] or in distance form: \[ d_\text{Kulczynski-1}(\vec{x},\vec{y}):= \tfrac{\sum\nolimits_i |x_i-y_i|}{\sum\nolimits_i\min\{x_i,y_i\}} \]
Reference:
M.-M. Deza and E. Deza
Dictionary of distances
Modifier and Type | Class and Description |
---|---|
static class |
Kulczynski1SimilarityFunction.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
static Kulczynski1SimilarityFunction |
STATIC
Static instance.
|
Constructor and Description |
---|
Kulczynski1SimilarityFunction()
Deprecated.
Use
STATIC instance instead. |
Modifier and Type | Method and Description |
---|---|
double |
distance(NumberVector v1,
NumberVector v2)
Computes the distance between two given DatabaseObjects according to this
distance function.
|
<T extends NumberVector> |
instantiate(Relation<T> database)
Instantiate with a database to get the actual distance query.
|
boolean |
isSymmetric()
Is this function symmetric?
|
double |
minDist(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this distance
function.
|
double |
similarity(NumberVector v1,
NumberVector v2)
Computes the similarity between two given DatabaseObjects according to this
similarity function.
|
dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, getInputTypeRestriction
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInputTypeRestriction
isMetric, isSquared
getInputTypeRestriction
public static final Kulczynski1SimilarityFunction STATIC
@Deprecated public Kulczynski1SimilarityFunction()
STATIC
instance instead.public double distance(NumberVector v1, NumberVector v2)
PrimitiveDistanceFunction
distance
in interface NumberVectorDistanceFunction<NumberVector>
distance
in interface PrimitiveDistanceFunction<NumberVector>
v1
- first DatabaseObjectv2
- second DatabaseObjectpublic double minDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDistanceFunction
minDist
in interface SpatialPrimitiveDistanceFunction<NumberVector>
mbr1
- the first MBR objectmbr2
- the second MBR objectpublic double similarity(NumberVector v1, NumberVector v2)
PrimitiveSimilarityFunction
similarity
in interface PrimitiveSimilarityFunction<NumberVector>
v1
- first DatabaseObjectv2
- second DatabaseObjectpublic boolean isSymmetric()
DistanceFunction
isSymmetric
in interface DistanceFunction<NumberVector>
isSymmetric
in interface SimilarityFunction<NumberVector>
true
when symmetricpublic <T extends NumberVector> SpatialPrimitiveDistanceSimilarityQuery<T> instantiate(Relation<T> database)
DistanceFunction
instantiate
in interface DistanceFunction<NumberVector>
instantiate
in interface PrimitiveDistanceFunction<NumberVector>
instantiate
in interface SpatialPrimitiveDistanceFunction<NumberVector>
instantiate
in interface PrimitiveSimilarityFunction<NumberVector>
instantiate
in interface SimilarityFunction<NumberVector>
database
- The representation to useCopyright © 2019 ELKI Development Team. License information.