com.rapidminer.operator.performance
Class AreaUnderCurve

java.lang.Object
  extended by com.rapidminer.operator.AbstractIOObject
      extended by com.rapidminer.operator.ResultObjectAdapter
          extended by com.rapidminer.tools.math.Averagable
              extended by com.rapidminer.operator.performance.PerformanceCriterion
                  extended by com.rapidminer.operator.performance.MeasuredPerformance
                      extended by com.rapidminer.operator.performance.AreaUnderCurve
All Implemented Interfaces:
IOObject, ResultObject, Saveable, Readable, Renderable, Reportable, LoggingHandler, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<PerformanceCriterion>

public class AreaUnderCurve
extends MeasuredPerformance
implements Renderable

This criterion calculates the area under the ROC curve.

Author:
Ingo Mierswa, Martin Scholz
See Also:
Serialized Form

Constructor Summary
AreaUnderCurve()
          Clone constructor.
AreaUnderCurve(AreaUnderCurve aucObject)
           
 
Method Summary
 void buildSingleAverage(Averagable performance)
          This method should build the average of this and another averagable of the same type.
 void countExample(Example example)
          Does nothing.
 void finishRendering()
          Will be invoked directly after rendering and gives the object the chance to perform some clean-up.
 java.lang.String getDescription()
          Returns a description of the performance criterion.
 double getExampleCount()
          Returns the number of data points which was used to determine the criterion value.
 double getFitness()
          Returns the fitness.
 double getMikroAverage()
          Returns the (current) value of the averagable (the average itself).
 double getMikroVariance()
          Returns the variance of the averagable.
 java.lang.String getName()
          Returns the name of this averagable.
 int getRenderHeight(int preferredHeight)
          This method return the pixel height the rendering needs
 int getRenderWidth(int preferredWidth)
          This method returns the pixel width the rendering needs
 java.awt.Component getVisualizationComponent(IOContainer ioContainer)
          This implementation returns a confusion matrix viewer based on a JTable.
 void prepareRendering()
          Will be invoked before rendering and even before render width and height retrieval.
 void render(java.awt.Graphics graphics, int width, int height)
          This method paints the visual representation onto the given graphics
 void startCounting(ExampleSet exampleSet, boolean useExampleWeights)
          Calculates the AUC.
 java.lang.String toString()
           
 
Methods inherited from class com.rapidminer.operator.performance.MeasuredPerformance
startCounting
 
Methods inherited from class com.rapidminer.operator.performance.PerformanceCriterion
compareTo, getMaxFitness
 
Methods inherited from class com.rapidminer.tools.math.Averagable
buildAverage, clone, cloneAveragable, formatPercent, getAverage, getAverageCount, getExtension, getFileDescription, getMakroAverage, getMakroStandardDeviation, getMakroVariance, getMikroStandardDeviation, getStandardDeviation, getVariance, setAverageCount
 
Methods inherited from class com.rapidminer.operator.ResultObjectAdapter
addAction, getActions, getResultIcon, isSavable, log, logError, logNote, logWarning, save, toHTML, toResultString
 
Methods inherited from class com.rapidminer.operator.AbstractIOObject
copy, getLog, getSource, initWriting, read, setLoggingHandler, setSource, write
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.rapidminer.operator.IOObject
copy, getLog, getSource, setLoggingHandler, setSource, write
 

Constructor Detail

AreaUnderCurve

public AreaUnderCurve()
Clone constructor.


AreaUnderCurve

public AreaUnderCurve(AreaUnderCurve aucObject)
Method Detail

startCounting

public void startCounting(ExampleSet exampleSet,
                          boolean useExampleWeights)
                   throws OperatorException
Calculates the AUC.

Overrides:
startCounting in class MeasuredPerformance
Throws:
OperatorException

countExample

public void countExample(Example example)
Does nothing. Everything is done in startCounting(ExampleSet, boolean).

Specified by:
countExample in class MeasuredPerformance

getExampleCount

public double getExampleCount()
Description copied from class: PerformanceCriterion
Returns the number of data points which was used to determine the criterion value. If the criterion does not use example weights (or no weight was given) then the returned value will be an integer. Otherwise, the returned value is the sum of all example weights.

Specified by:
getExampleCount in class PerformanceCriterion

getMikroVariance

public double getMikroVariance()
Description copied from class: Averagable
Returns the variance of the averagable. The returned value must not be negative. If the averagable does not define a variance this method should return Double.NaN.

Specified by:
getMikroVariance in class Averagable

getMikroAverage

public double getMikroAverage()
Description copied from class: Averagable
Returns the (current) value of the averagable (the average itself). If the method Averagable.buildSingleAverage(Averagable) was used, this method must return the micro average from both (or more) criteria. This is usually achieved by correctly implementing Averagable.buildSingleAverage(Averagable).

Specified by:
getMikroAverage in class Averagable

getFitness

public double getFitness()
Returns the fitness.

Specified by:
getFitness in class PerformanceCriterion

getName

public java.lang.String getName()
Description copied from class: Averagable
Returns the name of this averagable. The returned string should only contain lowercase letters and underscore (RapidMiner parameter format) since the names will be automatically used for GUI purposes.

Specified by:
getName in interface ResultObject
Specified by:
getName in class Averagable

getDescription

public java.lang.String getDescription()
Description copied from class: PerformanceCriterion
Returns a description of the performance criterion. This description is used for GUI purposes and automatic parameter type creation for the PerformanceEvaluator operator.

Specified by:
getDescription in class PerformanceCriterion

buildSingleAverage

public void buildSingleAverage(Averagable performance)
Description copied from class: Averagable
This method should build the average of this and another averagable of the same type. The next invocation of Averagable.getMikroAverage() should return the average of this and the given averagable. Hence, this method is used to build the actual micro average value of two criteria. Please refer to SimpleCriterion for a simple implementation example.

Specified by:
buildSingleAverage in class Averagable

getVisualizationComponent

public java.awt.Component getVisualizationComponent(IOContainer ioContainer)
This implementation returns a confusion matrix viewer based on a JTable.

Specified by:
getVisualizationComponent in interface ResultObject
Overrides:
getVisualizationComponent in class Averagable

toString

public java.lang.String toString()
Specified by:
toString in interface Readable
Overrides:
toString in class Averagable

prepareRendering

public void prepareRendering()
Description copied from interface: Renderable
Will be invoked before rendering and even before render width and height retrieval.

Specified by:
prepareRendering in interface Renderable

finishRendering

public void finishRendering()
Description copied from interface: Renderable
Will be invoked directly after rendering and gives the object the chance to perform some clean-up.

Specified by:
finishRendering in interface Renderable

getRenderHeight

public int getRenderHeight(int preferredHeight)
Description copied from interface: Renderable
This method return the pixel height the rendering needs

Specified by:
getRenderHeight in interface Renderable
Parameters:
preferredHeight - tells the renderable of the size it should deliver best
Returns:
the pixel height

getRenderWidth

public int getRenderWidth(int preferredWidth)
Description copied from interface: Renderable
This method returns the pixel width the rendering needs

Specified by:
getRenderWidth in interface Renderable
Parameters:
preferredWidth - tells the renderable of the size it should deliver best
Returns:
the pixel width

render

public void render(java.awt.Graphics graphics,
                   int width,
                   int height)
Description copied from interface: Renderable
This method paints the visual representation onto the given graphics

Specified by:
render in interface Renderable
Parameters:
graphics - the graphics to render onto


Copyright © 2001-2009 by Rapid-I