Package elki.similarity
Class Kulczynski2Similarity
- java.lang.Object
-
- elki.similarity.AbstractVectorSimilarity
-
- elki.similarity.Kulczynski2Similarity
-
- All Implemented Interfaces:
PrimitiveSimilarity<NumberVector>
,Similarity<NumberVector>
@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") public class Kulczynski2Similarity extends AbstractVectorSimilarity
Kulczynski similarity 2.\[ s_\text{Kulczynski-2}(\vec{x},\vec{y} := \tfrac{n}{2}\left(\tfrac{1}{\bar{x}}+\tfrac{1}{\bar{y}}\right) \sum\nolimits_i\min\{x_i,y_i\} \]
Reference:
M.-M. Deza and E. Deza
Dictionary of distancesTODO: add an optimized version for binary data.
- Since:
- 0.6.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Kulczynski2Similarity.Par
Parameterization class.
-
Field Summary
Fields Modifier and Type Field Description static Kulczynski2Similarity
STATIC_CONTINUOUS
Static instance.
-
Constructor Summary
Constructors Constructor Description Kulczynski2Similarity()
Deprecated.UseSTATIC_CONTINUOUS
instance instead.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
similarity(NumberVector v1, NumberVector v2)
Computes the similarity between two given DatabaseObjects according to this similarity function.-
Methods inherited from class elki.similarity.AbstractVectorSimilarity
getInputTypeRestriction
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.similarity.PrimitiveSimilarity
instantiate
-
Methods inherited from interface elki.similarity.Similarity
isSymmetric
-
-
-
-
Field Detail
-
STATIC_CONTINUOUS
public static final Kulczynski2Similarity STATIC_CONTINUOUS
Static instance.
-
-
Constructor Detail
-
Kulczynski2Similarity
@Deprecated public Kulczynski2Similarity()
Deprecated.UseSTATIC_CONTINUOUS
instance instead.Constructor.
-
-
Method Detail
-
similarity
public double similarity(NumberVector v1, NumberVector v2)
Description copied from interface:PrimitiveSimilarity
Computes the similarity between two given DatabaseObjects according to this similarity function.- Parameters:
v1
- first DatabaseObjectv2
- second DatabaseObject- Returns:
- the similarity between two given DatabaseObjects according to this similarity function
-
-