All Packages Class Hierarchy This Package Previous Next Index WEKA's home
Class weka.classifiers.UserClassifier
java.lang.Object
|
+----weka.classifiers.Classifier
|
+----weka.classifiers.DistributionClassifier
|
+----weka.classifiers.UserClassifier
- public class UserClassifier
- extends DistributionClassifier
- implements Drawable, TreeDisplayListener, VisualizePanelListener
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.
- Version:
- $Revision: 1.8 $
- Author:
- Malcolm Ware (mfw4@cs.waikato.ac.nz)
UserClassifier()
- Constructor
buildClassifier(Instances)
- Call this function to build a decision tree for the training
data provided.
distributionForInstance(Instance)
- Call this function to get a double array filled with the probability
of how likely each class type is the class of the instance.
globalInfo()
- This will return a string describing the classifier.
graph()
-
main(String[])
- Main method for testing this class.
toString()
-
userCommand(TreeDisplayEvent)
- Receives user choices from the tree view, and then deals with these
choices.
userDataEvent(VisualizePanelEvent)
- This receives shapes from the data view.
UserClassifier
public UserClassifier()
Constructor
main
public static void main(java.lang.String argv[])
Main method for testing this class.
- Parameters:
argv
- should contain command line options (see setOptions)
toString
public java.lang.String toString()
- Returns:
- a string that represents this objects tree.
- Overrides:
- toString in class java.lang.Object
userCommand
public void userCommand(TreeDisplayEvent e)
Receives user choices from the tree view, and then deals with these
choices.
- Parameters:
e
- The choice.
userDataEvent
public void userDataEvent(VisualizePanelEvent e)
This receives shapes from the data view.
It then enters these shapes into the decision tree structure.
- Parameters:
e
- Contains the shapes, and other info.
graph
public java.lang.String graph() throws java.lang.Exception
- Returns:
- A string formatted with a dotty representation of the decision
tree.
- Throws:
- java.lang.Exception - if String can't be built properly.
globalInfo
public java.lang.String globalInfo()
This will return a string describing the classifier.
- Returns:
- The string.
buildClassifier
public void buildClassifier(Instances i) throws java.lang.Exception
Call this function to build a decision tree for the training
data provided.
- Parameters:
i
- The training data.
- Throws:
- java.lang.Exception - if can't build classification properly.
- Overrides:
- buildClassifier in class Classifier
distributionForInstance
public double[] distributionForInstance(Instance i) throws java.lang.Exception
Call this function to get a double array filled with the probability
of how likely each class type is the class of the instance.
- Parameters:
i
- The instance to classify.
- Returns:
- A double array filled with the probalities of each class type.
- Throws:
- java.lang.Exception - if can't classify instance.
- Overrides:
- distributionForInstance in class DistributionClassifier
All Packages Class Hierarchy This Package Previous Next Index WEKA's home