Complete Experiment
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
package com.testpbc4;
|
||||
|
||||
import weka.core.*;
|
||||
import java.util.Random;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.Scanner;
|
||||
|
||||
import weka.classifiers.trees.PBC4cip;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.Random;
|
||||
import java.util.Scanner;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import weka.classifiers.trees.PBC4cip;
|
||||
import weka.core.Instances;
|
||||
import weka.core.converters.ConverterUtils.DataSource;
|
||||
|
||||
public class App {
|
||||
@@ -135,12 +135,15 @@ public class App {
|
||||
printAndExit(String.format("*** Error trying to read datasets file... (%s)",
|
||||
e.getMessage()));
|
||||
}
|
||||
System.out.println(String.format("%d fold cross validation stratified", numFolds));
|
||||
System.out.println(StringUtils.center(String.format("%d fold cross validation stratified", numFolds), 64));
|
||||
initializeOutput();
|
||||
sc = new Scanner(file);
|
||||
System.out.println(String.format(" # %-30s %-29s", "Dataset", "Seeds"));
|
||||
System.out.println("--- " + "-".repeat(30) + " " + "-".repeat(29));
|
||||
int number = 0;
|
||||
while (sc.hasNextLine()) {
|
||||
dataset = sc.nextLine();
|
||||
System.out.print(String.format("Processing dataset %-30s [ ", dataset));
|
||||
System.out.print(String.format("%3d %-30s ", number++, dataset));
|
||||
if (debug && dataset.equals("balloons")) {
|
||||
printAndExit("* Check error output. Debug End.");
|
||||
}
|
||||
@@ -163,7 +166,7 @@ public class App {
|
||||
}
|
||||
|
||||
}
|
||||
System.out.println("]");
|
||||
System.out.println("");
|
||||
accuracyStat = meanAndDeviation(accuracy);
|
||||
timeStat = meanAndDeviation(timeSpent);
|
||||
complexityStat = meanAndDeviation(complexity);
|
||||
|
Reference in New Issue
Block a user