com.rapidminer.example.table
Class NominalAttribute
java.lang.Object
com.rapidminer.example.table.AbstractAttribute
com.rapidminer.example.table.NominalAttribute
- All Implemented Interfaces:
- Attribute, java.io.Serializable, java.lang.Cloneable
- Direct Known Subclasses:
- BinominalAttribute, PolynominalAttribute
public abstract class NominalAttribute
- extends AbstractAttribute
This class holds all information on a single nominal attribute. In addition
to the generic attribute fields this class keeps information about the
nominal values and the value to index mappings. If one of the methods
designed for numerical attributes was invoked a RuntimeException will be
thrown.
It will be guaranteed that all values are mapped to indices without any
missing values. This could, however, be changed in future versions thus
operators should not rely on this fact.
- Author:
- Ingo Mierswa
Exp $
- See Also:
- Serialized Form
|
Method Summary |
java.lang.String |
getAsString(double value,
int digits,
boolean quoteNominal)
Returns a string representation and maps the value to a string if type is
nominal. |
boolean |
isNominal()
Returns true if the attribute is nominal. |
boolean |
isNumerical()
Returns true if the attribute is nominal. |
| Methods inherited from class com.rapidminer.example.table.AbstractAttribute |
addOwner, addTransformation, clearTransformations, clone, equals, getAllStatistics, getBlockType, getConstruction, getDefault, getLastTransformation, getName, getStatistics, getStatistics, getTableIndex, getValue, getValueType, hashCode, readResolve, registerStatistics, removeOwner, setBlockType, setConstruction, setDefault, setName, setTableIndex, setValue, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
isNominal
public boolean isNominal()
- Description copied from interface:
Attribute
- Returns true if the attribute is nominal.
isNumerical
public boolean isNumerical()
- Description copied from interface:
Attribute
- Returns true if the attribute is nominal.
getAsString
public java.lang.String getAsString(double value,
int digits,
boolean quoteNominal)
- Returns a string representation and maps the value to a string if type is
nominal. The number of digits is ignored.
Copyright © 2001-2009 by Rapid-I