use of edu.cmu.tetrad.algcomparison.statistic.Statistics in project tetrad by cmu-phil.
the class TimeoutComparisonTest method getStatistics.
private static Statistics getStatistics() {
Statistics statistics = new Statistics();
statistics.add(new AdjacencyPrecision());
statistics.add(new AdjacencyRecall());
statistics.add(new ArrowheadPrecision());
statistics.add(new ArrowheadRecall());
statistics.add(new MathewsCorrAdj());
statistics.add(new MathewsCorrArrow());
statistics.add(new F1Adj());
statistics.add(new F1Arrow());
statistics.add(new SHD());
statistics.add(new ElapsedTime());
return statistics;
}
use of edu.cmu.tetrad.algcomparison.statistic.Statistics in project tetrad by cmu-phil.
the class TimeoutComparisonTest method testTimeoutComparison.
/**
* Test of setComparisonGraph method, of class TimeoutComparison.
*
* @throws IOException
*/
@Ignore
@Test
public void testTimeoutComparison() throws IOException {
Parameters parameters = getParameters();
Statistics statistics = getStatistics();
Algorithms algorithms = getAlgorithms();
Simulations simulations = getSimulations();
String resultsPath = tmpDir.newFolder("comparison").toString();
TimeoutComparison comparisonEngine = getTetradComparisonEngine();
comparisonEngine.compareFromSimulations(resultsPath, simulations, algorithms, statistics, parameters, 60, TimeUnit.SECONDS);
System.out.println("================================================================================");
System.out.println("Output File:");
System.out.println("================================================================================");
Path outputFile = Paths.get(resultsPath, "Comparison.txt");
if (Files.exists(outputFile)) {
try (Stream<String> stream = Files.lines(outputFile)) {
stream.forEach(out::println);
}
}
System.out.println("================================================================================");
}
Aggregations