All Packages Class Hierarchy This Package Previous Next Index WEKA's home
Class weka.gui.boundaryvisualizer.BoundaryPanel
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----javax.swing.JComponent
|
+----javax.swing.JPanel
|
+----weka.gui.boundaryvisualizer.BoundaryPanel
- public class BoundaryPanel
- extends javax.swing.JPanel
BoundaryPanel. A class to handle the plotting operations
associated with generating a 2D picture of a classifier's decision
boundaries.
- Since:
- 1.0
- Version:
- $Revision: 1.17 $
- Author:
- Mark Hall
- See Also:
- javax.swing.JPanel
DEFAULT_COLORS-
BoundaryPanel(int, int)
- Creates a new
BoundaryPanel instance.
addActionListener(ActionListener)
- Register a listener to be notified when plotting completes
getColors()
- Get the current vector of Color objects used for the classes
getGeneratorSamplesBase()
- Get the base used for computing the number of samples to obtain from
each generator
getNumSamplesPerRegion()
- Get the number of points to sample from a region (fixed dimensions).
getPlotTrainingData()
- Returns true if training data is to be superimposed
main(String[])
- Main method for testing this class
removeActionListener(ActionListener)
- Remove a listener
replot()
- Quickly replot the display using cached probability estimates
setClassifier(DistributionClassifier)
- Set the classifier to use.
setColors(FastVector)
- Set a vector of Color objects for the classes
setDataGenerator(DataGenerator)
- Set the data generator to use for generating new instances
setGeneratorSamplesBase(double)
- Set the base for computing the number of samples to obtain from each
generator.
setNumSamplesPerRegion(int)
- Set the number of points to uniformly sample from a region (fixed
dimensions).
setPlotTrainingData(boolean)
- Set whether to superimpose the training data
plot
setTrainingData(Instances)
- Set the training data to use
setXAttribute(int)
- Set the x attribute index
setYAttribute(int)
- Set the y attribute index
start()
- Start the plotting thread
stopPlotting()
- Stop the plotting thread
DEFAULT_COLORS
public static final java.awt.Color[] DEFAULT_COLORS
BoundaryPanel
public BoundaryPanel(int panelWidth,
int panelHeight)
Creates a new BoundaryPanel instance.
- Parameters:
panelWidth - the width in pixels of the panel
panelHeight - the height in pixels of the panel
setNumSamplesPerRegion
public void setNumSamplesPerRegion(int num)
Set the number of points to uniformly sample from a region (fixed
dimensions).
- Parameters:
num - an int value
getNumSamplesPerRegion
public int getNumSamplesPerRegion()
Get the number of points to sample from a region (fixed dimensions).
- Returns:
- an
int value
setGeneratorSamplesBase
public void setGeneratorSamplesBase(double ksb)
Set the base for computing the number of samples to obtain from each
generator. number of samples = base ^ (# non fixed dimensions)
- Parameters:
ksb - a double value
getGeneratorSamplesBase
public double getGeneratorSamplesBase()
Get the base used for computing the number of samples to obtain from
each generator
- Returns:
- a
double value
stopPlotting
public void stopPlotting()
Stop the plotting thread
start
public void start() throws java.lang.Exception
Start the plotting thread
- Throws:
- java.lang.Exception - if an error occurs
setTrainingData
public void setTrainingData(Instances trainingData) throws java.lang.Exception
Set the training data to use
- Parameters:
trainingData - the training data
- Throws:
- java.lang.Exception - if an error occurs
addActionListener
public void addActionListener(java.awt.event.ActionListener newListener)
Register a listener to be notified when plotting completes
- Parameters:
newListener - the listener to add
removeActionListener
public void removeActionListener(java.awt.event.ActionListener removeListener)
Remove a listener
- Parameters:
removeListener - the listener to remove
setClassifier
public void setClassifier(DistributionClassifier classifier)
Set the classifier to use.
- Parameters:
classifier - the classifier to use
setDataGenerator
public void setDataGenerator(DataGenerator dataGenerator)
Set the data generator to use for generating new instances
- Parameters:
dataGenerator - the data generator to use
setXAttribute
public void setXAttribute(int xatt) throws java.lang.Exception
Set the x attribute index
- Parameters:
xatt - index of the attribute to use on the x axis
- Throws:
- java.lang.Exception - if an error occurs
setYAttribute
public void setYAttribute(int yatt) throws java.lang.Exception
Set the y attribute index
- Parameters:
yatt - index of the attribute to use on the y axis
- Throws:
- java.lang.Exception - if an error occurs
setColors
public void setColors(FastVector colors)
Set a vector of Color objects for the classes
- Parameters:
colors - a FastVector value
setPlotTrainingData
public void setPlotTrainingData(boolean pg)
Set whether to superimpose the training data
plot
- Parameters:
pg - a boolean value
getPlotTrainingData
public boolean getPlotTrainingData()
Returns true if training data is to be superimposed
- Returns:
- a
boolean value
getColors
public FastVector getColors()
Get the current vector of Color objects used for the classes
- Returns:
- a
FastVector value
replot
public void replot()
Quickly replot the display using cached probability estimates
main
public static void main(java.lang.String args[])
Main method for testing this class
- Parameters:
args - a String[] value
All Packages Class Hierarchy This Package Previous Next Index WEKA's home