Package org.tribuo

Interface ImmutableOutputInfo<T extends Output<T>>

All Superinterfaces:
Iterable<<Integer,T>>, OutputInfo<T>, Serializable
All Known Implementing Classes:
ImmutableAnomalyInfo, ImmutableClusteringInfo, ImmutableLabelInfo, ImmutableMultiLabelInfo, ImmutableRegressionInfo

public interface ImmutableOutputInfo<T extends Output<T>> extends OutputInfo<T>, Iterable<<Integer,T>>
An OutputInfo that is fixed, and contains an id number for each valid output.

In the case of real valued outputs, the id number represents the dimension.

  • Method Details

    • getID

      int getID(T output)
      Return the id number associated with this output, or -1 if the output is unknown.
      output - An output
      A non-negative integer if the output is known, or -1 if the output is unknown.
    • getOutput

      T getOutput(int id)
      Returns the output associated with this id, or null if the id is unknown.
      id - A non-negative integer.
      An output object or null if it's unknown.
    • getTotalObservations

      long getTotalObservations()
      Returns the total number of observed outputs seen by this ImmutableOutputInfo.
      The number of observed outputs.
    • domainAndIDEquals

      default boolean domainAndIDEquals(ImmutableOutputInfo<T> other)
      Checks if the domain is the same as the other output info's domain, and that each element is mapped to the same id number.

      Note the default behaviour will be removed in a future major release, and should be overridden for performance reasons in all implementing classes.

      other - The output info to compare.
      True if the domains and ids are the same.