Class 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
    • 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 interface adams.flow.container.Container

        addAdditionalName, addHelp, addHelp, addHelp, getClone, getHelp, getValue, getValue, hasHelp, hasValue, removeAdditionalName, setValue, stored, toSpreadSheet, toString
      • Methods inherited from interface adams.core.GlobalInfoSupporter

        globalInfo
    • Field Detail

      • 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_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 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

      • initHelp

        protected void initHelp()
        Initializes the help strings.
        Overrides:
        initHelp in class adams.flow.container.AbstractContainer
      • names

        public Iterator<String> names()
        Returns all value names that can be used (theoretically).
        Specified by:
        names in interface adams.flow.container.Container
        Specified by:
        names in class adams.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 interface adams.flow.container.Container
        Specified by:
        isValid in class adams.flow.container.AbstractContainer
        Returns:
        true if all the necessary values are available