Class ClusteringUtils

java.lang.Object
net.bmahe.genetics4j.samples.mixturemodel.ClusteringUtils

public class ClusteringUtils extends Object
  • Field Details

    • logger

      public static final org.apache.logging.log4j.Logger logger
  • Constructor Details

    • ClusteringUtils

      public ClusteringUtils()
  • Method Details

    • assignClustersDoubleChromosome

      public static int[] assignClustersDoubleChromosome(int distributionNumParameters, double[][] samples, Genotype genotype)
    • assignClustersFloatChromosome

      public static int[] assignClustersFloatChromosome(int distributionNumParameters, double[][] samples, Genotype genotype)
    • persistClusters

      public static void persistClusters(float[] x, float[] y, int[] cluster, String filename) throws IOException
      Throws:
      IOException
    • persistClusters

      public static void persistClusters(double[] x, double[] y, int[] cluster, String filename) throws IOException
      Throws:
      IOException
    • groupByNumClusters

      public static Map<Integer,Individual<FitnessVector<Float>>> groupByNumClusters(double[][] samplesDouble, EvolutionResult<FitnessVector<Float>> evolutionResult)
    • categorizeByNumClusters

      public static void categorizeByNumClusters(int distributionNumParameters, int maxPossibleDistributions, float[] x, float[] y, double[][] samplesDouble, EvolutionResult<FitnessVector<Float>> evolutionResult, String baseDir, String type) throws IOException
      Throws:
      IOException
    • writeCSVReferenceValue

      public static void writeCSVReferenceValue(String filename, int generations, Number value) throws IOException
      Throws:
      IOException