Explorer+error+visualization+plugins

toc

= Introduction = As of Weka version >3.5.8 (only developer version, not stable-3.6 branch) one can easily add graph visualization plugins in the Explorer (Classify panel). This makes it easy to implement custom visualizations, if the ones Weka offers are not sufficient.


 * Note:** This is also covered in chapter //Extending WEKA// of the WEKA manual in versions later than 3.7.0 or snapshots of the developer version later than 10/01/2010.

= Requirements = > >
 * custom visualization class must implement the following **interface**
 * the class must **either** reside in the following **package** (visualization classes are automatically discovered during run-time)
 * or the class' package must be listed in the key of the  file.

= Implementation = The visualization interface contains the following four methods > This method returns the //minimal// version (inclusive) of Weka that is necessary to execute the plugin, e.g.,. > This method returns the //maximal// version (exclusive) of Weka that is necessary to execute the plugin, e.g.,. > Returns the actual version of Weka this plugin was designed for, e.g., > The that is returned via this method will be added to the plugins menu in the popup in the Explorer. The ActionListener for clicking the menu item will most likely open a new frame containing the visualized data.
 * **getMinVersion**
 * **getMaxVersion**
 * **getDesignVersion**
 * **getVisualizeMenuItem**

= Examples = The following screenshots were generated using with default parameters on the UCI dataset //bolts//, using a percentage split of 66% for the training set and the remainder for testing.

Using Weka panels
The example simply displays the classifier errors as the //Visualize classifier errors// menu item already available in Weka. It is just to demonstrate how to use existing Weka classes.



Using JMathtools' Boxplot
The example uses the [|JMathTools] library (needs the  in the CLASSPATH) to display a boxplot (the width of the boxes is 0, to make it look like an error plot). The relative error per prediction is displayed as vertical line.




 * Note:** This display is only available for numeric classes.

= Downloads =
 * [[file:ClassifierErrorsWeka.java]]
 * [[file:ClassifierErrorsMathtools.java]]

= See also =
 * Use Weka in your Java code - general overview of the basic Weka API
 * Explorer visualization plugins

= Links =
 * [|JMathTools homepage]