Package org.tribuo

Interface VariableInfo

All Superinterfaces:
Cloneable, Serializable
All Known Subinterfaces:
VariableIDInfo
All Known Implementing Classes:
CategoricalIDInfo, CategoricalInfo, RealIDInfo, RealInfo, SkeletalVariableInfo

public interface VariableInfo extends Serializable, Cloneable
A VariableInfo subclass contains information about a feature and its observed values.
  • Method Details

    • getName

      String getName()
      The name of this feature.
      Returns:
      The feature name.
    • getCount

      int getCount()
      The occurrence count of this feature.
      Returns:
      The occurrence count.
    • makeIDInfo

      VariableIDInfo makeIDInfo(int id)
      Generates a VariableIDInfo subclass which represents the same feature.
      Parameters:
      id - The id number.
      Returns:
      A VariableInfo with the same information, plus the id.
    • rename

      VariableInfo rename(String name)
      Rename generates a fresh VariableInfo with the new name. The name forms part of the hashcode so it's immutable in the object.
      Parameters:
      name - The new name.
      Returns:
      A VariableInfo subclass with the new name.
    • uniformSample

      double uniformSample(SplittableRandom rng)
      Sample a value uniformly from the range of this variable.
      Parameters:
      rng - The rng to use.
      Returns:
      A sample from this variable.
    • copy

      VariableInfo copy()
      Returns a copy of this variable info.
      Returns:
      A copy.