com.penguinwerks.jodene.data
Class ClassificationScaler

java.lang.Object
  extended bycom.penguinwerks.jodene.data.Scaler
      extended bycom.penguinwerks.jodene.data.ClassificationScaler
All Implemented Interfaces:
java.io.Serializable

public class ClassificationScaler
extends Scaler
implements java.io.Serializable

This scaler is used to translate an input value for a classifier, 1.0 or 0.0 usually, to an intermediate value like 0.1 and 0.9. This can sometimes aid training because 1.0 and 0.0 sometimes drive the network towards saturation - for example trying to achieve a 1.0 response from a sigmoid is impossible.

Author:
Paul Hoehne
See Also:
Serialized Form

Constructor Summary
ClassificationScaler()
          Constructor - no argument constructor.
ClassificationScaler(double min, double max)
          Constructor - sets the min and the max.
 
Method Summary
 double getMaxScale()
          This is the maximum value for a classifier, usually considered the "on" or "yes" value.
 double getMinScale()
          This is the minimum value for a classifier, usually considered the "off" or "no" value.
 double scale(double input)
          Scales the input value.
 void setMaxScale(double maxScale)
          This is the maximum value for a classifier, usually considered the "on" or "yes" value.
 void setMinScale(double minScale)
          This is the minimum value for a classifier, usually considered the "off" or "no" value.
 
Methods inherited from class com.penguinwerks.jodene.data.Scaler
addScaler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassificationScaler

public ClassificationScaler()
Constructor - no argument constructor.


ClassificationScaler

public ClassificationScaler(double min,
                            double max)
Constructor - sets the min and the max.

Parameters:
min - The minimum end of the scale.
max - The maximum end of the scale.
Method Detail

getMaxScale

public double getMaxScale()
This is the maximum value for a classifier, usually considered the "on" or "yes" value. Normally this is 0.9.

Returns:
Returns the maxScale.

setMaxScale

public void setMaxScale(double maxScale)
This is the maximum value for a classifier, usually considered the "on" or "yes" value. Normally this is 0.9.

Parameters:
maxScale - The maxScale to set.

getMinScale

public double getMinScale()
This is the minimum value for a classifier, usually considered the "off" or "no" value. Normally this is 0.1.

Returns:
Returns the minScale.

setMinScale

public void setMinScale(double minScale)
This is the minimum value for a classifier, usually considered the "off" or "no" value. Normally this is 0.1.

Parameters:
minScale - The minScale to set.

scale

public double scale(double input)
Scales the input value. Given an input value scales it to the appropriate response. Overrides the abstract method on Scaler.

Specified by:
scale in class Scaler
Parameters:
input - The unscaled input value.
Returns:
The scaled value.