com.rapidminer.operator.performance
Class PredictionAverage

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.PredictionAverage
All Implemented Interfaces:
IOObject, ResultObject, Readable, Reportable, LoggingHandler, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<PerformanceCriterion>

public class PredictionAverage
extends MeasuredPerformance

Returns the average value of the prediction. This criterion can be used to detect whether a learning scheme predicts nonsense, e.g. always make the same error. This criterion is not suitable for evaluating the performance and should never be used as main criterion. The getFitness() method always returns 0.

Author:
Ingo Mierswa Exp $
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.rapidminer.operator.AbstractIOObject
AbstractIOObject.InputStreamProvider
 
Constructor Summary
PredictionAverage()
           
PredictionAverage(PredictionAverage pa)
           
 
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)
          Counts a single example, e.g. by summing up errors.
 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 0.
 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.
 void startCounting(ExampleSet set, boolean useExampleWeights)
          Initializes the criterion.
 
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, isInTargetEncoding, setAverageCount, toString
 
Methods inherited from class com.rapidminer.operator.ResultObjectAdapter
addAction, getActions, getAnnotations, getResultIcon, log, log, logError, logNote, logWarning, toHTML, toResultString
 
Methods inherited from class com.rapidminer.operator.AbstractIOObject
appendOperatorToHistory, copy, getLog, getProcessingHistory, getSource, initWriting, read, read, read, 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
appendOperatorToHistory, copy, getLog, getProcessingHistory, getSource, setLoggingHandler, setSource, write
 

Constructor Detail

PredictionAverage

public PredictionAverage()

PredictionAverage

public PredictionAverage(PredictionAverage pa)
Method Detail

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

countExample

public void countExample(Example example)
Description copied from class: MeasuredPerformance
Counts a single example, e.g. by summing up errors.

Specified by:
countExample in class MeasuredPerformance

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

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

startCounting

public void startCounting(ExampleSet set,
                          boolean useExampleWeights)
                   throws OperatorException
Description copied from class: MeasuredPerformance
Initializes the criterion. The default implementation does nothing.

Overrides:
startCounting in class MeasuredPerformance
Throws:
OperatorException

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

getFitness

public double getFitness()
Returns 0.

Specified by:
getFitness 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

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


Copyright © 2001-2009 by Rapid-I