Package adams.flow.container
Class WekaPredictionContainer
- java.lang.Object
-
- adams.flow.container.AbstractContainer
-
- adams.flow.container.WekaPredictionContainer
-
- 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 WekaPredictionContainer extends adams.flow.container.AbstractContainer implements adams.flow.container.ContainerWithReport
A container for predictions made by a classifier.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
VALUE_ABSTENTION_CLASSIFICATION
the identifier for the classification of an abstaining classifier.static String
VALUE_ABSTENTION_CLASSIFICATION_LABEL
the identifier for the classification label of an abstaining classifier.static String
VALUE_ABSTENTION_DISTRIBUTION
the identifier for the distribution of an abstaining classifier.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.
-
Constructor Summary
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
initHelp()
Initializes the help strings.boolean
isValid()
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
-
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 predictioncls
- the classificationdist
- 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 predictioncls
- the classificationdist
- the class distributionrangeCheck
- the range check, null if not available
-
-
Method Detail
-
initHelp
protected void initHelp()
Initializes the help strings.- Overrides:
initHelp
in classadams.flow.container.AbstractContainer
-
names
public Iterator<String> names()
Returns all value names that can be used (theoretically).- Specified by:
names
in interfaceadams.flow.container.Container
- Specified by:
names
in 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:
isValid
in interfaceadams.flow.container.Container
- Specified by:
isValid
in classadams.flow.container.AbstractContainer
- Returns:
- true if all the necessary values are available
-
-