Package org.ddogleg.clustering
Class FactoryClustering
java.lang.Object
org.ddogleg.clustering.FactoryClustering
Factory for creating clustering algorithms.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongaussianMixtureModelEM_F64
(int maxIterations, int maxConverge, double convergeTol, int pointDimension) High level interface for creating GMM cluster.static <T> StandardKMeans<T>
kMeans
(@Nullable ConfigKMeans config, int pointDimension, Class<T> dataType) K-Means using a primitive array, e.g.static <P> StandardKMeans<P>
kMeans
(@Nullable ConfigKMeans config, ComputeMeanClusters<P> updateMeans, PointDistance<P> pointDistance, DogLambdas.NewInstance<P> factory) High level interface for creating k-means cluster.static <T> StandardKMeans<T>
kMeans_MT
(@Nullable ConfigKMeans config, int pointDimension, int minimumForThreads, Class<T> dataType) static <P> StandardKMeans<P>
kMeans_MT
(@Nullable ConfigKMeans config, int minimumForThreads, ComputeMeanClusters<P> updateMeans, PointDistance<P> pointDistance, DogLambdas.NewInstance<P> factory)
-
Constructor Details
-
FactoryClustering
public FactoryClustering()
-
-
Method Details
-
gaussianMixtureModelEM_F64
public static ExpectationMaximizationGmm_F64 gaussianMixtureModelEM_F64(int maxIterations, int maxConverge, double convergeTol, int pointDimension) High level interface for creating GMM cluster. If more flexibility is needed (e.g. custom seeds) then create and instance of
ExpectationMaximizationGmm_F64
directlyWARNING: DEVELOPMENTAL AND IS LIKELY TO FAIL HORRIBLY
- Parameters:
maxIterations
- Maximum number of iterations it will perform.maxConverge
- Maximum iterations allowed before convergence. Re-seeded if it doesn't converge.convergeTol
- Distance based convergence tolerance. Try 1e-8- Returns:
- ExpectationMaximizationGmm_F64
-
kMeans
public static <T> StandardKMeans<T> kMeans(@Nullable @Nullable ConfigKMeans config, int pointDimension, Class<T> dataType) K-Means using a primitive array, e.g. double[].- Parameters:
pointDimension
- Length of the arraydataType
- Specifies the data type, e.g. double[].class
-
kMeans_MT
public static <T> StandardKMeans<T> kMeans_MT(@Nullable @Nullable ConfigKMeans config, int pointDimension, int minimumForThreads, Class<T> dataType) - Parameters:
minimumForThreads
- The minimum number of points required for it to use concurrent code
-
kMeans
public static <P> StandardKMeans<P> kMeans(@Nullable @Nullable ConfigKMeans config, ComputeMeanClusters<P> updateMeans, PointDistance<P> pointDistance, DogLambdas.NewInstance<P> factory) High level interface for creating k-means cluster. If more flexibility is needed (e.g. custom seeds) then create and instance ofStandardKMeans
directly- Parameters:
config
- Configuration for tuning parametersupdateMeans
- Used to compute the means given point assignmentsfactory
- Creates a new instance of a point- Returns:
- StandardKMeans_F64
-
kMeans_MT
public static <P> StandardKMeans<P> kMeans_MT(@Nullable @Nullable ConfigKMeans config, int minimumForThreads, ComputeMeanClusters<P> updateMeans, PointDistance<P> pointDistance, DogLambdas.NewInstance<P> factory) - Parameters:
minimumForThreads
- The minimum number of points required for it to use concurrent code
-