List of usage examples for weka.clusterers ClusterEvaluation clusterResultsToString
public String clusterResultsToString()
From source file:wekimini.InputGenerator.java
public void selectEmClusters() throws Exception { String[] options = new String[2]; options[0] = "-I"; options[1] = "100"; buildDataset();// w w w. j a v a 2 s .c om EM clusterer = new EM(); clusterer.setOptions(options); clusterer.buildClusterer(dataset); ClusterEvaluation eval = new ClusterEvaluation(); eval.setClusterer(clusterer); eval.evaluateClusterer(dataset); System.out.println(eval.clusterResultsToString()); double[][][] clusterAtts = clusterer.getClusterModelsNumericAtts(); System.out.println(Arrays.deepToString(clusterAtts)); numClusters = clusterer.numberOfClusters(); System.out.println(numClusters); addEmClustersToTraining(clusterAtts); }