org.ddogleg.clustering.gmm
Class AssignGmm_F64
- java.lang.Object
-
- org.ddogleg.clustering.gmm.AssignGmm_F64
-
- All Implemented Interfaces:
- java.io.Serializable, AssignCluster<double[]>
public class AssignGmm_F64 extends java.lang.Object implements AssignCluster<double[]>
Given a mixture model it will compute the hard and soft assignment of a point to Gaussians in the cluster.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description AssignGmm_F64(AssignGmm_F64 original)Copy constructorAssignGmm_F64(java.util.List<GaussianGmm_F64> mixture)Use reference to provided mixtures
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intassign(double[] point)Assigns the point to cluster which is the best fit.voidassign(double[] point, double[] fit)Performs a soft assignment of a point to all the clusters.AssignCluster<double[]>copy()Creates an exact copy of this class.java.util.List<GaussianGmm_F64>getMixture()intgetNumberOfClusters()Total number of clusters.voidsetMixture(java.util.List<GaussianGmm_F64> mixture)
-
-
-
Constructor Detail
-
AssignGmm_F64
public AssignGmm_F64(java.util.List<GaussianGmm_F64> mixture)
Use reference to provided mixtures
-
AssignGmm_F64
public AssignGmm_F64(AssignGmm_F64 original)
Copy constructor
-
-
Method Detail
-
assign
public int assign(double[] point)
Description copied from interface:AssignClusterAssigns the point to cluster which is the best fit.- Specified by:
assignin 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:AssignClusterPerforms 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:
assignin 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:AssignClusterTotal number of clusters.- Specified by:
getNumberOfClustersin interfaceAssignCluster<double[]>- Returns:
- The total number of clusters.
-
copy
public AssignCluster<double[]> copy()
Description copied from interface:AssignClusterCreates an exact copy of this class.- Specified by:
copyin interfaceAssignCluster<double[]>- Returns:
- Copy of class
-
getMixture
public java.util.List<GaussianGmm_F64> getMixture()
-
setMixture
public void setMixture(java.util.List<GaussianGmm_F64> mixture)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG