|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.classifiers.j48.ClassifierDecList
Class for handling a rule (partial tree) for a decision list.
Field Summary | |
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 ClassifierDecList[] |
m_sons
References to sons. |
protected Distribution |
m_test
The pruning instances. |
protected ModelSelection |
m_toSelectModel
The model selection method. |
protected Instances |
m_train
The training instances. |
Constructor Summary | |
ClassifierDecList(ModelSelection toSelectLocModel)
Constructor - just calls constructor of class DecList. |
Method Summary | |
void |
buildDecList(Instances data,
boolean leaf)
Builds the partial tree without hold out set. |
void |
buildDecList(Instances train,
Instances test,
boolean leaf)
Builds the partial tree with hold out set |
protected int |
chooseIndex()
Dummy method. |
protected int |
chooseLastIndex()
Dummy method. |
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. |
protected ClassifierDecList |
getNewDecList(Instances train,
Instances test,
boolean leaf)
Returns a newly created tree. |
protected void |
pruneEnd()
Dummy method. |
java.lang.String |
toString()
Prints rules. |
double |
weight(Instance instance)
Returns the weight a rule assigns to an instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
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
Constructor Detail |
public ClassifierDecList(ModelSelection toSelectLocModel)
Method Detail |
public void buildDecList(Instances data, boolean leaf) throws java.lang.Exception
java.lang.Exception
- if something goes wrongpublic void buildDecList(Instances train, Instances test, boolean leaf) throws java.lang.Exception
java.lang.Exception
- if something goes wrongpublic double classifyInstance(Instance instance) throws java.lang.Exception
java.lang.Exception
- if something goes wrongpublic final double[] distributionForInstance(Instance instance) throws java.lang.Exception
java.lang.Exception
- if something goes wrongpublic double weight(Instance instance) throws java.lang.Exception
java.lang.Exception
- if something goes wrongpublic final void cleanup(Instances justHeaderInfo)
public java.lang.String toString()
toString
in class java.lang.Object
protected ClassifierDecList getNewDecList(Instances train, boolean leaf) throws java.lang.Exception
java.lang.Exception
- if something goes wrongprotected ClassifierDecList getNewDecList(Instances train, Instances test, boolean leaf) throws java.lang.Exception
java.lang.Exception
- if something goes wrongprotected int chooseLastIndex()
protected int chooseIndex()
protected void pruneEnd() throws java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |