Class Clustering

java.lang.Object
net.bmahe.genetics4j.samples.clustering.Clustering

public class Clustering extends Object
  • Field Details

  • Constructor Details

    • Clustering

      public Clustering()
  • Method Details

    • cliError

      public static void cliError(org.apache.commons.cli.Options options, String errorMessage)
    • computeDistance

      private static final double computeDistance(double[][] array, int i, int j)
    • computeAllDistances

      private static final double[][] computeAllDistances(double[][] array)
    • generateClusters

      public static double[][] generateClusters(Random random, int numClusters, double minX, double maxX, double minY, double maxY)
    • generateDataPoints

      public static double[][] generateDataPoints(Random random, double[][] clusters, int numDataPoints, double radius)
    • doGA

      public static void doGA(int k, double min, double max, int numberTournaments, int combinationArithmetic, int combinationCrossover, double randomMutationRate, double creepMutationRate, double creepMutationMean, double creepMutationStdDev, Fitness<Double> fitnessFunction, Termination<Double> terminations, int populationSize, String outputCSV, double[][] data, double[][] distances, String baseDir, String filenameSuffix) throws IOException
      Throws:
      IOException
    • apacheCommonsMathCluster

      public static List<org.apache.commons.math3.ml.clustering.CentroidCluster<LocationWrapper>> apacheCommonsMathCluster(double[][] clusters, double[][] data)
    • main

      public static void main(String[] args) throws IOException
      Throws:
      IOException