Search in sources :

Example 26 with Algorithms

use of edu.cmu.tetrad.algcomparison.algorithm.Algorithms 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("================================================================================");
}
Also used : Path(java.nio.file.Path) Simulations(edu.cmu.tetrad.algcomparison.simulation.Simulations) Parameters(edu.cmu.tetrad.util.Parameters) Algorithms(edu.cmu.tetrad.algcomparison.algorithm.Algorithms) Statistics(edu.cmu.tetrad.algcomparison.statistic.Statistics) System.out(java.lang.System.out) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

Algorithms (edu.cmu.tetrad.algcomparison.algorithm.Algorithms)26 Parameters (edu.cmu.tetrad.util.Parameters)25 Comparison (edu.cmu.tetrad.algcomparison.Comparison)24 Simulations (edu.cmu.tetrad.algcomparison.simulation.Simulations)17 SemBicScore (edu.cmu.tetrad.algcomparison.score.SemBicScore)12 RandomForward (edu.cmu.tetrad.algcomparison.graph.RandomForward)9 FisherZ (edu.cmu.tetrad.algcomparison.independence.FisherZ)6 Fges (edu.cmu.tetrad.algcomparison.algorithm.oracle.pattern.Fges)5 LinearFisherModel (edu.cmu.tetrad.algcomparison.simulation.LinearFisherModel)4 FirstInflection (edu.cmu.tetrad.algcomparison.algorithm.FirstInflection)2 Gfci (edu.cmu.tetrad.algcomparison.algorithm.oracle.pag.Gfci)2 SemSimulation (edu.cmu.tetrad.algcomparison.simulation.SemSimulation)2 Algorithm (edu.cmu.tetrad.algcomparison.algorithm.Algorithm)1 StARS (edu.cmu.tetrad.algcomparison.algorithm.StARS)1 StabilitySelection (edu.cmu.tetrad.algcomparison.algorithm.StabilitySelection)1 ExternalAlgorithmBNTPc (edu.cmu.tetrad.algcomparison.algorithm.external.ExternalAlgorithmBNTPc)1 ExternalAlgorithmPcalgPc (edu.cmu.tetrad.algcomparison.algorithm.external.ExternalAlgorithmPcalgPc)1 ExternalAlgorithmTetrad (edu.cmu.tetrad.algcomparison.algorithm.external.ExternalAlgorithmTetrad)1 Fask (edu.cmu.tetrad.algcomparison.algorithm.multi.Fask)1 ImagesPcStableMax (edu.cmu.tetrad.algcomparison.algorithm.multi.ImagesPcStableMax)1