public class CHAIDStarClassifierTree extends CHAIDClassifierTree
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
for serialization
|
m_CF, m_cleanup, m_collapseTheTree, m_pruneTheTree, m_subtreeRaising
Constructor and Description |
---|
CHAIDStarClassifierTree(CHAIDStarModelSelection toSelectLocModel,
boolean pruneTree,
float cf,
boolean raiseTree,
boolean cleanup,
boolean collapseTree)
Constructor for tree structure based on CHAID* algorithm.
|
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(weka.core.Instances data)
Method for building a pruneable classifier tree based on CHAID* algorithm.
|
void |
buildTree(weka.core.Instances data,
boolean keepData)
Builds the tree structure.
|
weka.core.Capabilities |
getCapabilities()
Returns default capabilities of the classifier tree.
|
protected CHAIDStarClassifierTree |
getNewTree(weka.core.Instances data)
Returns a newly created tree.
|
protected CHAIDStarClassifierTree |
getNewTree(weka.core.Instances train,
weka.core.Instances test)
Returns a newly created tree.
|
java.lang.String |
getRevision()
Returns the revision string.
|
classifyInstance, distributionForInstance, toSource, toStringOrdinalAttributesList
private static final long serialVersionUID
public CHAIDStarClassifierTree(CHAIDStarModelSelection toSelectLocModel, boolean pruneTree, float cf, boolean raiseTree, boolean cleanup, boolean collapseTree) throws java.lang.Exception
toSelectLocModel
- selection method for local splitting modelpruneTree
- true if the tree is to be prunedcf
- the confidence factor for pruningraiseTree
- true if subtree raising is to be performedcleanup
- true to cleanup after build the treecollapseTree
- true if the tree is to be collapsedjava.lang.Exception
- if something goes wrongpublic weka.core.Capabilities getCapabilities()
getCapabilities
in interface weka.core.CapabilitiesHandler
getCapabilities
in class CHAIDClassifierTree
Capabilities
public void buildClassifier(weka.core.Instances data) throws java.lang.Exception
buildClassifier
in class CHAIDClassifierTree
data
- the data for building the treejava.lang.Exception
- if something goes wrongpublic void buildTree(weka.core.Instances data, boolean keepData) throws java.lang.Exception
buildTree
in class CHAIDClassifierTree
data
- the data for which the tree structure is to be generated.keepData
- is training data to be kept?java.lang.Exception
- if something goes wrongprotected CHAIDStarClassifierTree getNewTree(weka.core.Instances data) throws java.lang.Exception
getNewTree
in class CHAIDClassifierTree
data
- the training datajava.lang.Exception
- if something goes wrongprotected CHAIDStarClassifierTree getNewTree(weka.core.Instances train, weka.core.Instances test) throws java.lang.Exception
getNewTree
in class CHAIDClassifierTree
train
- the training datatest
- the pruning data.java.lang.Exception
- if something goes wrongpublic java.lang.String getRevision()
getRevision
in interface weka.core.RevisionHandler
getRevision
in class CHAIDClassifierTree