public class CategoricalIDInfo extends CategoricalInfo implements VariableIDInfo
CategoricalInfo
, but with an additional int id field.cdf, observedCount, observedValue, THRESHOLD, totalObservations, valueCounts, values
count, name
Constructor and Description |
---|
CategoricalIDInfo(CategoricalInfo info,
int id)
Constructs a categorical id info copying the information from the supplied info, with the specified id.
|
Modifier and Type | Method and Description |
---|---|
CategoricalIDInfo |
copy()
Returns a copy of this variable info.
|
RealIDInfo |
generateRealInfo()
Generates a
RealIDInfo that matches this CategoricalInfo and
also contains an id number. |
int |
getID()
The id number associated with this variable.
|
CategoricalIDInfo |
makeIDInfo(int id)
Generates a VariableIDInfo subclass which represents the same feature.
|
CategoricalIDInfo |
rename(String newName)
Rename generates a fresh VariableInfo with the new name.
|
String |
toString() |
frequencyBasedSample, frequencyBasedSample, getObservationCount, getUniqueObservations, observe, uniformSample
equals, getCount, getName, hashCode
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getCount, getName, uniformSample
public CategoricalIDInfo(CategoricalInfo info, int id)
info
- The info to copy.id
- The id number to use.public int getID()
VariableIDInfo
Ids are non-negative integers.
getID
in interface VariableIDInfo
public RealIDInfo generateRealInfo()
RealIDInfo
that matches this CategoricalInfo and
also contains an id number.generateRealInfo
in class CategoricalInfo
public CategoricalIDInfo copy()
VariableInfo
copy
in interface VariableInfo
copy
in class CategoricalInfo
public CategoricalIDInfo makeIDInfo(int id)
VariableInfo
makeIDInfo
in interface VariableInfo
makeIDInfo
in class CategoricalInfo
id
- The id number.public CategoricalIDInfo rename(String newName)
VariableInfo
rename
in interface VariableInfo
rename
in class CategoricalInfo
newName
- The new name.public String toString()
toString
in class CategoricalInfo
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.