use of edu.cmu.tetrad.graph.GraphNode in project tetrad by cmu-phil.
the class TestBayesXml method sampleBayesIm2.
private static BayesIm sampleBayesIm2() {
Node a = new GraphNode("a");
Node b = new GraphNode("b");
Node c = new GraphNode("c");
Dag graph = new Dag();
graph.addNode(a);
graph.addNode(b);
graph.addNode(c);
graph.addDirectedEdge(a, b);
graph.addDirectedEdge(a, c);
graph.addDirectedEdge(b, c);
BayesPm bayesPm = new BayesPm(graph);
bayesPm.setNumCategories(b, 3);
return new MlBayesIm(bayesPm, MlBayesIm.RANDOM);
}
Aggregations