Package org.ddogleg.clustering
Interface AssignCluster<D>
- All Known Implementing Classes:
AssignGmm_F64,AssignKMeans
public interface AssignCluster<D>
Used to assign a point to set of clusters. Clusters are given labels from 0 to N-1, where N is the number of
clusters.
-
Method Summary
Modifier and TypeMethodDescriptionintAssigns the point to cluster which is the best fit.voidPerforms a soft assignment of a point to all the clusters.intTotal number of clusters.
-
Method Details
-
assign
Assigns the point to cluster which is the best fit.- Parameters:
point- Point which is to be assigned- Returns:
- Index of the cluster from 0 to N-1
-
assign
Performs a soft assignment of a point to all the clusters. Clusters with a better fit will have a larger value in 'fit'. The sum of fit is equal to 1, unless everything is zero. Then it is zero.- Parameters:
point- Point which is to be assignedfit- Storage for relative fit quality of each cluster. Length must be at least the number of clusters.
-
getNumberOfClusters
int getNumberOfClusters()Total number of clusters.- Returns:
- The total number of clusters.
-