Package weka.gui.explorer

# Class AbstractPlotInstances

java.lang.Object
weka.gui.explorer.AbstractPlotInstances

All Implemented Interfaces:
  `Serializable`, `OptionHandler`

Direct Known Subclasses:
  `ClassifierErrorsPlotInstances`, `ClustererAssignmentsPlotInstances`

public abstract class AbstractPlotInstances extends Object implements Serializable, OptionHandler
Abstract superclass for generating plottable instances.

Version:
  $Revision: 10220 $
Author:
  fracpete (fracpete at waikato dot ac dot nz)
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractPlotInstances()`
  Initializes the container.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `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.
  `Instances`
  `getInstances()`
  Returns the training data.
  `String[]`
  `getOptions()`
  Gets the current option settings for the OptionHandler.
  `PlotData2D`
  `getPlotData(String name)`
  Assembles and returns the plot.
  `Instances`
  `getPlotInstances()`
  Returns the generated plot instances.
  `Enumeration<Option>`
  `listOptions()`
  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.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AbstractPlotInstances

    public AbstractPlotInstances()
    Initializes the container.

- ## Method Details

  - ### listOptions

    public Enumeration<Option> listOptions()
    Returns an enumeration of all the available options.
    Specified by:
      `listOptions` in interface `OptionHandler`
    Returns:
      an enumeration of all available options.

  - ### setOptions

    public void setOptions(String[] options) throws Exception
    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 interface `OptionHandler`
    Parameters:
      `options` - the list of options as an array of strings
    Throws:
      `Exception` - if an option is not supported

  - ### getOptions

    public String[] getOptions()
    Gets the current option settings for the OptionHandler.
    Specified by:
      `getOptions` in interface `OptionHandler`
    Returns:
      the list of current option settings as an array of strings

  - ### setInstances

    public void setInstances(Instances value)
    Sets the instances that are the basis for the plot instances.
    Parameters:
      `value` - the training data to initialize with

  - ### getInstances

    public Instances 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

    public Instances getPlotInstances()
    Returns the generated plot instances.
    Returns:
      the instances to plot

  - ### getPlotData

    public PlotData2D getPlotData(String name) throws Exception
    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!