Construct a new K Means model on the passed server
Construct a new K Means model on the passed server.
ARGUMENT:: server
If nil will use Server.default
If nil will use Server.default.
INSTANCEMETHODS::
@ -22,118 +22,108 @@ PRIVATE::k
METHOD:: fit
Identify code::k:: clusters in a link::Classes/FluidDataSet::
ARGUMENT:: dataset
A link::Classes/FluidDataSet:: of data points
A link::Classes/FluidDataSet:: of data points.
ARGUMENT:: k
The number of clusters to identify in the data set
The number of clusters to identify in the data set.
ARGUMENT:: maxIter
Maximum number of iterations to use partitioning the data
ARGUMENT:: buffer
Seed centroids for clusters WARNING:: Not yet implemented ::
Maximum number of iterations.
ARGUMENT:: action
A function to run when fitting is complete, taking as its argument an array with the number of data points for each cluster
A function to run when fitting is complete, taking as its argument an array with the number of data points for each cluster.
METHOD:: predict
Given a trained object, return the cluster ID for each data point in a dataset to a label set.
ARGUMENT:: dataset
a link::Classes/FluidDataSet:: containing the data to predict
a link::Classes/FluidDataSet:: containing the data to predict.
ARGUMENT:: labelset
a link::Classes/FluidLabelSet:: to reveive the predicted clusters
a link::Classes/FluidLabelSet:: to retrieve the predicted clusters.
ARGUMENT:: action
A function to run when the server responds
A function to run when the server responds.
METHOD:: fitPredict
Run link::Classes/FluidKMeans#*fit:: and link::Classes/FluidKMeans#*predict:: in a single pass: i.e. train the model on the incoming link::Classes/FluidDataSet:: and then return the learned clustering to the passed link::Classes/FluidLabelSet::
ARGUMENT:: dataset
a link::Classes/FluidDataSet:: containing the data to fit and predict
a link::Classes/FluidDataSet:: containing the data to fit and predict.
ARGUMENT:: labelset
a link::Classes/FluidLabelSet:: to reveive the predicted clusters
a link::Classes/FluidLabelSet:: to retrieve the predicted clusters.
ARGUMENT:: k
The number of clusters to identify in the data set
The number of clusters.
ARGUMENT:: maxIter
Maximum number of iterations to use partitioning the data
Maximum number of iterations.
ARGUMENT:: action
A function to run when the server responds
METHOD:: predictPoint
Given a trained object, return the cluster ID for a data point in a link::Classes/Buffer::
ARGUMENT:: buffer
a link::Classes/Buffer:: containing a data point
a link::Classes/Buffer:: containing a data point.
ARGUMENT:: action
A function to run when the server responds, taking the ID of the cluser as its argument
A function to run when the server responds, taking the ID of the cluster as its argument.
METHOD:: predict
Report cluster assignments for previously unseen data
Report cluster assignments for previously unseen data.
ARGUMENT:: dataset
A link::Classes/FluidDataSet:: of data points
A link::Classes/FluidDataSet:: of data points.
ARGUMENT:: labelset
A link::Classes/FluidLabelSet:: to contain assigments
A link::Classes/FluidLabelSet:: to contain assignments.
ARGUMENT:: action
A function to run when complete, taking an array of the counts for each catgegory as its argument
A function to run when complete, taking an array of the counts for each category as its argument.