use of edu.cmu.tetrad.data.Knowledge2 in project tetrad by cmu-phil.
the class PcRunner method execute.
// ===================PUBLIC METHODS OVERRIDING ABSTRACT================//
public void execute() {
IKnowledge knowledge = (IKnowledge) getParams().get("knowledge", new Knowledge2());
int depth = getParams().getInt("depth", -1);
Graph graph;
Pc pc = new Pc(getIndependenceTest());
pc.setKnowledge(knowledge);
pc.setAggressivelyPreventCycles(isAggressivelyPreventCycles());
pc.setDepth(depth);
pc.setInitialGraph(initialGraph);
graph = pc.search();
System.out.println(graph);
if (getSourceGraph() != null) {
GraphUtils.arrangeBySourceGraph(graph, getSourceGraph());
} else if (knowledge.isDefaultToKnowledgeLayout()) {
SearchGraphUtils.arrangeByKnowledgeTiers(graph, knowledge);
} else {
GraphUtils.circleLayout(graph, 200, 200, 150);
}
setResultGraph(graph);
setPcFields(pc);
}
use of edu.cmu.tetrad.data.Knowledge2 in project tetrad by cmu-phil.
the class PcStableMaxRunner method execute.
// ===================PUBLIC METHODS OVERRIDING ABSTRACT================//
public void execute() {
IKnowledge knowledge = (IKnowledge) getParams().get("knowledge", new Knowledge2());
int depth = getParams().getInt("depth", -1);
// PC pc = new PC(getIndependenceTest());
PcStableMax pc = new PcStableMax(getIndependenceTest());
pc.setKnowledge(knowledge);
pc.setDepth(depth);
pc.setInitialGraph(initialGraph);
Graph graph = pc.search();
System.out.println(graph);
if (getSourceGraph() != null) {
GraphUtils.arrangeBySourceGraph(graph, getSourceGraph());
} else if (knowledge.isDefaultToKnowledgeLayout()) {
SearchGraphUtils.arrangeByKnowledgeTiers(graph, knowledge);
} else {
GraphUtils.circleLayout(graph, 200, 200, 150);
}
setResultGraph(graph);
setPcFields(pc);
}
use of edu.cmu.tetrad.data.Knowledge2 in project tetrad by cmu-phil.
the class PcStableMaxRunner method getMeekRules.
public ImpliedOrientation getMeekRules() {
MeekRules rules = new MeekRules();
rules.setAggressivelyPreventCycles(this.isAggressivelyPreventCycles());
rules.setKnowledge((IKnowledge) getParams().get("knowledge", new Knowledge2()));
return rules;
}
use of edu.cmu.tetrad.data.Knowledge2 in project tetrad by cmu-phil.
the class PcdRunner method getMeekRules.
public ImpliedOrientation getMeekRules() {
MeekRules rules = new MeekRules();
rules.setKnowledge((IKnowledge) getParams().get("knowledge", new Knowledge2()));
return rules;
}
use of edu.cmu.tetrad.data.Knowledge2 in project tetrad by cmu-phil.
the class RandomMixedRunner method getMeekRules.
public ImpliedOrientation getMeekRules() {
MeekRules rules = new MeekRules();
rules.setAggressivelyPreventCycles(this.isAggressivelyPreventCycles());
rules.setKnowledge((IKnowledge) getParams().get("knowledge", new Knowledge2()));
return rules;
}
Aggregations