Class SingleLinkage
- java.lang.Object
-
- elki.clustering.hierarchical.linkage.SingleLinkage
-
- All Implemented Interfaces:
Linkage
@Reference(authors="K. Florek, J. \u0141ukaszewicz, J. Perkal, H. Steinhaus, S. Zubrzycki", title="Sur la liaison et la division des points d\'un ensemble fini", booktitle="Colloquium Mathematicae 2(3-4)", bibkey="journals/misc/FlorekLPSZ51") @Alias({"single-link","single","slink","nearest","nearest-neighbor"}) @Priority(100) public class SingleLinkage extends java.lang.Object implements Linkage
Single-linkage ("minimum") clustering method.The distance of two clusters is simply the minimum of all pairwise distances between the two clusters.
The distance of two clusters is defined as: \[d_{\min}(A,B):=\min_{a\in A}\min_{b\in B} d(a,b)\]
This can be computed recursively using: \[d_{\min}(A\cup B,C) = \min(d(A,C), d(B,C))\]
Note that with similarity functions, one would need to use the maximum instead to get the same effect.
Reference:
K. Florek, J. Ćukaszewicz, J. Perkal, H. Steinhaus, S. Zubrzycki
Sur la liaison et la division des points d'un ensemble fini
Colloquium Mathematicae 2(3-4)- Since:
- 0.6.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SingleLinkage.Par
Class parameterizer.
-
Field Summary
Fields Modifier and Type Field Description static SingleLinkage
STATIC
Static instance of class.
-
Constructor Summary
Constructors Constructor Description SingleLinkage()
Deprecated.use the static instanceSTATIC
instead.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
combine(int sizex, double dx, int sizey, double dy, int sizej, double dxy)
Compute combined linkage for two clusters.
-
-
-
Field Detail
-
STATIC
public static final SingleLinkage STATIC
Static instance of class.
-
-
Constructor Detail
-
SingleLinkage
@Deprecated public SingleLinkage()
Deprecated.use the static instanceSTATIC
instead.Constructor.
-
-
Method Detail
-
combine
public double combine(int sizex, double dx, int sizey, double dy, int sizej, double dxy)
Description copied from interface:Linkage
Compute combined linkage for two clusters.- Specified by:
combine
in interfaceLinkage
- Parameters:
sizex
- Size of first cluster x before mergingdx
- Distance of cluster x to j before mergingsizey
- Size of second cluster y before mergingdy
- Distance of cluster y to j before mergingsizej
- Size of candidate cluster jdxy
- Distance between clusters x and y before merging- Returns:
- Combined distance
-
-