|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
weka.gui.boundaryvisualizer.BoundaryVisualizer
public class BoundaryVisualizer
BoundaryVisualizer. Allows the visualization of classifier decision boundaries in two dimensions. A supplied classifier is first trained on supplied training data, then a data generator (currently using kernels) is used to generate new instances at points fixed in the two visualization dimensions but random in the other dimensions. These instances are classified by the classifier and plotted as points with colour corresponding to the probability distribution predicted by the classifier. At present, 2 * 2^(# non-fixed dimensions) points are generated from each kernel per pixel in the display. In practice, fewer points than this are actually classified because kernels are weighted (on a per-pixel basis) according to the fixexd dimensions and kernels corresponding to the lowest 1% of the weight mass are discarded. Predicted probability distributions are weighted (acording to the fixed visualization dimensions) and averaged to produce an RGB value for the pixel. For more information, see
Eibe Frank and Mark Hall (2003). Visualizing Class Probability Estimators. Working Paper 02/03, Department of Computer Science, University of Waikato.
JPanel
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.BaselineResizeBehavior |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
BoundaryVisualizer()
Creates a new BoundaryVisualizer instance. |
Method Summary | |
---|---|
static void |
createNewVisualizerWindow(Classifier classifier,
Instances instances)
Creates a new GUI window with all of the BoundaryVisualizer trappings, |
static boolean |
getExitIfNoWindowsOpen()
Gets whether System.exit gets called after the last window gets closed |
Instances |
getInstances()
Get the training instances |
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. |
String |
globalInfo()
Returns a string describing this tool |
static void |
main(String[] args)
Main method for testing this class |
void |
plotTrainingData()
Plots the training data on-screen. |
void |
setClassifier(Classifier newClassifier)
Set a classifier to use |
static void |
setExitIfNoWindowsOpen(boolean value)
Sets whether System.exit gets called when no more windows are open. |
void |
setInstances(Instances inst)
Set the training instances |
void |
setInstancesFromFileQ()
Queries the user for a file to load instances from, then loads the instances in a background process. |
int |
setUpBoundaryPanel()
Sets up the BoundaryPanel object so that it is ready for plotting. |
void |
stopPlotting()
Stops the plotting thread. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BoundaryVisualizer()
BoundaryVisualizer
instance.
Method Detail |
---|
public String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public void setClassifier(Classifier newClassifier) throws Exception
newClassifier
- the classifier to use
Exception
- if an error occurspublic Instances getInstances()
public void setInstances(Instances inst) throws Exception
inst
- the instances to use
Exception
public void setInstancesFromFileQ()
public int setUpBoundaryPanel() throws Exception
Exception
public void plotTrainingData() throws Exception
Exception
public void stopPlotting()
public static void setExitIfNoWindowsOpen(boolean value)
value
- if TRUE then a System.exit call is ossued after the
last window gets closed.public static boolean getExitIfNoWindowsOpen()
public static void createNewVisualizerWindow(Classifier classifier, Instances instances) throws Exception
classifier
- The classifier to use in the new window. May be null.instances
- The dataset to visualize on in the new window. May be null.
Exception
public static void main(String[] args)
args
- a String[]
value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |