Examples of ProbabilisticNode


Examples of unbbayes.prs.bn.ProbabilisticNode

    String type = sNode.get("INFO.TYPE").getData();
    Node uNode = null;
   
    if( type.equalsIgnoreCase("Discrete") ){
      //create new Probabilistic uNode
      uNode = new ProbabilisticNode();
      uNode.setName(sNode.getName());
      uNode.setDescription(sNode.getName());
      //reset all states
      ((ProbabilisticNode )uNode).removeAllStates();
       //set states
View Full Code Here

Examples of unbbayes.prs.bn.ProbabilisticNode

    String type = sNode.get("INFO.TYPE").getData();
   
    BEL.print("");
   
    if(type.equalsIgnoreCase("Discrete")){
      ProbabilisticNode uNode = (ProbabilisticNode)rede.getNode(sNode.getName());
      int size = uNode.getStatesSize();
      int c = 0;
     
      for(int i = 0; i < size; i++){
        if(BEL != null)
          BEL = BEL.getNext();
     
        if(BEL != null){
          uNode.setMarginalAt(c++, BEL.getDataByDouble().floatValue());
        }
      }
        
      Debug.println(uNode.getDescription());
      for(int i = 0; i < uNode.getStatesSize(); i++)
        Debug.println(uNode.getStateAt(i) + " : " + ((ProbabilisticNode)uNode).getMarginalAt(i));

    }else
    if(type.equalsIgnoreCase("Continuous")){ 
      GmmNodePluginStub gmmNode = (GmmNodePluginStub)rede.getNode(sNode.getName());
      gmmNode.updateGMMData();
View Full Code Here

Examples of unbbayes.prs.bn.ProbabilisticNode

      EDBUnit bel = node.get("BEL")
      
      if( evidence != null ){
        evidence.print("evidence:");
        if( type.getData().equalsIgnoreCase("Discrete") ){
          ProbabilisticNode uNode = (ProbabilisticNode)pn.getNode(node.getName());
          for (int i = 0; i < uNode.getStatesSize(); i++) {
            if(uNode.getStateAt(i).equalsIgnoreCase(evidence.getData())){
              uNode.addFinding(i);
              break;
            }
          }
        }else
        if( type.getData().equalsIgnoreCase("Continuous") ){
View Full Code Here

Examples of unbbayes.prs.bn.ProbabilisticNode

      EDBUnit bel = node.get("BEL")
      EDBUnit evidence = node.get("EVIDENCE");

      if( evidence == null ){
        if( type.getData().equalsIgnoreCase("Discrete") ){
          ProbabilisticNode uNode = (ProbabilisticNode)pn.getNode(node.getName());
          for (int i = 0; i < uNode.getStatesSize(); i++) {
            String state = uNode.getStateAt(i);
            Double d = bel.getNext(state).getDataByDouble();
            uNode.setMarginalAt(i, d.floatValue());
          }
        }else
        if( type.getData().equalsIgnoreCase("Continuous") ){
          GmmNodePluginStub gmmNode = (GmmNodePluginStub)pn.getNode(node.getName());
          gmmNode.updateGMMData();
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.