public class UserClassifier extends Classifier implements Drawable, TreeDisplayListener, VisualizePanelListener, TechnicalInformationHandler
@article{Ware2001, author = {Malcolm Ware and Eibe Frank and Geoffrey Holmes and Mark Hall and Ian H. Witten}, journal = {Int. J. Hum.-Comput. Stud.}, number = {3}, pages = {281-292}, title = {Interactive machine learning: letting users build classifiers}, volume = {55}, year = {2001}, PS = {http://www.cs.waikato.ac.nz/\~ml/publications/2000/00MW-etal-Interactive-ML.ps} }Valid options are:
-D If set, classifier is run in debug mode and may output additional info to the console
BayesNet, Newick, NOT_DRAWABLE, TREE
Constructor and Description |
---|
UserClassifier()
Constructor
|
Modifier and Type | Method and Description |
---|---|
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.
|
Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
java.lang.String |
getRevision()
Returns the revision string.
|
TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing
detailed information about the technical background of this class,
e.g., paper reference or book this class is based on.
|
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.
|
classifyInstance, debugTipText, forName, getDebug, getOptions, listOptions, makeCopies, makeCopy, setDebug, setOptions
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()
public java.lang.String graph() throws java.lang.Exception
Drawable
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class Classifier
Capabilities
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.public java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class Classifier