public class ClassifierDecList extends Object implements Serializable, RevisionHandler
Modifier and Type | Field and Description |
---|---|
protected int |
indeX
Which son to expand?
|
protected boolean |
m_isEmpty
True if node is empty.
|
protected boolean |
m_isLeaf
True if node is leaf.
|
protected ClassifierSplitModel |
m_localModel
Local model at node.
|
protected int |
m_minNumObj
Minimum number of objects
|
protected ClassifierDecList[] |
m_sons
References to sons.
|
protected static EntropySplitCrit |
m_splitCrit
To compute the entropy.
|
protected Distribution |
m_test
The pruning instances.
|
protected ModelSelection |
m_toSelectModel
The model selection method.
|
protected Instances |
m_train
The training instances.
|
Constructor and Description |
---|
ClassifierDecList(ModelSelection toSelectLocModel,
int minNum)
Constructor - just calls constructor of class DecList.
|
Modifier and Type | Method and Description |
---|---|
void |
buildDecList(Instances data,
boolean leaf)
Builds the partial tree without hold out set.
|
void |
buildRule(Instances data)
Method for building a pruned partial tree.
|
int |
chooseIndex()
Method for choosing a subset to expand.
|
int |
chooseLastIndex()
Choose last index (ie.
|
double |
classifyInstance(Instance instance)
Classifies an instance.
|
void |
cleanup(Instances justHeaderInfo)
Cleanup in order to save memory.
|
double[] |
distributionForInstance(Instance instance)
Returns class probabilities for a weighted instance.
|
protected ClassifierDecList |
getNewDecList(Instances train,
boolean leaf)
Returns a newly created tree.
|
String |
getRevision()
Returns the revision string.
|
protected double |
getSizeOfBranch()
Returns the number of instances covered by a branch
|
protected ClassifierSplitModel |
localModel()
Method just exists to make program easier to read.
|
protected ClassifierDecList |
son(int index)
Method just exists to make program easier to read.
|
String |
toString()
Prints rules.
|
double |
weight(Instance instance)
Returns the weight a rule assigns to an instance.
|
protected int m_minNumObj
protected static EntropySplitCrit m_splitCrit
protected ModelSelection m_toSelectModel
protected ClassifierSplitModel m_localModel
protected ClassifierDecList[] m_sons
protected boolean m_isLeaf
protected boolean m_isEmpty
protected Instances m_train
protected Distribution m_test
protected int indeX
public ClassifierDecList(ModelSelection toSelectLocModel, int minNum)
public void buildRule(Instances data) throws Exception
Exception
- if something goes wrongpublic void buildDecList(Instances data, boolean leaf) throws Exception
Exception
- if something goes wrongpublic double classifyInstance(Instance instance) throws Exception
Exception
- if something goes wrongpublic final double[] distributionForInstance(Instance instance) throws Exception
Exception
- if something goes wrongpublic double weight(Instance instance) throws Exception
Exception
- if something goes wrongpublic final void cleanup(Instances justHeaderInfo)
protected ClassifierDecList getNewDecList(Instances train, boolean leaf) throws Exception
Exception
- if something goes wrongpublic final int chooseIndex()
public final int chooseLastIndex()
protected double getSizeOfBranch()
protected ClassifierSplitModel localModel()
protected ClassifierDecList son(int index)
public String getRevision()
getRevision
in interface RevisionHandler
Copyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.