| bio-0.4.6: A bioinformatics library | Source code | Contents | Index

Bio.Clustering

Description
Implement clustering
Synopsis

data Clustered score datum

= Branch score (Clustered score datum) (Clustered score datum)
| Leaf datum

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

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.
Produced by Haddock version 2.4.2