Package org.ddogleg.clustering.gmm
Class AssignGmm_F64
java.lang.Object
org.ddogleg.clustering.gmm.AssignGmm_F64
- All Implemented Interfaces:
AssignCluster<double[]>
Given a mixture model it will compute the hard and soft assignment of a point to Gaussians in the cluster.
-
Field Summary
Modifier and TypeFieldDescriptionprotected GaussianLikelihoodManager
protected List<GaussianGmm_F64>
-
Constructor Summary
ConstructorDescriptionAssignGmm_F64
(List<GaussianGmm_F64> mixture) Use reference to provided mixturesAssignGmm_F64
(AssignGmm_F64 original) Copy constructor -
Method Summary
-
Field Details
-
mixture
-
glm
-
-
Constructor Details
-
AssignGmm_F64
Use reference to provided mixtures -
AssignGmm_F64
Copy constructor
-
-
Method Details
-
assign
public int assign(double[] point) Description copied from interface:AssignCluster
Assigns the point to cluster which is the best fit.- Specified by:
assign
in interfaceAssignCluster<double[]>
- Parameters:
point
- Point which is to be assigned- Returns:
- Index of the cluster from 0 to N-1
-
assign
public void assign(double[] point, double[] fit) Description copied from interface:AssignCluster
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.- Specified by:
assign
in interfaceAssignCluster<double[]>
- 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
public int getNumberOfClusters()Description copied from interface:AssignCluster
Total number of clusters.- Specified by:
getNumberOfClusters
in interfaceAssignCluster<double[]>
- Returns:
- The total number of clusters.
-