com.rapidminer.example.table
Class NumericalAttribute

java.lang.Object
  extended by com.rapidminer.example.table.AbstractAttribute
      extended by com.rapidminer.example.table.NumericalAttribute
All Implemented Interfaces:
Attribute, java.io.Serializable, java.lang.Cloneable

public class NumericalAttribute
extends AbstractAttribute

This class holds all information on a single numerical attribute. In addition to the information of the superclass this is some statistics data like minimum, maximum and average of the values.

Author:
Ingo Mierswa Exp $
See Also:
Serialized Form

Field Summary
static int DEFAULT_NUMBER_OF_DIGITS
          Indicates the default number of fraction digits which is defined by the system property rapidminer.gui.fractiondigits.numbers.
static int UNLIMITED_NUMBER_OF_DIGITS
          Indicates an unlimited number of fraction digits.
 
Fields inherited from interface com.rapidminer.example.Attribute
MISSING_NOMINAL_VALUE, UNDEFINED_ATTRIBUTE_INDEX, VIEW_ATTRIBUTE_INDEX
 
Method Summary
 java.lang.Object clone()
          Clones this attribute.
 java.lang.String getAsString(double value, int numberOfDigits, boolean quoteNominal)
          Returns a string representation of value.
 NominalMapping getMapping()
          Returns the nominal mapping between nominal values and internal double representations.
 boolean isNominal()
          Returns true if the attribute is nominal.
 boolean isNumerical()
          Returns true if the attribute is nominal.
 void setMapping(NominalMapping mapping)
          Does nothing.
 
Methods inherited from class com.rapidminer.example.table.AbstractAttribute
addOwner, addTransformation, clearTransformations, 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
 

Field Detail

DEFAULT_NUMBER_OF_DIGITS

public static final int DEFAULT_NUMBER_OF_DIGITS
Indicates the default number of fraction digits which is defined by the system property rapidminer.gui.fractiondigits.numbers.

See Also:
Constant Field Values

UNLIMITED_NUMBER_OF_DIGITS

public static final int UNLIMITED_NUMBER_OF_DIGITS
Indicates an unlimited number of fraction digits.

See Also:
Constant Field Values
Method Detail

clone

public java.lang.Object clone()
Clones this attribute.

Specified by:
clone in interface Attribute
Specified by:
clone in class AbstractAttribute

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.


getMapping

public NominalMapping getMapping()
Description copied from interface: Attribute
Returns the nominal mapping between nominal values and internal double representations. Please note that invoking this method might result in an exception for non-nominal attributes.


setMapping

public void setMapping(NominalMapping mapping)
Does nothing.


getAsString

public java.lang.String getAsString(double value,
                                    int numberOfDigits,
                                    boolean quoteNominal)
Returns a string representation of value. If the numberOfDigits is greater than 0 this number is used to format the string. Otherwise the value of the system property rapidminer.gui.fractiondigits.numbers will be used (see Tools in case of DEFAULT_NUMBER_OF_DIGITS or an unlimited number of digits in case of UNLIMITED_NUMBER_OF_DIGITS. For the value NaN a "?" will be returned.



Copyright © 2001-2009 by Rapid-I