kpp library

A very simple implementation of k-means clustering.

Classes

Cluster
A cluster of instances.
DistanceType
A convenience container class that stores commonly used DistanceMeasure functions.
Instance
An instance of data. [...]

Properties

distanceMeasure DistanceMeasure
read / write
precision num
A precision measure; a cluster is considered to have shifted if at least one of its coordinates has changed by more than this amount.
read / write

Functions

initialClusters(int k, List<Instance> instances, { int seed }) List<Cluster>
Creates an list of clusters. [...]
kmeans({int maxIterations: 10, List<Instance> instances, List<Cluster> clusters }) Map<String, dynamic>
Perform the kmeans algorithm.

Typedefs

DistanceMeasure(List<num> a, List<num> b) num
A function that resurns a distance measure between two points a and b in space.