Package org.tribuo

Class RealIDInfo

All Implemented Interfaces:
Serializable, Cloneable, VariableIDInfo, VariableInfo

public class RealIDInfo extends RealInfo implements VariableIDInfo
Same as a RealInfo, but with an additional int id field.
See Also:
  • Constructor Details

    • RealIDInfo

      public RealIDInfo(String name, int count, double max, double min, double mean, double sumSquares, int id)
      Constructs a real id info from the supplied arguments.
      Parameters:
      name - The feature name.
      count - The feature occurrence count.
      max - The maximum observed value.
      min - The minimum observed value.
      mean - The observed mean.
      sumSquares - The observed sum of squared values.
      id - The id number.
    • RealIDInfo

      public RealIDInfo(RealInfo info, int id)
      Constructs a deep copy of the supplied real info and id.
      Parameters:
      info - The info to copy.
      id - The new id number.
  • Method Details

    • getID

      public int getID()
      Description copied from interface: VariableIDInfo
      The id number associated with this variable.

      Ids are non-negative integers.

      Specified by:
      getID in interface VariableIDInfo
      Returns:
      The id number.
    • makeIDInfo

      public RealIDInfo makeIDInfo(int id)
      Description copied from interface: VariableInfo
      Generates a VariableIDInfo subclass which represents the same feature.
      Specified by:
      makeIDInfo in interface VariableInfo
      Overrides:
      makeIDInfo in class RealInfo
      Parameters:
      id - The id number.
      Returns:
      A VariableInfo with the same information, plus the id.
    • rename

      public RealIDInfo rename(String newName)
      Description copied from interface: VariableInfo
      Rename generates a fresh VariableInfo with the new name. The name forms part of the hashcode so it's immutable in the object.
      Specified by:
      rename in interface VariableInfo
      Overrides:
      rename in class RealInfo
      Parameters:
      newName - The new name.
      Returns:
      A VariableInfo subclass with the new name.
    • copy

      public RealIDInfo copy()
      Description copied from interface: VariableInfo
      Returns a copy of this variable info.
      Specified by:
      copy in interface VariableInfo
      Overrides:
      copy in class RealInfo
      Returns:
      A copy.
    • toString

      public String toString()
      Overrides:
      toString in class RealInfo