Class FactoryClustering

java.lang.Object
org.ddogleg.clustering.FactoryClustering

public class FactoryClustering extends Object
Factory for creating clustering algorithms.
  • 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 directly

      WARNING: 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 array
      dataType - 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 of StandardKMeans directly
      Parameters:
      config - Configuration for tuning parameters
      updateMeans - Used to compute the means given point assignments
      factory - 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