use of edu.pitt.dbmi.algo.bootstrap.BootstrapEdgeEnsemble in project tetrad by cmu-phil.
the class Cfci method search.
@Override
public Graph search(DataModel dataSet, Parameters parameters) {
if (parameters.getInt("bootstrapSampleSize") < 1) {
edu.cmu.tetrad.search.Cfci search = new edu.cmu.tetrad.search.Cfci(test.getTest(dataSet, parameters));
search.setKnowledge(knowledge);
search.setCompleteRuleSetUsed(parameters.getBoolean("completeRuleSetUsed"));
search.setDepth(parameters.getInt("depth"));
return search.search();
} else {
Cfci algorithm = new Cfci(test);
DataSet data = (DataSet) dataSet;
GeneralBootstrapTest search = new GeneralBootstrapTest(data, algorithm, parameters.getInt("bootstrapSampleSize"));
search.setKnowledge(knowledge);
BootstrapEdgeEnsemble edgeEnsemble = BootstrapEdgeEnsemble.Highest;
switch(parameters.getInt("bootstrapEnsemble", 1)) {
case 0:
edgeEnsemble = BootstrapEdgeEnsemble.Preserved;
break;
case 1:
edgeEnsemble = BootstrapEdgeEnsemble.Highest;
break;
case 2:
edgeEnsemble = BootstrapEdgeEnsemble.Majority;
}
search.setEdgeEnsemble(edgeEnsemble);
search.setParameters(parameters);
search.setVerbose(parameters.getBoolean("verbose"));
return search.search();
}
}
use of edu.pitt.dbmi.algo.bootstrap.BootstrapEdgeEnsemble in project tetrad by cmu-phil.
the class Gfci method search.
@Override
public Graph search(DataModel dataSet, Parameters parameters) {
if (parameters.getInt("bootstrapSampleSize") < 1) {
GFci search = new GFci(test.getTest(dataSet, parameters), score.getScore(dataSet, parameters));
search.setMaxDegree(parameters.getInt("maxDegree"));
search.setKnowledge(knowledge);
search.setVerbose(parameters.getBoolean("verbose"));
search.setFaithfulnessAssumed(parameters.getBoolean("faithfulnessAssumed"));
search.setMaxPathLength(parameters.getInt("maxPathLength"));
search.setCompleteRuleSetUsed(parameters.getBoolean("completeRuleSetUsed"));
Object obj = parameters.get("printStream");
if (obj instanceof PrintStream) {
search.setOut((PrintStream) obj);
}
return search.search();
} else {
Gfci algorithm = new Gfci(test, score);
// algorithm.setKnowledge(knowledge);
// if (initialGraph != null) {
// algorithm.setInitialGraph(initialGraph);
// }
DataSet data = (DataSet) dataSet;
GeneralBootstrapTest search = new GeneralBootstrapTest(data, algorithm, parameters.getInt("bootstrapSampleSize"));
search.setKnowledge(knowledge);
BootstrapEdgeEnsemble edgeEnsemble = BootstrapEdgeEnsemble.Highest;
switch(parameters.getInt("bootstrapEnsemble", 1)) {
case 0:
edgeEnsemble = BootstrapEdgeEnsemble.Preserved;
break;
case 1:
edgeEnsemble = BootstrapEdgeEnsemble.Highest;
break;
case 2:
edgeEnsemble = BootstrapEdgeEnsemble.Majority;
}
search.setEdgeEnsemble(edgeEnsemble);
search.setParameters(parameters);
search.setVerbose(parameters.getBoolean("verbose"));
return search.search();
}
}
use of edu.pitt.dbmi.algo.bootstrap.BootstrapEdgeEnsemble in project tetrad by cmu-phil.
the class TsFci method search.
@Override
public Graph search(DataModel dataSet, Parameters parameters) {
if (parameters.getInt("bootstrapSampleSize") < 1) {
edu.cmu.tetrad.search.TsFci search = new edu.cmu.tetrad.search.TsFci(test.getTest(dataSet, parameters));
search.setDepth(parameters.getInt("depth"));
search.setKnowledge(dataSet.getKnowledge());
return search.search();
} else {
TsFci tsFci = new TsFci(test, algorithm);
DataSet data = (DataSet) dataSet;
GeneralBootstrapTest search = new GeneralBootstrapTest(data, tsFci, parameters.getInt("bootstrapSampleSize"));
search.setKnowledge(knowledge);
BootstrapEdgeEnsemble edgeEnsemble = BootstrapEdgeEnsemble.Highest;
switch(parameters.getInt("bootstrapEnsemble", 1)) {
case 0:
edgeEnsemble = BootstrapEdgeEnsemble.Preserved;
break;
case 1:
edgeEnsemble = BootstrapEdgeEnsemble.Highest;
break;
case 2:
edgeEnsemble = BootstrapEdgeEnsemble.Majority;
}
search.setEdgeEnsemble(edgeEnsemble);
search.setParameters(parameters);
search.setVerbose(parameters.getBoolean("verbose"));
return search.search();
}
}
use of edu.pitt.dbmi.algo.bootstrap.BootstrapEdgeEnsemble in project tetrad by cmu-phil.
the class CpcStable method search.
@Override
public Graph search(DataModel dataSet, Parameters parameters) {
if (parameters.getInt("bootstrapSampleSize") < 1) {
Graph init = null;
if (algorithm != null) {
// init = algorithm.search(dataSet, parameters);
}
edu.cmu.tetrad.search.PcAll search = new edu.cmu.tetrad.search.PcAll(test.getTest(dataSet, parameters), init);
search.setDepth(parameters.getInt("depth"));
search.setKnowledge(knowledge);
search.setFasRule(PcAll.FasRule.FAS_STABLE);
search.setColliderDiscovery(edu.cmu.tetrad.search.PcAll.ColliderDiscovery.CONSERVATIVE);
search.setConflictRule(edu.cmu.tetrad.search.PcAll.ConflictRule.PRIORITY);
search.setVerbose(parameters.getBoolean("verbose"));
return search.search();
} else {
CpcStable cpcStable = new CpcStable(test, algorithm);
// cpcStable.setKnowledge(knowledge);
DataSet data = (DataSet) dataSet;
GeneralBootstrapTest search = new GeneralBootstrapTest(data, algorithm, parameters.getInt("bootstrapSampleSize"));
search.setKnowledge(knowledge);
BootstrapEdgeEnsemble edgeEnsemble = BootstrapEdgeEnsemble.Highest;
switch(parameters.getInt("bootstrapEnsemble", 1)) {
case 0:
edgeEnsemble = BootstrapEdgeEnsemble.Preserved;
break;
case 1:
edgeEnsemble = BootstrapEdgeEnsemble.Highest;
break;
case 2:
edgeEnsemble = BootstrapEdgeEnsemble.Majority;
}
search.setEdgeEnsemble(edgeEnsemble);
search.setParameters(parameters);
search.setVerbose(parameters.getBoolean("verbose"));
return search.search();
}
}
use of edu.pitt.dbmi.algo.bootstrap.BootstrapEdgeEnsemble in project tetrad by cmu-phil.
the class Fges method search.
@Override
public Graph search(DataModel dataSet, Parameters parameters) {
if (parameters.getInt("bootstrapSampleSize") < 1) {
if (algorithm != null) {
// initialGraph = algorithm.search(dataSet, parameters);
}
edu.cmu.tetrad.search.Fges search = new edu.cmu.tetrad.search.Fges(score.getScore(dataSet, parameters));
search.setFaithfulnessAssumed(parameters.getBoolean("faithfulnessAssumed"));
search.setKnowledge(knowledge);
search.setVerbose(parameters.getBoolean("verbose"));
search.setMaxDegree(parameters.getInt("maxDegree"));
search.setSymmetricFirstStep(parameters.getBoolean("symmetricFirstStep"));
Object obj = parameters.get("printStream");
if (obj instanceof PrintStream) {
search.setOut((PrintStream) obj);
}
if (initialGraph != null) {
search.setInitialGraph(initialGraph);
}
return search.search();
} else {
Fges fges = new Fges(score, algorithm);
// fges.setKnowledge(knowledge);
DataSet data = (DataSet) dataSet;
GeneralBootstrapTest search = new GeneralBootstrapTest(data, fges, parameters.getInt("bootstrapSampleSize"));
search.setKnowledge(knowledge);
BootstrapEdgeEnsemble edgeEnsemble = BootstrapEdgeEnsemble.Highest;
switch(parameters.getInt("bootstrapEnsemble", 1)) {
case 0:
edgeEnsemble = BootstrapEdgeEnsemble.Preserved;
break;
case 1:
edgeEnsemble = BootstrapEdgeEnsemble.Highest;
break;
case 2:
edgeEnsemble = BootstrapEdgeEnsemble.Majority;
}
search.setEdgeEnsemble(edgeEnsemble);
search.setParameters(parameters);
search.setVerbose(parameters.getBoolean("verbose"));
return search.search();
}
}
Aggregations