Search in sources :

Example 1 with ExternalAlgorithmBNTPc

use of edu.cmu.tetrad.algcomparison.algorithm.external.ExternalAlgorithmBNTPc in project tetrad by cmu-phil.

the class CompareExternalAlgorithms method main.

public static void main(String... args) {
    Parameters parameters = new Parameters();
    parameters.set("numRuns", 10);
    Statistics statistics = new Statistics();
    statistics.add(new ParameterColumn("numMeasures"));
    statistics.add(new ParameterColumn("avgDegree"));
    statistics.add(new ParameterColumn("sampleSize"));
    statistics.add(new AdjacencyPrecision());
    statistics.add(new AdjacencyRecall());
    statistics.add(new ArrowheadPrecision());
    statistics.add(new ArrowheadRecall());
    statistics.add(new F1Adj());
    statistics.add(new F1Arrow());
    statistics.add(new F1All());
    statistics.add(new ElapsedTime());
    statistics.setWeight("AP", 1.0);
    statistics.setWeight("AR", 0.5);
    statistics.setWeight("AHP", 1.0);
    statistics.setWeight("AHR", 0.5);
    Algorithms algorithms = new Algorithms();
    algorithms.add(new ExternalAlgorithmTetrad("PC_(\"Peter_and_Clark\"),_Priority_Rule,_using_Fisher_Z_test,_alpha_=_0.001"));
    algorithms.add(new ExternalAlgorithmPcalgPc("PC_pcalg_defaults_alpha_=_0.001"));
    algorithms.add(new ExternalAlgorithmBNTPc("learn_struct_pdag_pc_alpha_=_0.001"));
    Comparison comparison = new Comparison();
    comparison.setShowAlgorithmIndices(true);
    comparison.setShowSimulationIndices(true);
    comparison.setSortByUtility(false);
    comparison.setShowUtilities(false);
    comparison.setParallelized(false);
    comparison.generateReportFromExternalAlgorithms("/Users/user/comparison-data/condition_1", "/Users/user/causal-comparisons/condition_1", algorithms, statistics, parameters);
}
Also used : Parameters(edu.cmu.tetrad.util.Parameters) Algorithms(edu.cmu.tetrad.algcomparison.algorithm.Algorithms) Comparison(edu.cmu.tetrad.algcomparison.Comparison) ExternalAlgorithmBNTPc(edu.cmu.tetrad.algcomparison.algorithm.external.ExternalAlgorithmBNTPc) ExternalAlgorithmPcalgPc(edu.cmu.tetrad.algcomparison.algorithm.external.ExternalAlgorithmPcalgPc) ExternalAlgorithmTetrad(edu.cmu.tetrad.algcomparison.algorithm.external.ExternalAlgorithmTetrad)

Aggregations

Comparison (edu.cmu.tetrad.algcomparison.Comparison)1 Algorithms (edu.cmu.tetrad.algcomparison.algorithm.Algorithms)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 Parameters (edu.cmu.tetrad.util.Parameters)1