Interface VariableInfo
- All Superinterfaces:
Cloneable,Serializable
- All Known Subinterfaces:
VariableIDInfo
- All Known Implementing Classes:
CategoricalIDInfo,CategoricalInfo,RealIDInfo,RealInfo,SkeletalVariableInfo
A VariableInfo subclass contains information about a feature and
its observed values.
-
Method Summary
Modifier and TypeMethodDescriptioncopy()Returns a copy of this variable info.intgetCount()The occurrence count of this feature.getName()The name of this feature.makeIDInfo(int id) Generates a VariableIDInfo subclass which represents the same feature.Rename generates a fresh VariableInfo with the new name.doubleSample a value uniformly from the range of this variable.
-
Method Details
-
getName
-
getCount
int getCount()The occurrence count of this feature.- Returns:
- The occurrence count.
-
makeIDInfo
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
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
Sample a value uniformly from the range of this variable.- Parameters:
rng- The rng to use.- Returns:
- A sample from this variable.
-
copy
-