Package org.tribuo
Class SkeletalVariableInfo
java.lang.Object
org.tribuo.SkeletalVariableInfo
- All Implemented Interfaces:
Serializable
,Cloneable
,VariableInfo
- Direct Known Subclasses:
CategoricalInfo
,RealInfo
Contains information about a feature and can be stored in the feature map
in a
Dataset
.- See Also:
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
SkeletalVariableInfo
(String name) Constructs a variable info with the supplied name.protected
SkeletalVariableInfo
(String name, int count) Constructs a variable info with the supplied name and initial count. -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.tribuo.VariableInfo
copy, makeIDInfo, rename, uniformSample
-
Field Details
-
name
The name of the feature. -
count
protected int countHow often the feature occurs in the dataset.
-
-
Constructor Details
-
SkeletalVariableInfo
Constructs a variable info with the supplied name.- Parameters:
name
- The feature name.
-
SkeletalVariableInfo
Constructs a variable info with the supplied name and initial count.- Parameters:
name
- The feature name.count
- The initial occurrence count.
-
-
Method Details
-
observe
protected void observe(double value) Records the value.- Parameters:
value
- The observed value.
-
getName
Returns the name of the feature.- Specified by:
getName
in interfaceVariableInfo
- Returns:
- The name of the feature.
-
getCount
public int getCount()Returns the occurrence count of this feature.- Specified by:
getCount
in interfaceVariableInfo
- Returns:
- The count of observed values.
-
toString
-
hashCode
public int hashCode() -
equals
-