Class MutableLabelInfo

java.lang.Object
org.tribuo.classification.LabelInfo
org.tribuo.classification.MutableLabelInfo
All Implemented Interfaces:
Serializable, MutableOutputInfo<Label>, OutputInfo<Label>

public class MutableLabelInfo extends LabelInfo implements MutableOutputInfo<Label>
A mutable LabelInfo. Can record new observations of Labels, incrementing the appropriate counts.
See Also:
  • Constructor Details

    • MutableLabelInfo

      public MutableLabelInfo(LabelInfo info)
      Constructs a mutable deep copy of the supplied label info.
      Parameters:
      info - The info to copy.
  • Method Details

    • observe

      public void observe(Label output)
      Description copied from interface: MutableOutputInfo
      Records an output value or statistics thereof.
      Specified by:
      observe in interface MutableOutputInfo<Label>
      Parameters:
      output - The observed output.
    • clear

      public void clear()
      Description copied from interface: MutableOutputInfo
      Clears the OutputInfo, removing all things it's observed.
      Specified by:
      clear in interface MutableOutputInfo<Label>
    • copy

      public MutableLabelInfo copy()
      Description copied from interface: OutputInfo
      Generates a copy of this OutputInfo, including it's mutability.
      Specified by:
      copy in interface OutputInfo<Label>
      Specified by:
      copy in class LabelInfo
      Returns:
      A copy of the OutputInfo.
    • toReadableString

      public String toReadableString()
      Description copied from interface: OutputInfo
      Generates a String form of this OutputInfo.

      This String can contain newlines, tabs and other formatting.

      Specified by:
      toReadableString in interface OutputInfo<Label>
      Returns:
      A formatted String representing this OutputInfo.
    • toString

      public String toString()
      Overrides:
      toString in class Object