/** * Return the probability for a class value * * @param classIndex the index of the class value * @param instance the instance to generate a probability for * @param theSubset the subset to consider * @return a probability * @exception Exception if an error occurs */ @Override public double classProb(int classIndex, Instance instance, int theSubset) throws Exception { // use the global naive bayes model if (theSubset > -1) { return m_globalNB.classProb(classIndex, instance, theSubset); } else { throw new Exception("This shouldn't happen!!!"); } }
/** * Return the probability for a class value * * @param classIndex the index of the class value * @param instance the instance to generate a probability for * @param theSubset the subset to consider * @return a probability * @exception Exception if an error occurs */ @Override public double classProb(int classIndex, Instance instance, int theSubset) throws Exception { // use the global naive bayes model if (theSubset > -1) { return m_globalNB.classProb(classIndex, instance, theSubset); } else { throw new Exception("This shouldn't happen!!!"); } }