Package org.encog.ml.bayesian

Examples of org.encog.ml.bayesian.BayesianNetwork.createDependency()


    BayesianEvent spamEvent = network.createEvent("spam");
   
    int index = 0;
    for( String word: words) {
      BayesianEvent event = network.createEvent(word+index);
      network.createDependency(spamEvent, event);
      index++;
    }
   
    network.finalizeStructure();
   
View Full Code Here


  {
    BayesianNetwork network = new BayesianNetwork();
    BayesianEvent a = network.createEvent("a");
    BayesianEvent b = network.createEvent("b");

    network.createDependency(a, b);
    network.finalizeStructure();
    a.getTable().addLine(0.5, true); // P(A) = 0.5
    b.getTable().addLine(0.2, true, true); // p(b|a) = 0.2
    b.getTable().addLine(0.8, true, false);// p(b|~a) = 0.8   
    network.validate();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.