Class ImmutableAnomalyInfo

java.lang.Object
org.tribuo.anomaly.AnomalyInfo
org.tribuo.anomaly.ImmutableAnomalyInfo
All Implemented Interfaces:
Serializable, Iterable<com.oracle.labs.mlrg.olcut.util.Pair<Integer,Event>>, ImmutableOutputInfo<Event>, OutputInfo<Event>

public final class ImmutableAnomalyInfo extends AnomalyInfo implements ImmutableOutputInfo<Event>
An ImmutableOutputInfo object for Events.

The ids are predefined for Event in the Event class itself.

See Also:
  • Method Details

    • getID

      public int getID(Event output)
      Description copied from interface: ImmutableOutputInfo
      Return the id number associated with this output, or -1 if the output is unknown.
      Specified by:
      getID in interface ImmutableOutputInfo<Event>
      Parameters:
      output - An output
      Returns:
      A non-negative integer if the output is known, or -1 if the output is unknown.
    • getOutput

      public Event getOutput(int id)
      Description copied from interface: ImmutableOutputInfo
      Returns the output associated with this id, or null if the id is unknown.
      Specified by:
      getOutput in interface ImmutableOutputInfo<Event>
      Parameters:
      id - A non-negative integer.
      Returns:
      An output object or null if it's unknown.
    • getTotalObservations

      public long getTotalObservations()
      Description copied from interface: ImmutableOutputInfo
      Returns the total number of observed outputs seen by this ImmutableOutputInfo.
      Specified by:
      getTotalObservations in interface ImmutableOutputInfo<Event>
      Returns:
      The number of observed outputs.
    • copy

      public ImmutableAnomalyInfo copy()
      Description copied from interface: OutputInfo
      Generates a copy of this OutputInfo, including it's mutability.
      Specified by:
      copy in interface OutputInfo<Event>
      Specified by:
      copy in class AnomalyInfo
      Returns:
      A copy of the OutputInfo.
    • iterator

      public Iterator<com.oracle.labs.mlrg.olcut.util.Pair<Integer,Event>> iterator()
      Specified by:
      iterator in interface Iterable<com.oracle.labs.mlrg.olcut.util.Pair<Integer,Event>>