use of edu.cmu.tetrad.data.Knowledge2 in project tetrad by cmu-phil.
the class MbfsPatternRunner 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 SampleVcpcRunner method execute.
// ===================PUBLIC METHODS OVERRIDING ABSTRACT================//
public void execute() {
IKnowledge knowledge = (IKnowledge) getParams().get("knowledge", new Knowledge2());
Parameters searchParams = getParams();
Parameters params = searchParams;
SampleVcpc svcpc = new SampleVcpc(getIndependenceTest());
svcpc.setKnowledge(knowledge);
svcpc.setAggressivelyPreventCycles(this.isAggressivelyPreventCycles());
svcpc.setDepth(params.getInt("depth", -1));
if (independenceFactsModel != null) {
svcpc.setFacts(independenceFactsModel.getFacts());
}
// vcpc.setSemPm(semPm);
//
// if (semPm != null) {
// vcpc.setSemPm(getSemPm());
// }
svcpc.setSemIm(semIm);
if (semIm != null) {
svcpc.setSemIm(this.semIm);
}
Graph graph = svcpc.search();
if (getSourceGraph() != null) {
GraphUtils.arrangeBySourceGraph(graph, getSourceGraph());
} else if (knowledge.isDefaultToKnowledgeLayout()) {
SearchGraphUtils.arrangeByKnowledgeTiers(graph, knowledge);
} else {
GraphUtils.circleLayout(graph, 200, 200, 150);
}
setResultGraph(graph);
setSvcpcFields(svcpc);
}
use of edu.cmu.tetrad.data.Knowledge2 in project tetrad by cmu-phil.
the class DataAlgorithmRunner 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 LofsSearchEditor method layoutByKnowledge.
public void layoutByKnowledge() {
GraphWorkbench resultWorkbench = getWorkbench();
Graph graph = resultWorkbench.getGraph();
IKnowledge knowledge = (IKnowledge) getAlgorithmRunner().getParams().get("knowledge", new Knowledge2());
SearchGraphUtils.arrangeByKnowledgeTiers(graph, knowledge);
// resultWorkbench.setGraph(graph);
}
use of edu.cmu.tetrad.data.Knowledge2 in project tetrad by cmu-phil.
the class LofsSearchEditorNew method layoutByKnowledge.
public void layoutByKnowledge() {
GraphWorkbench resultWorkbench = getWorkbench();
Graph graph = resultWorkbench.getGraph();
IKnowledge knowledge = (IKnowledge) getAlgorithmRunner().getParams().get("knowledge", new Knowledge2());
SearchGraphUtils.arrangeByKnowledgeTiers(graph, knowledge);
// resultWorkbench.setGraph(graph);
}
Aggregations