Examples of addParent()


Examples of weka.classifiers.bayes.net.ParentSet.addParent()

    protected void doMarkovBlanketCorrection(BayesNet bayesNet, Instances instances) {
        // Add class node as parent if it is not in the Markov Boundary
        int iClass = instances.classIndex();
        ParentSet ancestors = new ParentSet();
        int nOldSize = 0;
        ancestors.addParent(iClass, instances);
        while (nOldSize != ancestors.getNrOfParents()) {
            nOldSize = ancestors.getNrOfParents();
            for (int iNode = 0; iNode < nOldSize; iNode++) {
                int iCurrent = ancestors.getParent(iNode);
                ParentSet p = bayesNet.getParentSet(iCurrent);
View Full Code Here

Examples of weka.classifiers.bayes.net.ParentSet.addParent()

      while (oParentSet.getNrOfParents() > 0) {
        oParentSet.deleteLastParent(m_instances);
      }
      for (int iParent = 0; iParent < maxn(); iParent++) {
        if (arrows[iParent][iNode]) {
          oParentSet.addParent(iParent, m_instances);
        }
      }
    }
  } // search
 
View Full Code Here

Examples of weka.classifiers.bayes.net.ParentSet.addParent()

      // insert arrows
      for (int iNode = 0; iNode < m_nNodes; iNode++) {
        ParentSet parentSet = m_BayesNet.getParentSet(iNode);
        for (int iNode2 = 0; iNode2 < m_nNodes; iNode2++) {
          if (m_bits[iNode2 + iNode * m_nNodes]) {
            parentSet.addParent(iNode2, m_BayesNet.m_Instances);
          }
        }
      }
      // calc score
      m_fScore = 0.0;
View Full Code Here

Examples of weka.classifiers.bayes.net.ParentSet.addParent()

      oParentSetX.deleteLastParent(m_instances);
    }
   
    // insert parents in iAttributeZ
    for (int iAttributeZ = 0; iAttributeZ < nAttributesZ; iAttributeZ++) {
      oParentSetX.addParent( iAttributesZ[iAttributeZ], m_instances);
    }
   
    double fScoreZ = calcNodeScore(iAttributeX);
    double fScoreZY = calcScoreWithExtraParent(iAttributeX, iAttributeY);
    if (fScoreZY <= fScoreZ) {
View Full Code Here

Examples of weka.classifiers.bayes.net.ParentSet.addParent()

   * @param iTail
   * @param instances
   */
  void applyArcAddition(BayesNet bayesNet, int iHead, int iTail, Instances instances) {
    ParentSet bestParentSet = bayesNet.getParentSet(iHead);
    bestParentSet.addParent(iTail, instances);
    updateCache(iHead, instances.numAttributes(), bestParentSet);
  } // applyArcAddition

  /**
   *
 
View Full Code Here

Examples of weka.classifiers.bayes.net.ParentSet.addParent()

        return -1e100;
      }
    }

    // set up candidate parent
    oParentSet.addParent(nCandidateParent, instances);

    // calculate the score
    double fAccuracy = calcScore(m_BayesNet);

    // delete temporarily added parent
View Full Code Here

Examples of weka.classifiers.bayes.net.ParentSet.addParent()

    // calculate the score
    double fAccuracy = calcScore(m_BayesNet);

    // reinsert temporarily deleted parent
    oParentSet.addParent(nCandidateParent, iParent, instances);

    return fAccuracy;
  } // calcScoreWithMissingParent

  /**
 
View Full Code Here

Examples of weka.classifiers.bayes.net.ParentSet.addParent()

        return -1e100;
    }

    // set up candidate parent
    int iParent = oParentSet.deleteParent(nCandidateParent, instances);
    oParentSet2.addParent(nNode, instances);

    // calculate the score
    double fAccuracy = calcScore(m_BayesNet);

    // restate temporarily reversed arrow
View Full Code Here

Examples of weka.classifiers.bayes.net.ParentSet.addParent()

    protected void doMarkovBlanketCorrection(BayesNet bayesNet, Instances instances) {
        // Add class node as parent if it is not in the Markov Boundary
        int iClass = instances.classIndex();
        ParentSet ancestors = new ParentSet();
        int nOldSize = 0;
        ancestors.addParent(iClass, instances);
        while (nOldSize != ancestors.getNrOfParents()) {
            nOldSize = ancestors.getNrOfParents();
            for (int iNode = 0; iNode < nOldSize; iNode++) {
                int iCurrent = ancestors.getParent(iNode);
                ParentSet p = bayesNet.getParentSet(iCurrent);
View Full Code Here

Examples of weka.classifiers.bayes.net.ParentSet.addParent()

   * @param iTail
   * @param instances
   */
  void applyArcAddition(BayesNet bayesNet, int iHead, int iTail, Instances instances) {
    ParentSet bestParentSet = bayesNet.getParentSet(iHead);
    bestParentSet.addParent(iTail, instances);
    updateCache(iHead, instances.numAttributes(), bestParentSet);
  } // applyArcAddition

  /**
   *
 
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.