use of org.drools.beliefs.bayes.Marginalizer in project drools by kiegroup.
the class SprinkerTest method marginalize.
public static void marginalize(BayesVariableState varState, CliqueState cliqueState) {
JunctionTreeClique jtNode = cliqueState.getJunctionTreeClique();
new Marginalizer(jtNode.getValues().toArray(new BayesVariable[jtNode.getValues().size()]), cliqueState.getPotentials(), varState.getVariable(), varState.getDistribution());
System.out.print(varState.getVariable().getName() + " ");
for (double d : varState.getDistribution()) {
System.out.print(d);
System.out.print(" ");
}
System.out.println(" ");
}
Aggregations