Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.jstacs.classifier
Class AbstractScoreBasedClassifier.DoubleTableResult

    java.lang.Object
      de.jstacs.results.Result
          de.jstacs.classifier.AbstractScoreBasedClassifier.DoubleTableResult

All Implemented Interfaces:
  Storable

Enclosing class:
  AbstractScoreBasedClassifier

    public static class AbstractScoreBasedClassifier.DoubleTableResult

extends Result

This class is for `Result`s given as a table of `double` s.

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)` The standard constructor for the interface `Storable` .
`AbstractScoreBasedClassifier.DoubleTableResult(String name, String comment, AbstractList<double[]> list)` This is the default constructor that creates an instance based on the results given in `list`

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 a given `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.
`static StringBuffer` | `getPlotCommands(REnvironment e, String plotOptions, int[] colors, 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 `AbstractScoreBasedClassifier.DoubleTableResult`s in one image.
`String` | `toString()`
`StringBuffer` | `toXML()` This method returns an XML representation as `StringBuffer` 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(String name,
                                                          String comment,
                                                          AbstractList<double[]> list)

  This is the default constructor that creates an instance based on the results given in `list`

  Parameters:
    `name` - the name of the result
    `comment` - the comment for the result
    `list` - the list of values

### AbstractScoreBasedClassifier.DoubleTableResult

    public AbstractScoreBasedClassifier.DoubleTableResult(StringBuffer representation)
                                                   throws NonParsableException

  The standard constructor for the interface `Storable` . Creates a new `AbstractScoreBasedClassifier.DoubleTableResult` out of its XML representation.

  Parameters:
    `representation` - the XML representation as `StringBuffer`
  Throws:
    `NonParsableException` - if the `AbstractScoreBasedClassifier.DoubleTableResult` could not be reconstructed out of the XML representation (the `StringBuffer` `representation` could not be parsed)
  See Also:
    `Result.Result(StringBuffer)`, `Storable`

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` - the XML represenation of the `Result` to be parsed
  Throws:
    `NonParsableException` - if the XML representation is not parsable
  See Also:
    `Result.extractMainInfo(StringBuffer)`

### getLine

    public double[] getLine(int index)

  Return the line with a given `index` from the table.

  Parameters:
    `index` - the given index
  Returns:
    the line with the given `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 of the `Result`

### toXML

    public StringBuffer toXML()

  Description copied from interface: `Storable`
  This method returns an XML representation as `StringBuffer` 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 `AbstractScoreBasedClassifier.DoubleTableResult`s in one image.

  Parameters:
    `dtr` - the array of `AbstractScoreBasedClassifier.DoubleTableResult`s
    `e` - the R environment
  Returns:
    the image as an `ImageResult`
  Throws:
    `Exception` - if something went wrong
  See Also:
    `ImageResult.ImageResult(String, String, java.awt.image.BufferedImage)`

### 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 `AbstractScoreBasedClassifier.DoubleTableResult`s
    `e` - the R environment
    `plotOptions` -
    1. recommended for `MeasureParameters.Measure.ReceiverOperatingCharacteristicCurve` or `MeasureParameters.Measure.PrecisionRecallCurve`: `MeasureParameters.Measure.getNameString()`
    2. any String that can be parsed to R plot options
  Returns:
    a `StringBuffer` containing the plot commands
  Throws:
    `Exception` - if something went wrong

### getPlotCommands

    public static final StringBuffer getPlotCommands(REnvironment e,
                                                     String plotOptions,
                                                     int[] colors,
                                                     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 `AbstractScoreBasedClassifier.DoubleTableResult`s
    `e` - the R environment
    `plotOptions` -
    1. recommended for `MeasureParameters.Measure.ReceiverOperatingCharacteristicCurve` or `MeasureParameters.Measure.PrecisionRecallCurve`: `MeasureParameters.Measure.getNameString()`
    2. any String that can be parsed to R plot options
    `colors` - array of colors for the dtrs
  Returns:
    a `StringBuffer` containing the plot commands
  Throws:
    `Exception` - if something went wrong

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD