org.jscience.computing.ai.casebasedreasoning
Class TraitStatistics

java.lang.Object
  extended by org.jscience.computing.ai.casebasedreasoning.TraitStatistics

public class TraitStatistics
extends java.lang.Object

The TraitStatistics class contains statistical info

about the various values for a single, specific trait.

That includes the max value, min value and range

This class has two primary purposes.

First, we need this info to handle queries that use the variables

[MAX_VALUE] and [MIN_VALUE]

Second, we need the min, max and range info to do the

nearest neighbor/similarity calculation

Although this should be obvious, this class was only designed

to work with numbers - i don't want to compute degrees of

similarity on strings or booleans

When building stats for strings and booleans, min=0 max=1

It is believed that DataSetStatistics is the only class

that will instantiate this one. The class was designed

to be contained by DataSetStatistics


Constructor Summary
TraitStatistics(java.lang.String traitName)
           
 
Method Summary
 void addExample(float value)
           
 float getMaximumValue()
          DOCUMENT ME!
 float getMinimumValue()
          DOCUMENT ME!
 float getRange()
          DOCUMENT ME!
 java.lang.String getTraitName()
          DOCUMENT ME!
protected  void setMaximumValue(float value)
           
protected  void setMinimumValue(float value)
           
protected  void setTraitName(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TraitStatistics

public TraitStatistics(java.lang.String traitName)
Method Detail

addExample

public void addExample(float value)

getMaximumValue

public float getMaximumValue()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getMinimumValue

public float getMinimumValue()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getTraitName

public java.lang.String getTraitName()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getRange

public float getRange()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setMaximumValue

protected void setMaximumValue(float value)

setMinimumValue

protected void setMinimumValue(float value)

setTraitName

protected void setTraitName(java.lang.String name)