org.debellor.core.data
Class SymbolicFeature.SymbolicFeatureType
java.lang.Object
org.debellor.core.DataType
org.debellor.core.data.SymbolicFeature.SymbolicFeatureType
- Enclosing class:
- SymbolicFeature
public static final class SymbolicFeature.SymbolicFeatureType
- extends DataType
Field Summary |
java.lang.String[] |
values
Dictionary of possible values. |
Method Summary |
int |
codeOf(java.lang.String value)
|
java.lang.String |
get(int i)
|
int |
size()
|
java.lang.String |
toString()
|
java.lang.String |
toString(java.lang.String separator,
java.lang.String quote)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
values
public final java.lang.String[] values
- Dictionary of possible values.
If non-null, contains a set of all symbolic values
that may appear in the data stream.
Additionally, defines a mapping between symbolic values and
numeric codes, given by indices of the array.
This mapping may or may not be used by data consumers
to convert symbolic values to numbers.
Note that for trainable cells it is possible that
input data at the processing stage contain
some other symbolic values, not present at the training stage
(neither in the SymbolicFeatureType specification nor in the actual data received).
It is desirable, although not mandatory, that the cell be able to handle such case.
Null value means that the set of possible symbolic values is unknown
and the consumer of data should expect any value.
SymbolicFeature.SymbolicFeatureType
public SymbolicFeature.SymbolicFeatureType()
- Constructs a SymbolicFeatureType without the dictionary of possible values.
SymbolicFeature.SymbolicFeatureType
public SymbolicFeature.SymbolicFeatureType(java.lang.String... values)
- Constructs a SymbolicFeatureType with the dictionary of possible values
passed as an array String[] or as a variable-length parameter list.
SymbolicFeature.SymbolicFeatureType
public SymbolicFeature.SymbolicFeatureType(int size)
- Parameters:
size
- Number of symbols. Their values will be "0","1",...
size
public int size()
get
public java.lang.String get(int i)
codeOf
public int codeOf(java.lang.String value)
throws SymbolicValueNotFoundException
- Throws:
SymbolicValueNotFoundException
toString
public java.lang.String toString(java.lang.String separator,
java.lang.String quote)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object