Builds the tree structure.
Parameters: data - the data for which the tree structure is to begenerated. Parameters: keepData - is training data to be kept? throws: Exception - if something goes wrong
Builds the tree structure with hold out set
Parameters: train - the data for which the tree structure is to begenerated. Parameters: test - the test data for potential pruning Parameters: keepData - is training Data to be kept? throws: Exception - if something goes wrong
Cleanup in order to save memory.
Parameters: justHeaderInfo -
distributionForInstance
final public double[] distributionForInstance(Instance instance, boolean useLaplace) throws Exception(Code)
Returns class probabilities for a weighted instance.
Parameters: instance - the instance to get the distribution for Parameters: useLaplace - whether to use laplace or not the distribution throws: Exception - if something goes wrong
Returns a newly created tree.
Parameters: train - the training data Parameters: test - the pruning data. the generated tree throws: Exception - if something goes wrong
Returns source code for the tree as an if-then statement. The
class is assigned to variable "p", and assumes the tested
instance is named "i". The results are returned as two stringbuffers:
a section of code for assignment of the class, and a section of
code containing support code (eg: other support methods).
Parameters: className - the classname that this static classifier has an array containing two stringbuffers, the first string containingassignment code, and the second containing source for support code. throws: Exception - if something goes wrong