Package org.encog.ml.bayesian.parse

Examples of org.encog.ml.bayesian.parse.ParsedEvent


    List<ParsedProbability> list = ParseProbability.parseProbabilityList(this, line);
    List<String> labelList = new ArrayList<String>();
   
    // ensure that all events are there
    for(ParsedProbability prob: list ) {
      ParsedEvent parsedEvent = prob.getChildEvent();
      String eventLabel = parsedEvent.getLabel();
      labelList.add(eventLabel);
     
      // create event, if not already here
      BayesianEvent e = getEvent(eventLabel);
      if( e==null ) {
        List<BayesianChoice> cl = new ArrayList<BayesianChoice>();
               
        for( ParsedChoice c : parsedEvent.getList() ) {
          cl.add(new BayesianChoice(c.getLabel(),c.getMin(),c.getMax()));
        }
       
        createEvent(eventLabel, cl);       
      }
    }

   
    // now remove all events that were not covered
    for(int i=0; i<events.size();i++) {
      BayesianEvent event = this.events.get(i);
      if( !labelList.contains(event.getLabel()) ) {
        removeEvent(event);
      }
    }

    // handle dependencies
    for(ParsedProbability prob: list ) {
      ParsedEvent parsedEvent = prob.getChildEvent();
      String eventLabel = parsedEvent.getLabel();
     
      BayesianEvent event = requireEvent(eventLabel);
     
      // ensure that all "givens" are present
      List<String> givenList = new ArrayList<String>();
View Full Code Here

TOP

Related Classes of org.encog.ml.bayesian.parse.ParsedEvent

Copyright © 2018 www.massapicom. 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.