lnsc
Class LogisticUnit

java.lang.Object
  |
  +--lnsc.AbstractFunctionalUnit
        |
        +--lnsc.AbstractSimpleUnit
              |
              +--lnsc.LogisticUnit
All Implemented Interfaces:
java.lang.Cloneable, FunctionalUnit, java.io.Serializable

public final class LogisticUnit
extends AbstractSimpleUnit

A sigmoidal logistic unit. Principally used as unit in neural networks. It has the form: f(x) = factor*(1/(1+exp(-(mu-x)/beta)))) + offset or: f(x) = factor*(1/(1+exp(-alpha*(mu-x)))) + offset. mu is called the half-maximum point of the function and beta is called the slope.

Since:
1.0
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class lnsc.FunctionalUnit
FunctionalUnit.ProcessPatternResult
 
Field Summary
 
Fields inherited from interface lnsc.FunctionalUnit
EMPTY_PATTERN
 
Constructor Summary
LogisticUnit()
          Creates a simple logistic unit with Factor=1.0 and Offset=0.0, Mu=0.0 and Beta=1.0.
LogisticUnit(double newFactor, double newOffset)
          Creates a simple logistic unit with given factor and offset and Mu=0.0 and Beta=1.0.
LogisticUnit(double newFactor, double newOffset, double newMu, double newBeta)
          Creates a simple logistic unit with given factor, offset, half-maximum point (Mu) and slope (beta).
 
Method Summary
 double getAlpha()
          Returns the current value of parameter alpha.
 double getBeta()
          Returns the current value of parameter beta.
 double getMu()
          Returns the current value of parameter mu.
 void setAlpha(double newAlpha)
          Sets the current value of parameter alpha.
 void setBeta(double newBeta)
          Sets the current value of parameter beta.
 void setMu(double newMu)
          Sets the current value of parameter mu.
 java.lang.String toString()
           
 
Methods inherited from class lnsc.AbstractSimpleUnit
getFactor, getOffset, processPattern, setFactor, setOffset
 
Methods inherited from class lnsc.AbstractFunctionalUnit
clone, getInputCount, getOutputCount, isDifferentiable, isStateless, isTwiceDifferentiable, processDataSet, reset
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogisticUnit

public LogisticUnit()
Creates a simple logistic unit with Factor=1.0 and Offset=0.0, Mu=0.0 and Beta=1.0. That is, with output range between 0.0 and 1.0.


LogisticUnit

public LogisticUnit(double newFactor,
                    double newOffset)
Creates a simple logistic unit with given factor and offset and Mu=0.0 and Beta=1.0. That is, with range between Offset and Factor+Offset.

Parameters:
newFactor - Function factor.
newOffset - Function offset.

LogisticUnit

public LogisticUnit(double newFactor,
                    double newOffset,
                    double newMu,
                    double newBeta)
Creates a simple logistic unit with given factor, offset, half-maximum point (Mu) and slope (beta). That is, with range between Offset and Factor+Offset.

Parameters:
newFactor - Function factor.
newOffset - Function offset.
newMu - Half-maximum point.
newBeta - Slope, must be positive.
Method Detail

getAlpha

public final double getAlpha()
Returns the current value of parameter alpha. Alpha = 1/Beta

Returns:
Value of alpha.

getBeta

public final double getBeta()
Returns the current value of parameter beta. Beta is called the slope of the function.

Returns:
Value of beta.

getMu

public final double getMu()
Returns the current value of parameter mu. Mu is the half-maximum point of the logistic function.

Returns:
Value of mu.

setAlpha

public final void setAlpha(double newAlpha)
Sets the current value of parameter alpha. Alpha = 1/Beta

Parameters:
newAlpha - The new value of alpha, must be positive.

setBeta

public final void setBeta(double newBeta)
Sets the current value of parameter beta. Beta is called the slope of the function.

Parameters:
newBeta - The new value of beta, must be positive.

setMu

public final void setMu(double newMu)
Sets the current value of parameter mu. Mu is the half-maximum point of the logistic function.

Parameters:
newMu - The new value of mu.

toString

public java.lang.String toString()
Overrides:
toString in class AbstractSimpleUnit