|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.classifiers.Classifier | +--weka.classifiers.trees.UserClassifier
Class for generating an user defined decision tree. For more info see
Ware M., Frank E., Holmes G., Hall M. and Witten I.H. (2000). interactive machine learning - letting users build classifiers, Working Paper 00/4, Department of Computer Science, University of Waikato; March. Also available online at http://www.cs.waikato.ac.nz/~ml/publications/2000/ 00MW-etal-Interactive-ML.ps.
Field Summary |
Fields inherited from interface weka.core.Drawable |
BayesNet, NOT_DRAWABLE, TREE |
Constructor Summary | |
UserClassifier()
Constructor |
Method Summary | |
void |
buildClassifier(Instances i)
Call this function to build a decision tree for the training data provided. |
double[] |
distributionForInstance(Instance i)
Call this function to get a double array filled with the probability of how likely each class type is the class of the instance. |
java.lang.String |
globalInfo()
This will return a string describing the classifier. |
java.lang.String |
graph()
Returns a string that describes a graph representing the object. |
int |
graphType()
Returns the type of graph this classifier represents. |
static void |
main(java.lang.String[] argv)
Main method for testing this class. |
java.lang.String |
toString()
|
void |
userCommand(TreeDisplayEvent e)
Receives user choices from the tree view, and then deals with these choices. |
void |
userDataEvent(VisualizePanelEvent e)
This receives shapes from the data view. |
Methods inherited from class weka.classifiers.Classifier |
classifyInstance, debugTipText, forName, getDebug, getOptions, listOptions, makeCopies, setDebug, setOptions |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public UserClassifier()
Method Detail |
public static void main(java.lang.String[] argv)
argv
- should contain command line options (see setOptions)public java.lang.String toString()
toString
in class java.lang.Object
public void userCommand(TreeDisplayEvent e)
userCommand
in interface TreeDisplayListener
e
- The choice.public void userDataEvent(VisualizePanelEvent e)
userDataEvent
in interface VisualizePanelListener
e
- Contains the shapes, and other info.public int graphType()
graphType
in interface Drawable
public java.lang.String graph() throws java.lang.Exception
Drawable
graph
in interface Drawable
java.lang.Exception
- if String can't be built properly.public java.lang.String globalInfo()
public void buildClassifier(Instances i) throws java.lang.Exception
buildClassifier
in class Classifier
i
- The training data.
java.lang.Exception
- if can't build classification properly.public double[] distributionForInstance(Instance i) throws java.lang.Exception
distributionForInstance
in class Classifier
i
- The instance to classify.
java.lang.Exception
- if can't classify instance.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London