Package adams.flow.container
Class MOAPredictionContainer
- java.lang.Object
-
- adams.flow.container.AbstractContainer
-
- adams.flow.container.MOAPredictionContainer
-
- All Implemented Interfaces:
adams.core.CloneHandler<adams.flow.container.Container>,adams.core.GlobalInfoSupporter,adams.data.spreadsheet.SpreadSheetSupporter,adams.flow.container.Container,adams.flow.container.ContainerWithReport,Serializable
public class MOAPredictionContainer extends adams.flow.container.AbstractContainer implements adams.flow.container.ContainerWithReportA container for predictions made by a classifier.- Author:
- fracpete (fracpete at waikato dot ac dot nz), Corey Sterling (coreytsterling at gmail dot com)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringVALUE_ABSTENTION_CLASSIFICATIONthe identifier for the classification of an abstaining classifier.static StringVALUE_ABSTENTION_CLASSIFICATION_LABELthe identifier for the classification label of an abstaining classifier.static StringVALUE_ABSTENTION_DISTRIBUTIONthe identifier for the distribution of an abstaining classifier.static StringVALUE_CLASSIFICATIONthe identifier for the Classification.static StringVALUE_CLASSIFICATION_LABELthe identifier for the Classification's label.static StringVALUE_DISTRIBUTIONthe identifier for the Distribution.static StringVALUE_INSTANCEthe identifier for the Instance.static StringVALUE_RANGECHECKthe identifier for the Range check.
-
Constructor Summary
Constructors Constructor Description MOAPredictionContainer()Initializes the container.MOAPredictionContainer(com.yahoo.labs.samoa.instances.Instance inst, double cls, double[] dist)Initializes the container.MOAPredictionContainer(com.yahoo.labs.samoa.instances.Instance inst, double cls, double[] dist, String rangeCheck)Initializes the container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidinitHelp()Initializes the help strings.booleanisValid()Checks whether the setup of the container is valid.Iterator<String>names()Returns all value names that can be used (theoretically).-
Methods inherited from class adams.flow.container.AbstractContainer
addAdditionalName, addHelp, addHelp, addHelp, checkDefaultConstructor, getClone, getHelp, getValue, getValue, globalInfo, hasHelp, hasValue, isValidName, removeAdditionalName, setValue, store, stored, toSpreadSheet, 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
-
VALUE_ABSTENTION_CLASSIFICATION
public static final String VALUE_ABSTENTION_CLASSIFICATION
the identifier for the classification of an abstaining classifier.- See Also:
- Constant Field Values
-
VALUE_ABSTENTION_CLASSIFICATION_LABEL
public static final String VALUE_ABSTENTION_CLASSIFICATION_LABEL
the identifier for the classification label of an abstaining classifier.- See Also:
- Constant Field Values
-
VALUE_ABSTENTION_DISTRIBUTION
public static final String VALUE_ABSTENTION_DISTRIBUTION
the identifier for the distribution of an abstaining classifier.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MOAPredictionContainer
public MOAPredictionContainer()
Initializes the container.
Only used for generating help information.
-
MOAPredictionContainer
public MOAPredictionContainer(com.yahoo.labs.samoa.instances.Instance inst, double cls, double[] dist)Initializes the container.- Parameters:
inst- the instance that was used for predictioncls- the classificationdist- the class distribution
-
MOAPredictionContainer
public MOAPredictionContainer(com.yahoo.labs.samoa.instances.Instance inst, double cls, double[] dist, String rangeCheck)Initializes the container.- Parameters:
inst- the instance that was used for predictioncls- the classificationdist- the class distributionrangeCheck- the range check, null if not available
-
-
Method Detail
-
initHelp
protected void initHelp()
Initializes the help strings.- Overrides:
initHelpin classadams.flow.container.AbstractContainer
-
names
public Iterator<String> names()
Returns all value names that can be used (theoretically).- Specified by:
namesin interfaceadams.flow.container.Container- Specified by:
namesin classadams.flow.container.AbstractContainer- Returns:
- enumeration over all possible value names
-
isValid
public boolean isValid()
Checks whether the setup of the container is valid.- Specified by:
isValidin interfaceadams.flow.container.Container- Specified by:
isValidin classadams.flow.container.AbstractContainer- Returns:
- true if all the necessary values are available
-
-