Class ClusteringUtils
java.lang.Object
net.bmahe.genetics4j.samples.mixturemodel.ClusteringUtils
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int[]
assignClustersDoubleChromosome
(int distributionNumParameters, double[][] samples, Genotype genotype) static int[]
assignClustersFloatChromosome
(int distributionNumParameters, double[][] samples, Genotype genotype) static void
categorizeByNumClusters
(int distributionNumParameters, int maxPossibleDistributions, float[] x, float[] y, double[][] samplesDouble, EvolutionResult<FitnessVector<Float>> evolutionResult, String baseDir, String type) static Map
<Integer, Individual<FitnessVector<Float>>> groupByNumClusters
(double[][] samplesDouble, EvolutionResult<FitnessVector<Float>> evolutionResult) static void
persistClusters
(double[] x, double[] y, int[] cluster, String filename) static void
persistClusters
(float[] x, float[] y, int[] cluster, String filename) static void
writeCSVReferenceValue
(String filename, int generations, Number value)
-
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
-