O
- Object type@Reference(authors="G. N. Lance and W. T. Williams", title="A general theory of classificatory sorting strategies 1. Hierarchical systems", booktitle="The computer journal 9.4", url="http://dx.doi.org/ 10.1093/comjnl/9.4.373") public class NaiveAgglomerativeHierarchicalClustering<O,D extends NumberDistance<D,?>> extends AbstractDistanceBasedAlgorithm<O,D,PointerHierarchyRepresentationResult<DoubleDistance>> implements HierarchicalClusteringAlgorithm<DoubleDistance>
SLINK
for a much faster
algorithm (however, only for single-linkage).
Reference for the unified concept:
G. N. Lance and W. T. Williams
A general theory of classificatory sorting strategies 1. Hierarchical systems
The computer journal 9.4 (1967): 373-380.
A Review of Classification
R. M. Cormack
Journal of the Royal Statistical Society. Series A, Vol. 134, No. 3
Modifier and Type | Class and Description |
---|---|
static class |
NaiveAgglomerativeHierarchicalClustering.Parameterizer<O,D extends NumberDistance<D,?>>
Parameterization class
|
Modifier and Type | Field and Description |
---|---|
(package private) LinkageMethod |
linkage
Current linkage method in use.
|
private static Logging |
LOG
Class logger
|
DISTANCE_FUNCTION_ID
Constructor and Description |
---|
NaiveAgglomerativeHierarchicalClustering(DistanceFunction<? super O,D> distanceFunction,
LinkageMethod linkage)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
DoubleDistance |
getDistanceFactory()
Return the distance type that will be used by the algorithm.
|
TypeInformation[] |
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query.
|
protected Logging |
getLogger()
Get the (STATIC) logger for this class.
|
PointerHierarchyRepresentationResult<DoubleDistance> |
run(Database db,
Relation<O> relation)
Run the algorithm
|
protected static int |
triangleSize(int x)
Compute the size of a complete x by x triangle (minus diagonal)
|
getDistanceFunction
makeParameterDistanceFunction, run
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
run
private static final Logging LOG
LinkageMethod linkage
public NaiveAgglomerativeHierarchicalClustering(DistanceFunction<? super O,D> distanceFunction, LinkageMethod linkage)
distanceFunction
- Distance function to uselinkage
- Linkage methodpublic PointerHierarchyRepresentationResult<DoubleDistance> run(Database db, Relation<O> relation)
db
- Databaserelation
- Relationprotected static int triangleSize(int x)
x
- Offsetpublic DoubleDistance getDistanceFactory()
HierarchicalClusteringAlgorithm
getDistanceFactory
in interface HierarchicalClusteringAlgorithm<DoubleDistance>
public TypeInformation[] getInputTypeRestriction()
AbstractAlgorithm
getInputTypeRestriction
in interface Algorithm
getInputTypeRestriction
in class AbstractAlgorithm<PointerHierarchyRepresentationResult<DoubleDistance>>
protected Logging getLogger()
AbstractAlgorithm
getLogger
in class AbstractAlgorithm<PointerHierarchyRepresentationResult<DoubleDistance>>