com.rapidminer.operator.performance
Class PerformanceVector

java.lang.Object
  extended by com.rapidminer.operator.AbstractIOObject
      extended by com.rapidminer.operator.ResultObjectAdapter
          extended by com.rapidminer.tools.math.AverageVector
              extended by com.rapidminer.operator.performance.PerformanceVector
All Implemented Interfaces:
IOObject, ResultObject, Saveable, LoggingHandler, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

public class PerformanceVector
extends AverageVector

Handles several performance criteria. It is possible to obtain more than one criterion and therefore they are added to a criteria list.

Author:
Ingo Mierswa, Simon Fischer Exp $
See Also:
Serialized Form

Nested Class Summary
static class PerformanceVector.DefaultComparator
          The default performance comparator compares the main criterion of two performance vectors.
 
Field Summary
static java.lang.String MAIN_CRITERION_FIRST
           
 
Constructor Summary
PerformanceVector()
           
 
Method Summary
 void addCriterion(PerformanceCriterion crit)
           
 java.lang.Object clone()
           
 int compareTo(java.lang.Object o)
          Returns a negative value iff o is better than this performance vector
 java.lang.String[] getCriteriaNames()
           
 PerformanceCriterion getCriterion(int index)
           
 PerformanceCriterion getCriterion(java.lang.String name)
           
 java.lang.String getExtension()
          Returns the default extension in file choosers.
 java.lang.String getFileDescription()
          Returns the file description used in file choosers.
 PerformanceCriterion getMainCriterion()
          Returns the main PerformanceCriterion.
 javax.swing.Icon getResultIcon()
          Returns null.
 java.awt.Component getVisualizationComponent(IOContainer container)
          Returns a editor pane that displays the ResultObjectAdapter.toResultString() result encoded as html.
 void initWriting()
          Init the value map which ensures an easy human readable format.
 void save(java.io.File file)
          Saves the object into the given file by using the AbstractIOObject.write(OutputStream) method of IOObject (XML format).
 void setComparator(PerformanceComparator comparator)
           
 void setMainCriterionName(java.lang.String mcName)
          Sets the name of the main average (must be added by AverageVector.addAveragable(Averagable))
 java.lang.String toString()
           
 
Methods inherited from class com.rapidminer.tools.math.AverageVector
addAveragable, buildAverages, equals, getAveragable, getAveragable, getSize, hashCode, removeAveragable, size, toResultString
 
Methods inherited from class com.rapidminer.operator.ResultObjectAdapter
addAction, getActions, getName, isSavable, log, logError, logNote, logWarning, toHTML
 
Methods inherited from class com.rapidminer.operator.AbstractIOObject
copy, getLog, getSource, read, setLoggingHandler, setSource, write
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.rapidminer.operator.IOObject
copy, getLog, getSource, setLoggingHandler, setSource, write
 

Field Detail

MAIN_CRITERION_FIRST

public static final java.lang.String MAIN_CRITERION_FIRST
See Also:
Constant Field Values
Constructor Detail

PerformanceVector

public PerformanceVector()
Method Detail

setComparator

public void setComparator(PerformanceComparator comparator)

addCriterion

public void addCriterion(PerformanceCriterion crit)

getCriterion

public PerformanceCriterion getCriterion(int index)

getCriterion

public PerformanceCriterion getCriterion(java.lang.String name)

getCriteriaNames

public java.lang.String[] getCriteriaNames()

setMainCriterionName

public void setMainCriterionName(java.lang.String mcName)
Sets the name of the main average (must be added by AverageVector.addAveragable(Averagable))


getMainCriterion

public PerformanceCriterion getMainCriterion()
Returns the main PerformanceCriterion. If the main criterion is not specified by setMainCriterionName(String), the first criterion is returned.


compareTo

public int compareTo(java.lang.Object o)
Returns a negative value iff o is better than this performance vector


clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Specified by:
clone in class AverageVector
Throws:
java.lang.CloneNotSupportedException

getVisualizationComponent

public java.awt.Component getVisualizationComponent(IOContainer container)
Description copied from class: ResultObjectAdapter
Returns a editor pane that displays the ResultObjectAdapter.toResultString() result encoded as html. Please note that the returned pane is already enclosed by a scroll pane. If you overwrite this method you should again ensure that the returned component is scrollable. The given container is totally ignored.

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

getResultIcon

public javax.swing.Icon getResultIcon()
Description copied from class: ResultObjectAdapter
Returns null. Subclasses might want to override this method and returns an appropriate icon.

Specified by:
getResultIcon in interface ResultObject
Overrides:
getResultIcon in class ResultObjectAdapter

toString

public java.lang.String toString()
Overrides:
toString in class AverageVector

getExtension

public java.lang.String getExtension()
Description copied from interface: Saveable
Returns the default extension in file choosers.


getFileDescription

public java.lang.String getFileDescription()
Description copied from interface: Saveable
Returns the file description used in file choosers.


save

public void save(java.io.File file)
          throws java.io.IOException
Description copied from class: ResultObjectAdapter
Saves the object into the given file by using the AbstractIOObject.write(OutputStream) method of IOObject (XML format).

Specified by:
save in interface Saveable
Overrides:
save in class ResultObjectAdapter
Throws:
java.io.IOException

initWriting

public void initWriting()
Init the value map which ensures an easy human readable format.

Overrides:
initWriting in class AbstractIOObject


Copyright © 2001-2009 by Rapid-I