de.jstacs.classifier
Class AbstractScoreBasedClassifier.DoubleTableResult

java.lang.Object
  extended by de.jstacs.results.Result
      extended by de.jstacs.classifier.AbstractScoreBasedClassifier.DoubleTableResult
All Implemented Interfaces:
Storable
Enclosing class:
AbstractScoreBasedClassifier

public static class AbstractScoreBasedClassifier.DoubleTableResult
extends Result

This class is for a table of doubles.

Author:
Jens Keilwagen
See Also:
Result

Field Summary
 
Fields inherited from class de.jstacs.results.Result
comment, datatype, name
 
Constructor Summary
AbstractScoreBasedClassifier.DoubleTableResult(StringBuffer representation)
          This is the constructor for Storable.
 
Method Summary
protected  void fromXML(StringBuffer representation)
          This method is used in Result.Result(StringBuffer) to extract the information.
 double[] getLine(int index)
          Return the line with index index from the table.
 int getNumberOfLines()
          Returns the number of lines in this table.
static StringBuffer getPlotCommands(REnvironment e, String plotOptions, AbstractScoreBasedClassifier.DoubleTableResult... dtr)
          This method copies the data to the server side and creates a StringBuffer containing the plot commands.
 double[][] getResult()
          Returns the value of the result.
static ImageResult plot(REnvironment e, AbstractScoreBasedClassifier.DoubleTableResult... dtr)
          This method plots an array of DoubleTableResult in one image
 String toString()
           
 StringBuffer toXML()
          This method returns an XML-representation of an instance of the implementing class.
 
Methods inherited from class de.jstacs.results.Result
appendMainInfo, checkDatatype, createResult, extractMainInfo, getComment, getDatatype, getName, isCastableResult, isComparableResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractScoreBasedClassifier.DoubleTableResult

public AbstractScoreBasedClassifier.DoubleTableResult(StringBuffer representation)
                                               throws NonParsableException
This is the constructor for Storable.

Parameters:
representation - the xml representation
Throws:
NonParsableException - if the representation could not be parsed.
Method Detail

fromXML

protected void fromXML(StringBuffer representation)
                throws NonParsableException
Description copied from class: Result
This method is used in Result.Result(StringBuffer) to extract the information. The method can be seen as opposite of Storable.toXML() and should not be made public.

Specified by:
fromXML in class Result
Parameters:
representation - a xml represenation
Throws:
NonParsableException - if the xml representation is not parsable
See Also:
Result.extractMainInfo(StringBuffer)

getLine

public double[] getLine(int index)
Return the line with index index from the table.

Parameters:
index - the index
Returns:
the line with index index

getNumberOfLines

public int getNumberOfLines()
Returns the number of lines in this table.

Returns:
the number of lines in this table

toString

public String toString()
Overrides:
toString in class Object

getResult

public double[][] getResult()
Description copied from class: Result
Returns the value of the result.

Specified by:
getResult in class Result
Returns:
the value

toXML

public StringBuffer toXML()
Description copied from interface: Storable
This method returns an XML-representation of an instance of the implementing class.

Returns:
the XML-representation

plot

public static final ImageResult plot(REnvironment e,
                                     AbstractScoreBasedClassifier.DoubleTableResult... dtr)
                              throws Exception
This method plots an array of DoubleTableResult in one image

Parameters:
dtr - the array of results
e - the R environment
Returns:
the image as a result
Throws:
Exception

getPlotCommands

public static final StringBuffer getPlotCommands(REnvironment e,
                                                 String plotOptions,
                                                 AbstractScoreBasedClassifier.DoubleTableResult... dtr)
                                          throws Exception
This method copies the data to the server side and creates a StringBuffer containing the plot commands.

Parameters:
dtr - the array of results
e - the R environment
plotOptions -
  1. recommended for ROC: MeasureParameters.RECEIVER_OPERATING_CHARACTERISTIC_KEY
  2. recommended for PR: MeasureParameters.PRECISION_RECALL_CURVE_KEY
  3. any String that can be parsed to R plot options
  4. Returns:
    the image as a result
    Throws:
    Exception