| java.lang.Object weka.classifiers.trees.j48.ClassifierSplitModel weka.classifiers.trees.j48.NBTreeNoSplit
NBTreeNoSplit | final public class NBTreeNoSplit extends ClassifierSplitModel (Code) | | Class implementing a "no-split"-split (leaf node) for naive bayes
trees.
author: Mark Hall (mhall@cs.waikato.ac.nz) version: $Revision: 1.3 $ |
NBTreeNoSplit | public NBTreeNoSplit()(Code) | | |
buildClassifier | final public void buildClassifier(Instances instances) throws Exception(Code) | | Build the no-split node
Parameters: instances - an Instances value exception: Exception - if an error occurs |
classProb | public double classProb(int classIndex, Instance instance, int theSubset) throws Exception(Code) | | Return the probability for a class value
Parameters: classIndex - the index of the class value Parameters: instance - the instance to generate a probability for Parameters: theSubset - the subset to consider a probability exception: Exception - if an error occurs |
crossValidate | public static double crossValidate(NaiveBayesUpdateable fullModel, Instances trainingSet, Random r) throws Exception(Code) | | Utility method for fast 5-fold cross validation of a naive bayes
model
Parameters: fullModel - a NaiveBayesUpdateable value Parameters: trainingSet - an Instances value Parameters: r - a Random value a double value exception: Exception - if an error occurs |
getDiscretizer | public Discretize getDiscretizer()(Code) | | Return the discretizer used at this node
a Discretize value |
getErrors | public double getErrors()(Code) | | Return the errors made by the naive bayes model at this node
the number of errors made |
getNaiveBayesModel | public NaiveBayesUpdateable getNaiveBayesModel()(Code) | | Get the naive bayes model at this node
a NaiveBayesUpdateable value |
leftSide | final public String leftSide(Instances instances)(Code) | | Does nothing because no condition has to be satisfied.
|
rightSide | final public String rightSide(int index, Instances instances)(Code) | | Does nothing because no condition has to be satisfied.
|
sourceExpression | final public String sourceExpression(int index, Instances data)(Code) | | Returns a string containing java source code equivalent to the test
made at this node. The instance being tested is called "i".
Parameters: index - index of the nominal value tested Parameters: data - the data containing instance structure info a value of type 'String' |
toString | public String toString()(Code) | | Return a textual description of the node
a String value |
weights | final public double[] weights(Instance instance)(Code) | | Always returns null because there is only one subset.
|
whichSubset | final public int whichSubset(Instance instance)(Code) | | Always returns 0 because only there is only one subset.
|
|
|