public class PruneableClassifierTree extends ClassifierTree
BayesNet, Newick, NOT_DRAWABLE, TREE
Constructor and Description |
---|
PruneableClassifierTree(ModelSelection toSelectLocModel,
boolean pruneTree,
int num,
boolean cleanup,
int seed)
Constructor for pruneable tree structure.
|
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(Instances data)
Method for building a pruneable classifier tree.
|
Capabilities |
getCapabilities()
Returns default capabilities of the classifier tree.
|
java.lang.String |
getRevision()
Returns the revision string.
|
void |
prune()
Prunes a tree.
|
assignIDs, buildTree, buildTree, classifyInstance, cleanup, distributionForInstance, graph, graphType, numLeaves, numNodes, prefix, toSource, toString
public PruneableClassifierTree(ModelSelection toSelectLocModel, boolean pruneTree, int num, boolean cleanup, int seed) throws java.lang.Exception
toSelectLocModel
- selection method for local splitting modelpruneTree
- true if the tree is to be prunednum
- number of subsets of equal sizecleanup
- seed
- the seed value to usejava.lang.Exception
- if something goes wrongpublic Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class ClassifierTree
Capabilities
public void buildClassifier(Instances data) throws java.lang.Exception
buildClassifier
in class ClassifierTree
data
- the data to build the tree fromjava.lang.Exception
- if tree can't be built successfullypublic void prune() throws java.lang.Exception
java.lang.Exception
- if tree can't be pruned successfullypublic java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class ClassifierTree