org.neuroph.core.transfer
Class Tanh

java.lang.Object
  extended by org.neuroph.core.transfer.TransferFunction
      extended by org.neuroph.core.transfer.Tanh
All Implemented Interfaces:
java.io.Serializable

public class Tanh
extends TransferFunction
implements java.io.Serializable

 Tanh neuron transfer function.
 
 output = ( 1 - e^(-slope*input)) / ( 1 + e^(-slope*input) )
 

Author:
Zoran Sevarac
See Also:
Serialized Form

Constructor Summary
Tanh()
          Creates an instance of Tanh neuron transfer function with default slope=1.
Tanh(double slope)
          Creates an instance of Tanh neuron transfer function with specified value for slope parametar.
Tanh(java.util.Properties properties)
          Creates an instance of Tanh neuron transfer function with the specified properties.
 
Method Summary
 double getDerivative(double net)
          Returns the first derivative of this function.
 double getOutput(double net)
          Returns the ouput of this function.
 double getSlope()
          Returns the slope parametar of this function
 void setSlope(double slope)
          Sets the slope parametar for this function
 
Methods inherited from class org.neuroph.core.transfer.TransferFunction
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tanh

public Tanh()
Creates an instance of Tanh neuron transfer function with default slope=1.


Tanh

public Tanh(double slope)
Creates an instance of Tanh neuron transfer function with specified value for slope parametar.

Parameters:
slope - the slope parametar for the Tanh function

Tanh

public Tanh(java.util.Properties properties)
Creates an instance of Tanh neuron transfer function with the specified properties.

Parameters:
properties - properties of the Tanh function
Method Detail

getOutput

public double getOutput(double net)
Description copied from class: TransferFunction
Returns the ouput of this function.

Specified by:
getOutput in class TransferFunction
Parameters:
net - net input

getDerivative

public double getDerivative(double net)
Description copied from class: TransferFunction
Returns the first derivative of this function.

Overrides:
getDerivative in class TransferFunction
Parameters:
net - net input

getSlope

public double getSlope()
Returns the slope parametar of this function

Returns:
slope parametar of this function

setSlope

public void setSlope(double slope)
Sets the slope parametar for this function

Parameters:
slope - value for the slope parametar