Search in sources :

Example 1 with TsImages

use of edu.cmu.tetrad.algcomparison.algorithm.oracle.pag.TsImages in project tetrad by cmu-phil.

the class ExampleCompareSimulationTimeSeries method main.

public static void main(String... args) {
    Parameters parameters = new Parameters();
    parameters.set("numRuns", 10);
    parameters.set("numMeasures", 10);
    parameters.set("avgDegree", 4);
    parameters.set("sampleSize", 500);
    parameters.set("alpha", 1e-4, 1e-3, 1e-2);
    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());
    statistics.setWeight("AP", 1.0);
    statistics.setWeight("AR", 0.5);
    Algorithms algorithms = new Algorithms();
    algorithms.add(new TsFci(new FisherZ()));
    algorithms.add(new TsGfci(new FisherZ(), new SemBicScore()));
    algorithms.add(new TsImages(new SemBicScore()));
    Simulations simulations = new Simulations();
    simulations.add(new TimeSeriesSemSimulation(new RandomForward()));
    Comparison comparison = new Comparison();
    comparison.setSortByUtility(true);
    comparison.setShowUtilities(true);
    comparison.compareFromSimulations("comparison", simulations, algorithms, statistics, parameters);
}
Also used : Simulations(edu.cmu.tetrad.algcomparison.simulation.Simulations) Parameters(edu.cmu.tetrad.util.Parameters) RandomForward(edu.cmu.tetrad.algcomparison.graph.RandomForward) TsGfci(edu.cmu.tetrad.algcomparison.algorithm.oracle.pag.TsGfci) TimeSeriesSemSimulation(edu.cmu.tetrad.algcomparison.simulation.TimeSeriesSemSimulation) Algorithms(edu.cmu.tetrad.algcomparison.algorithm.Algorithms) FisherZ(edu.cmu.tetrad.algcomparison.independence.FisherZ) Comparison(edu.cmu.tetrad.algcomparison.Comparison) TsFci(edu.cmu.tetrad.algcomparison.algorithm.oracle.pag.TsFci) TsImages(edu.cmu.tetrad.algcomparison.algorithm.oracle.pag.TsImages) SemBicScore(edu.cmu.tetrad.algcomparison.score.SemBicScore)

Aggregations

Comparison (edu.cmu.tetrad.algcomparison.Comparison)1 Algorithms (edu.cmu.tetrad.algcomparison.algorithm.Algorithms)1 TsFci (edu.cmu.tetrad.algcomparison.algorithm.oracle.pag.TsFci)1 TsGfci (edu.cmu.tetrad.algcomparison.algorithm.oracle.pag.TsGfci)1 TsImages (edu.cmu.tetrad.algcomparison.algorithm.oracle.pag.TsImages)1 RandomForward (edu.cmu.tetrad.algcomparison.graph.RandomForward)1 FisherZ (edu.cmu.tetrad.algcomparison.independence.FisherZ)1 SemBicScore (edu.cmu.tetrad.algcomparison.score.SemBicScore)1 Simulations (edu.cmu.tetrad.algcomparison.simulation.Simulations)1 TimeSeriesSemSimulation (edu.cmu.tetrad.algcomparison.simulation.TimeSeriesSemSimulation)1 Parameters (edu.cmu.tetrad.util.Parameters)1