Package weka.classifiers.bayes.net

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


        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

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

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

    return fAccuracy;
  } // calcScoreWithMissingParent

  /**
 
View Full Code Here

        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

    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

   * @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

    if (oParentSet.contains(nCandidateParent)) {
        return -1e100;
    }

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

    // calculate the score
    double logScore = calcNodeScore(nNode);

    // delete temporarily added parent
View Full Code Here

    // calculate the score
    double logScore = calcNodeScore(nNode);

    // restore temporarily deleted parent
    oParentSet.addParent(nCandidateParent, iParent, m_BayesNet.m_Instances);

    return logScore;
  } // CalcScoreWithMissingParent

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