Search in sources :

Example 1 with ImagesSemBic

use of edu.cmu.tetrad.algcomparison.algorithm.multi.ImagesSemBic in project tetrad by cmu-phil.

the class TestImagesSimulation method test1.

public void test1() {
    Parameters parameters = new Parameters();
    parameters.set("numRuns", 1);
    parameters.set("numMeasures", 100);
    parameters.set("avgDegree", 8);
    // parameters.set("maxDegree", 8);
    // parameters.set("maxIndegree",  3);
    // parameters.set("maxOutdegree", 3);
    parameters.set("sampleSize", 500);
    parameters.set("penaltyDiscount", 4);
    // parameters.set("alpha", 0.001);
    // parameters.set("maxDegree", 5);
    // parameters.set("numCategoriesToDiscretize", 3);
    parameters.set("intervalBetweenRecordings", 20);
    parameters.set("varLow", 1.);
    parameters.set("varHigh", 3.);
    parameters.set("coefLow", .1);
    parameters.set("coefHigh", 1);
    parameters.set("coefSymmetric", true);
    parameters.set("meanLow", -1);
    parameters.set("meanHigh", 1);
    // parameters.set("scaleFreeAlpha", .9);
    // parameters.set("scaleFreeBeta", .05);
    // parameters.set("scaleFreeDeltaIn", 3);
    // parameters.set("scaleFreeDeltaOut", .1);
    parameters.set("numRuns", 1);
    parameters.set("randomSelectionSize", 3);
    Statistics statistics = new Statistics();
    // statistics.add(new ParameterColumn("numCategories"));
    statistics.add(new AdjacencyPrecision());
    statistics.add(new AdjacencyRecall());
    statistics.add(new ArrowheadPrecision());
    statistics.add(new ArrowheadRecall());
    statistics.add(new ElapsedTime());
    statistics.setWeight("AP", 1.0);
    statistics.setWeight("AR", 0.5);
    Algorithms algorithms = new Algorithms();
    algorithms.add(new ImagesSemBic());
    algorithms.add(new ImagesPcStableMax());
    Simulations simulations = new Simulations();
    simulations.add(new LinearFisherModel(new RandomForward()));
    Comparison comparison = new Comparison();
    comparison.setShowAlgorithmIndices(true);
    comparison.setShowSimulationIndices(false);
    comparison.setSortByUtility(false);
    comparison.setShowUtilities(false);
    comparison.setParallelized(true);
    // comparison.setSaveGraphs(true);
    comparison.setTabDelimitedTables(false);
    comparison.compareFromSimulations("comparison", simulations, algorithms, statistics, parameters);
}
Also used : Simulations(edu.cmu.tetrad.algcomparison.simulation.Simulations) Parameters(edu.cmu.tetrad.util.Parameters) LinearFisherModel(edu.cmu.tetrad.algcomparison.simulation.LinearFisherModel) ImagesPcStableMax(edu.cmu.tetrad.algcomparison.algorithm.multi.ImagesPcStableMax) RandomForward(edu.cmu.tetrad.algcomparison.graph.RandomForward) Algorithms(edu.cmu.tetrad.algcomparison.algorithm.Algorithms) ImagesSemBic(edu.cmu.tetrad.algcomparison.algorithm.multi.ImagesSemBic) Comparison(edu.cmu.tetrad.algcomparison.Comparison)

Aggregations

Comparison (edu.cmu.tetrad.algcomparison.Comparison)1 Algorithms (edu.cmu.tetrad.algcomparison.algorithm.Algorithms)1 ImagesPcStableMax (edu.cmu.tetrad.algcomparison.algorithm.multi.ImagesPcStableMax)1 ImagesSemBic (edu.cmu.tetrad.algcomparison.algorithm.multi.ImagesSemBic)1 RandomForward (edu.cmu.tetrad.algcomparison.graph.RandomForward)1 LinearFisherModel (edu.cmu.tetrad.algcomparison.simulation.LinearFisherModel)1 Simulations (edu.cmu.tetrad.algcomparison.simulation.Simulations)1 Parameters (edu.cmu.tetrad.util.Parameters)1