Package weka.classifiers.evaluation.output.prediction

# Class InMemory

java.lang.Object
weka.classifiers.evaluation.output.prediction.AbstractOutput
weka.classifiers.evaluation.output.prediction.InMemory

All Implemented Interfaces:
  `Serializable`, `OptionHandler`

public class InMemory extends AbstractOutput
* Stores the predictions in memory for programmatic retrieval.
* Stores the instance, a prediction object and a map of attribute names with their associated values if an attribute was defined in a container per prediction.
* The list of predictions can get retrieved using the getPredictions() method.
* File output is disabled and buffer doesn't need to be supplied. *
* Valid options are:

* *

     -p <range>
     *  The range of attributes to print in addition to the classification.
     *  (default: none)

* *

     -distribution
     *  Whether to turn on the output of the class distribution.
     *  Only for nominal class attributes.
     *  (default: off)

* *

     -decimals <num>
     *  The number of digits after the decimal point.
     *  (default: 3)

* *

     -file <path>
     *  The file to store the output in, instead of outputting it on stdout.
     *  Gets ignored if the supplied path is a directory.
     *  (default: .)

* *

     -suppress
     *  In case the data gets stored in a file, then this flag can be used
     *  to suppress the regular output.
     *  (default: not suppressed)

*

Version:
  $Revision: 10169 $
Author:
  fracpete (fracpete at waikato dot ac dot nz)
See Also:
  - Serialized Form

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `InMemory.PredictionContainer`
  Container for storing the predictions alongside the additional attributes.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InMemory()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getDisplay()`
  Returns a short display text, to be used in comboboxes.
  `List<InMemory.PredictionContainer>`
  `getPredictions()`
  Returns the collected predictions.
  `String`
  `globalInfo()`
  Returns a string describing the output generator.
  `void`
  `setOutputFile(File value)`
  Ignored, as it does not generate any output.

  ### Methods inherited from class weka.classifiers.evaluation.output.prediction.AbstractOutput

  `attributesTipText, fromCommandline, generatesOutput, getAttributes, getBuffer, getDefaultNumDecimals, getHeader, getNumDecimals, getOptions, getOutputDistribution, getOutputFile, getSuppressOutput, listOptions, numDecimalsTipText, outputDistributionTipText, outputFileTipText, print, print, printClassification, printClassification, printClassifications, printClassifications, printFooter, printHeader, setAttributes, setBuffer, setHeader, setNumDecimals, setOptions, setOutputDistribution, setSuppressOutput, suppressOutputTipText`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### InMemory

    public InMemory()

- ## Method Details

  - ### globalInfo

    public String globalInfo()
    Returns a string describing the output generator.
    Specified by:
      `globalInfo` in class `AbstractOutput`
    Returns:
      a description suitable for displaying in the GUI

  - ### getDisplay

    public String getDisplay()
    Returns a short display text, to be used in comboboxes.
    Specified by:
      `getDisplay` in class `AbstractOutput`
    Returns:
      a short display text

  - ### setOutputFile

    public void setOutputFile(File value)
    Ignored, as it does not generate any output.
    Overrides:
      `setOutputFile` in class `AbstractOutput`
    Parameters:
      `value` - ignored

  - ### getPredictions

    public List<InMemory.PredictionContainer> getPredictions()
    Returns the collected predictions.
    Returns:
      the predictions