Safe Haskell | Safe-Inferred |
---|
- data Dendrogram a
- = Leaf a
- | Branch !Distance (Dendrogram a) (Dendrogram a)
- data Linkage
- = SingleLinkage
- | CompleteLinkage
- | CLINK
- | UPGMA
- | FakeAverageLinkage
- type Distance = Double
Documentation
data Dendrogram a Source
Data structure for storing hierarchical clusters. The
distance between clusters is stored on the branches.
Distances between leafs are the distances between the elements
on those leafs, while distances between branches are defined
by the linkage used (see Linkage
).
Leaf a | The leaf contains the item |
Branch !Distance (Dendrogram a) (Dendrogram a) | Each branch connects two clusters/dendrograms that are
|
Functor Dendrogram | Does not recalculate the distances! |
Foldable Dendrogram | |
Traversable Dendrogram | |
Eq a => Eq (Dendrogram a) | |
Ord a => Ord (Dendrogram a) | |
Show a => Show (Dendrogram a) |
The linkage type determines how the distance between clusters will be calculated. These are the linkage types currently available on this library.
SingleLinkage | The distance between two clusters |
CompleteLinkage | The distance between two clusters |
CLINK | The same as |
UPGMA | Unweighted Pair Group Method with Arithmetic mean, also
called "average linkage". The distance between two
clusters |
FakeAverageLinkage | This method is usually wrongly called "average linkage".
The distance between cluster
|