/* {"description" : "Data type to represent a cluster point, with an associated data instance and list of values."} */
data ClusterPoint {
/* {"@description" : "The data element associated with this point, if any."} */
Data element
/* {"@description" : "The list of values representing this point."} */
dec values[]
}
/* {"description" : "Data type to represent a cluster, with a list of points, and a mean value."} */
data Cluster {
/* {"@description" : "The list of points that were assigned to this cluster."} */
ClusterPoint members[]
/* {"@description" : "The mean value of this cluster."} */
dec mean[]
}
/* {"description" : "A clustering algorithm."} */
interface Clustering {
/* {"@description" : "Initialise clustering algorithm for a coordinate space of the given dimensionality",
"dimensions" : "The number of dimensions of the coordinate space that you will use for clustering (e.g. 2 for an x/y space)"} */
Clustering(int dimensions)
/* {"@description" : "Add a value to the set from which clusters will be formed",
"values" : "The numeric values of this coordinate, which must be of length 'dimensions'",
"el" : "A data element to associate with this value"} */
void addValue(dec values[], store Data el)
/* {"@description" : "Run the clustering algorithm on the accumulated values",
"k" : "The number of clusters to create",
"@return" : "The set of clusters"} */
Cluster[] cluster(int k)
}To propose a new revision to this entity, use dana source put -ut your/new/version.dn -n ml.cluster.Clustering -m "reason for update" -u yourUsername
Version 3 (this version) by barry
Notes for this version: Updates to documentation strings.