Package org.tribuo

Interface OutputInfo<T extends Output<T>>

All Superinterfaces:
ProtoSerializable<org.tribuo.protos.core.OutputDomainProto>, 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 ProtoSerializable<org.tribuo.protos.core.OutputDomainProto>, 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.

      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.

      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.
      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.
      An immutable copy of this OutputInfo.
    • generateMutableOutputInfo

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

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

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

      This String can contain newlines, tabs and other formatting.

      A formatted String representing this OutputInfo.
    • outputCountsIterable

      Iterable<<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.

      Lambda wrapping an iterator over Pairs.
    • deserialize

      static OutputInfo<?> deserialize(org.tribuo.protos.core.OutputDomainProto proto)
      Deserializes a OutputDomainProto into a OutputInfo subclass.
      proto - The proto to deserialize.
      The deserialized OutputInfo.