Examples of ParentSet


Examples of weka.classifiers.bayes.net.ParentSet

   * @param nNode node for which the score is calculate
   * @param nCandidateParent candidate parent to add to the existing parent set
   * @return log score
   */
  public double calcScoreWithExtraParent(int nNode, int nCandidateParent) {
    ParentSet oParentSet = m_BayesNet.getParentSet(nNode);

    // sanity check: nCandidateParent should not be in parent set already
    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
    oParentSet.deleteLastParent(m_BayesNet.m_Instances);

    return logScore;
  } // CalcScoreWithExtraParent
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.