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.

Author:
Malcolm Ware (mfw4@cs.waikato.ac.nz)

Constructor Index

 o UserClassifier()
Constructor

Method Index

 o buildClassifier(Instances)
Call this function to build a decision tree for the training data provided.
 o 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.
 o globalInfo()
This will return a string describing the classifier.
 o graph()
 o main(String[])
Main method for testing this class.
 o toString()
 o userCommand(TreeDisplayEvent)
Receives user choices from the tree view, and then deals with these choices.
 o userDataEvent(VisualizePanelEvent)
This receives shapes from the data view.

Constructors

 o UserClassifier
 public UserClassifier()
Constructor

Methods

 o main
 public static void main(String argv[])
Main method for testing this class.

Parameters:
argv - should contain command line options (see setOptions)
 o toString
 public String toString()
Returns:
a string that represents this objects tree.
Overrides:
toString in class Object
 o userCommand
 public void userCommand(TreeDisplayEvent e)
Receives user choices from the tree view, and then deals with these choices.

Parameters:
e - The choice.
 o 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.
 o graph
 public String graph() throws Exception
Returns:
A string formatted with a dotty representation of the decision tree.
Throws: Exception
if String can't be built properly.
 o globalInfo
 public String globalInfo()
This will return a string describing the classifier.

Returns:
The string.
 o buildClassifier
 public void buildClassifier(Instances i) throws Exception
Call this function to build a decision tree for the training data provided.

Parameters:
i - The training data.
Throws: Exception
if can't build classification properly.
Overrides:
buildClassifier in class Classifier
 o distributionForInstance
 public double[] distributionForInstance(Instance i) throws 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: Exception
if can't classify instance.
Overrides:
distributionForInstance in class DistributionClassifier

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home