Package weka.gui.explorer
Class AbstractPlotInstances
java.lang.Object
weka.gui.explorer.AbstractPlotInstances
- All Implemented Interfaces:
Serializable
,OptionHandler
- Direct Known Subclasses:
ClassifierErrorsPlotInstances
,ClustererAssignmentsPlotInstances
Abstract superclass for generating plottable instances.
- Version:
- $Revision: 10220 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canPlot
(boolean setup) Returns whether all the data is available and the plot instances can be used for plotting.void
cleanUp()
For freeing up memory.Returns the training data.String[]
Gets the current option settings for the OptionHandler.getPlotData
(String name) Assembles and returns the plot.Returns the generated plot instances.Returns an enumeration of all the available options.void
setInstances
(Instances value) Sets the instances that are the basis for the plot instances.void
setOptions
(String[] options) Sets the OptionHandler's options using the given list.void
setUp()
Performs checks, sets up the structure for the plot instances.
-
Constructor Details
-
AbstractPlotInstances
public AbstractPlotInstances()Initializes the container.
-
-
Method Details
-
listOptions
Returns an enumeration of all the available options.- Specified by:
listOptions
in interfaceOptionHandler
- Returns:
- an enumeration of all available options.
-
setOptions
Sets the OptionHandler's options using the given list. All options will be set (or reset) during this call (i.e. incremental setting of options is not possible).- Specified by:
setOptions
in interfaceOptionHandler
- Parameters:
options
- the list of options as an array of strings- Throws:
Exception
- if an option is not supported
-
getOptions
Gets the current option settings for the OptionHandler.- Specified by:
getOptions
in interfaceOptionHandler
- Returns:
- the list of current option settings as an array of strings
-
setInstances
Sets the instances that are the basis for the plot instances.- Parameters:
value
- the training data to initialize with
-
getInstances
Returns the training data.- Returns:
- the training data
-
setUp
public void setUp()Performs checks, sets up the structure for the plot instances. -
canPlot
public boolean canPlot(boolean setup) Returns whether all the data is available and the plot instances can be used for plotting.- Parameters:
setup
- whether to call setup as well- Returns:
- true if operational for plotting
-
getPlotInstances
Returns the generated plot instances.- Returns:
- the instances to plot
-
getPlotData
Assembles and returns the plot. The relation name of the dataset gets added automatically.- Parameters:
name
- the name of the plot- Returns:
- the plot
- Throws:
Exception
- if plot generation fails
-
cleanUp
public void cleanUp()For freeing up memory. Plot data cannot be generated after this call!
-