Package org.tribuo

Interface OutputInfo<T extends Output<T>>

All Superinterfaces:
Serializable
All Known Subinterfaces:
ImmutableOutputInfo<T>, MutableOutputInfo<T>
All Known Implementing Classes:
AnomalyInfo, ClusteringInfo, ImmutableAnomalyInfo, ImmutableClusteringInfo, ImmutableLabelInfo, ImmutableMultiLabelInfo, ImmutableRegressionInfo, LabelInfo, MultiLabelInfo, MutableAnomalyInfo, MutableClusteringInfo, MutableLabelInfo, MutableMultiLabelInfo, MutableRegressionInfo, RegressionInfo

public interface OutputInfo<T extends Output<T>> extends Serializable
Tracks relevant properties of the appropriate Output subclass.

Can generate a ImmutableOutputInfo which contains id numbers, and a MutableOutputInfo for repeated training with more data.

  • Method Details

    • getDomain

      Set<T> getDomain()
      Returns a set of Output which represent the space of possible values the Output has taken.

      For real values this set represents the number of dimensions observed.

      Returns:
      A Set of T.
    • size

      int size()
      Returns the number of possible values this OutputInfo knows about.

      For real values this is the number of dimensions observed.

      Returns:
      An int representing the size of the domain.
    • getUnknownCount

      int getUnknownCount()
      Returns the number of unknown Output instances (generated by OutputFactory.getUnknownOutput()) that this OutputInfo has seen.
      Returns:
      The number of unknown outputs observed.
    • generateImmutableOutputInfo

      ImmutableOutputInfo<T> generateImmutableOutputInfo()
      Generates an ImmutableOutputInfo which has a copy of the data in this OutputInfo, but also has id values and is immutable.
      Returns:
      An immutable copy of this OutputInfo.
    • generateMutableOutputInfo

      MutableOutputInfo<T> generateMutableOutputInfo()
      Generates a mutable copy of this OutputInfo.
      Returns:
      A mutable copy of this OutputInfo.
    • copy

      OutputInfo<T> copy()
      Generates a copy of this OutputInfo, including it's mutability.
      Returns:
      A copy of the OutputInfo.
    • toReadableString

      String toReadableString()
      Generates a String form of this OutputInfo.

      This String can contain newlines, tabs and other formatting.

      Returns:
      A formatted String representing this OutputInfo.
    • outputCountsIterable

      Iterable<com.oracle.labs.mlrg.olcut.util.Pair<String,Long>> outputCountsIterable()
      An Iterable over the possible outputs and the number of times they were observed.

      Provides similar functionality to an iterator over the entrySet of a Map, though this is a copy of the data and immutable.

      Returns:
      Lambda wrapping an iterator over Pairs.