adams.flow.sink
Class WekaClassifierErrors.DataGenerator

java.lang.Object
  extended by adams.flow.sink.WekaClassifierErrors.DataGenerator
Enclosing class:
WekaClassifierErrors

public static class WekaClassifierErrors.DataGenerator
extends Object

Helper class for generating visualization data.

Version:
$Revision: 5737 $
Author:
fracpete (fracpete at waikato dot ac dot nz)

Field Summary
protected  AbstractErrorScaler m_ErrorScaler
          the scaler scheme to use.
protected  weka.classifiers.Evaluation m_Evaluation
          the underlying Evaluation object.
protected  weka.core.Instances m_PlotInstances
          the underlying data.
protected  weka.core.FastVector m_PlotShapes
          for storing the plot shapes.
protected  weka.core.FastVector m_PlotSizes
          for storing the plot sizes.
protected  boolean m_Processed
          whether the data has already been processed.
 
Constructor Summary
WekaClassifierErrors.DataGenerator(weka.classifiers.Evaluation eval, AbstractErrorScaler scaler)
          Initializes the generator.
 
Method Summary
protected  void createDataset(weka.classifiers.Evaluation eval)
          Generates a dataset, containing the predicted vs actual values.
 AbstractErrorScaler getErrorScaler()
          Returns the scaling scheme.
 weka.classifiers.Evaluation getEvaluation()
          Returns the underlying Evaluation object.
 weka.gui.visualize.PlotData2D getPlotData()
          Assembles and returns the plot.
 weka.core.Instances getPlotInstances()
          Returns the generated dataset that is plotted.
protected  void process()
          Processes the data if necessary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_Evaluation

protected weka.classifiers.Evaluation m_Evaluation
the underlying Evaluation object.


m_PlotInstances

protected weka.core.Instances m_PlotInstances
the underlying data.


m_PlotShapes

protected weka.core.FastVector m_PlotShapes
for storing the plot shapes.


m_PlotSizes

protected weka.core.FastVector m_PlotSizes
for storing the plot sizes.


m_ErrorScaler

protected AbstractErrorScaler m_ErrorScaler
the scaler scheme to use.


m_Processed

protected boolean m_Processed
whether the data has already been processed.

Constructor Detail

WekaClassifierErrors.DataGenerator

public WekaClassifierErrors.DataGenerator(weka.classifiers.Evaluation eval,
                                          AbstractErrorScaler scaler)
Initializes the generator.

Parameters:
eval - the Evaluation object to use
scaler - the scaler scheme to use for the errors
Method Detail

process

protected void process()
Processes the data if necessary.


getEvaluation

public weka.classifiers.Evaluation getEvaluation()
Returns the underlying Evaluation object.

Returns:
the Evaluation object

getErrorScaler

public AbstractErrorScaler getErrorScaler()
Returns the scaling scheme.

Returns:
the scaler

getPlotInstances

public weka.core.Instances getPlotInstances()
Returns the generated dataset that is plotted.

Returns:
the dataset

createDataset

protected void createDataset(weka.classifiers.Evaluation eval)
Generates a dataset, containing the predicted vs actual values.

Parameters:
eval - for obtaining the dataset information and predictions

getPlotData

public weka.gui.visualize.PlotData2D getPlotData()
                                          throws Exception
Assembles and returns the plot. The relation name of the dataset gets added automatically.

Returns:
the plot
Throws:
Exception - if plot generation fails


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.