use of edu.cmu.tetrad.data.Knowledge2 in project tetrad by cmu-phil.
the class LingRunner 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 LingamRunner 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 TsFciRunner2 method execute.
// =================PUBLIC METHODS OVERRIDING ABSTRACT=================//
/**
* Executes the algorithm, producing (at least) a result workbench. Must be
* implemented in the extending class.
*/
public void execute() {
IKnowledge knowledge = (IKnowledge) getParams().get("knowledge", new Knowledge2());
Parameters searchParams = getParams();
Parameters params = searchParams;
Graph graph;
IndependenceTest independenceTest = getIndependenceTest();
Score score = new ScoredIndTest(independenceTest);
if (independenceTest instanceof IndTestDSep) {
final DagToPag dagToPag = new DagToPag(((IndTestDSep) independenceTest).getGraph());
dagToPag.setCompleteRuleSetUsed(params.getBoolean("completeRuleSetUsed", false));
graph = dagToPag.convert();
} else {
GFci fci = new GFci(independenceTest, score);
fci.setKnowledge(knowledge);
fci.setCompleteRuleSetUsed(params.getBoolean("completeRuleSetUsed", false));
fci.setMaxPathLength(params.getInt("maxReachablePathLength", -1));
fci.setMaxDegree(params.getInt("maxIndegree"));
fci.setCompleteRuleSetUsed(false);
fci.setFaithfulnessAssumed(params.getBoolean("faithfulnessAssumed", true));
graph = fci.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);
}
use of edu.cmu.tetrad.data.Knowledge2 in project tetrad by cmu-phil.
the class SampleVcpcFastRunner method execute.
// ===================PUBLIC METHODS OVERRIDING ABSTRACT================//
public void execute() {
IKnowledge knowledge = (IKnowledge) getParams().get("knowledge", new Knowledge2());
Parameters searchParams = getParams();
Parameters params = searchParams;
SampleVcpcFast sfvcpc = new SampleVcpcFast(getIndependenceTest());
sfvcpc.setKnowledge(knowledge);
sfvcpc.setAggressivelyPreventCycles(this.isAggressivelyPreventCycles());
sfvcpc.setDepth(params.getInt("depth", -1));
if (independenceFactsModel != null) {
sfvcpc.setFacts(independenceFactsModel.getFacts());
}
// vcpc.setSemPm(semPm);
//
// if (semPm != null) {
// vcpc.setSemPm(getSemPm());
// }
sfvcpc.setSemIm(semIm);
// if (semIm != null) {
// vcpc.setSemIm(getEstIm());
// }
Graph graph = sfvcpc.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);
setSfvcpcFields(sfvcpc);
}
use of edu.cmu.tetrad.data.Knowledge2 in project tetrad by cmu-phil.
the class SampleVcpcFastRunner method getMeekRules.
public ImpliedOrientation getMeekRules() {
MeekRules meekRules = new MeekRules();
meekRules.setAggressivelyPreventCycles(this.isAggressivelyPreventCycles());
meekRules.setKnowledge((IKnowledge) getParams().get("knowledge", new Knowledge2()));
return meekRules;
}
Aggregations