bio-0.5.3: A bioinformatics library

Safe HaskellSafe-Inferred

Bio.Clustering

Description

Implement clustering

Synopsis

Documentation

data Clustered score datum Source

Data structure for storing hierarchical clusters

Constructors

Branch score (Clustered score datum) (Clustered score datum) 
Leaf datum 

Instances

(Show score, Show datum) => Show (Clustered score datum) 

cluster_sl :: (Ord a, Ord s) => [(s, a, a)] -> [Clustered s a]Source

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.