Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Bio.Clustering
Description
Implement clustering
Documentation
data Clustered score datum
Data structure for storing hierarchical clusters
cluster_sl :: (Ord a, Ord s) => [(s, a, a)] -> [Clustered s a]
Single linkage agglomerative clustering. Cluster elements by slurping a sorted list of pairs with score (i.e. triples :-) Keeps a set of contained elements at each branch's root, so O(n log n), and requires elements to be in Ord. For this to work, the triples must be sorted on score. Earlier scores in the list will make up the lower nodes, so sort descending for similarity, ascending for distance.