@CodeReview(reviewer="Kevin R. Dixon", date="2008-07-22", changesNeeded=false, comments={"Created default constructor.","Otherwise code looks fine."}) public class GaussianClusterCreator extends AbstractCloneableSerializable implements ClusterCreator<GaussianCluster,Vector>
GaussianClusterCreator
class implements a ClusterCreator
for creating GaussianClusters by fitting a MultivariateGaussian to the
given set of example vectors.Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_COVARIANCE
Default covariance, 1.0E-4
|
Constructor and Description |
---|
GaussianClusterCreator()
Default constructor
|
GaussianClusterCreator(double defaultCovariance)
Creates a new instance of GaussianClusterCreator
|
Modifier and Type | Method and Description |
---|---|
GaussianCluster |
createCluster(java.util.Collection<? extends Vector> members)
Creates a GaussianCluster from a given set of vectors by fitting a
Gaussian to those vectors.
|
double |
getDefaultCovariance()
Getter for defaultCovariance
|
void |
setDefaultCovariance(double defaultCovariance)
Setter for defaultCovariance
|
clone
public static final double DEFAULT_COVARIANCE
public GaussianClusterCreator()
public GaussianClusterCreator(double defaultCovariance)
defaultCovariance
- amount to add to the diagonals of the covariance
matrix, typically on the order of 1e-4.public GaussianCluster createCluster(java.util.Collection<? extends Vector> members)
createCluster
in interface ClusterCreator<GaussianCluster,Vector>
members
- The members for the new cluster.public double getDefaultCovariance()
public void setDefaultCovariance(double defaultCovariance)
defaultCovariance
- amount to add to the diagonals of the covariance
matrix, typically on the order of 1e-4.