adams.flow.container
Class WekaPredictionContainer

java.lang.Object
  extended by adams.flow.container.AbstractContainer
      extended by adams.flow.container.WekaPredictionContainer
All Implemented Interfaces:
CloneHandler<AbstractContainer>, Serializable

public class WekaPredictionContainer
extends AbstractContainer

A container for predictions made by a classifier.

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

Field Summary
static String VALUE_CLASSIFICATION
          the identifier for the Classification.
static String VALUE_CLASSIFICATION_LABEL
          the identifier for the Classification's label.
static String VALUE_DISTRIBUTION
          the identifier for the Distribution.
static String VALUE_INSTANCE
          the identifier for the Instance.
static String VALUE_RANGECHECK
          the identifier for the Range check.
 
Fields inherited from class adams.flow.container.AbstractContainer
m_AdditionalNames, m_Values
 
Constructor Summary
WekaPredictionContainer()
          Initializes the container.
WekaPredictionContainer(weka.core.Instance inst, double cls, double[] dist)
          Initializes the container.
WekaPredictionContainer(weka.core.Instance inst, double cls, double[] dist, String rangeCheck)
          Initializes the container.
 
Method Summary
 boolean isValid()
          Checks whether the setup of the container is valid.
 Enumeration<String> names()
          Returns all value names that can be used (theoretically).
 
Methods inherited from class adams.flow.container.AbstractContainer
addAdditionalName, checkDefaultConstructor, getClone, getValue, hasValue, isValidName, removeAdditionalName, setValue, store, stored, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VALUE_INSTANCE

public static final String VALUE_INSTANCE
the identifier for the Instance.

See Also:
Constant Field Values

VALUE_CLASSIFICATION

public static final String VALUE_CLASSIFICATION
the identifier for the Classification.

See Also:
Constant Field Values

VALUE_CLASSIFICATION_LABEL

public static final String VALUE_CLASSIFICATION_LABEL
the identifier for the Classification's label.

See Also:
Constant Field Values

VALUE_DISTRIBUTION

public static final String VALUE_DISTRIBUTION
the identifier for the Distribution.

See Also:
Constant Field Values

VALUE_RANGECHECK

public static final String VALUE_RANGECHECK
the identifier for the Range check.

See Also:
Constant Field Values
Constructor Detail

WekaPredictionContainer

public WekaPredictionContainer()
Initializes the container.

Only used for generating help information.


WekaPredictionContainer

public WekaPredictionContainer(weka.core.Instance inst,
                               double cls,
                               double[] dist)
Initializes the container.

Parameters:
inst - the instance that was used for prediction
cls - the classification
dist - the class distribution

WekaPredictionContainer

public WekaPredictionContainer(weka.core.Instance inst,
                               double cls,
                               double[] dist,
                               String rangeCheck)
Initializes the container.

Parameters:
inst - the instance that was used for prediction
cls - the classification
dist - the class distribution
rangeCheck - the range check, null if not available
Method Detail

names

public Enumeration<String> names()
Returns all value names that can be used (theoretically).

Specified by:
names in class AbstractContainer
Returns:
enumeration over all possible value names

isValid

public boolean isValid()
Checks whether the setup of the container is valid.

Specified by:
isValid in class AbstractContainer
Returns:
true if all the necessary values are available


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.