org.neuroph.core.transfer
Class Tanh
- java.lang.Object
-
- org.neuroph.core.transfer.TransferFunction
-
- 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 = amplitude * tanh(slope * input) = amplitude * ( e^(2*slope*input)-1) / ( e^(2*slope*input)+1 )
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Tanh()Creates an instance of Tanh neuron transfer function with default slope=amplitude=1Tanh(double slope)Creates an instance of Tanh neuron transfer function with specified value for slope parameter.Tanh(Properties properties)Creates an instance of Tanh neuron transfer function with the specified properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetAmplitude()Returns the amplitude parameter of this functiondoublegetDerivative(double input)Returns the derivative of this function evaluated at x=inputdoublegetOutput(double input)Returns the value of this function at x=inputdoublegetSlope()Returns the slope parameter of this functionvoidsetAmplitude(double amplitude)Sets the slope parameter for this functionvoidsetSlope(double slope)Sets the slope parameter for this function
-
-
-
Constructor Detail
-
Tanh
public Tanh()
Creates an instance of Tanh neuron transfer function with default slope=amplitude=1
-
Tanh
public Tanh(double slope)
Creates an instance of Tanh neuron transfer function with specified value for slope parameter.- Parameters:
slope- the slope parameter for the Tanh function
-
Tanh
public Tanh(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 final double getOutput(double input)
Returns the value of this function at x=input- Specified by:
getOutputin classTransferFunction- Parameters:
input- location to evaluate this function- Returns:
- value of this function at x=input
-
getDerivative
public final double getDerivative(double input)
Returns the derivative of this function evaluated at x=input- Overrides:
getDerivativein classTransferFunction- Parameters:
input- location to evaluate the derivative- Returns:
- derivative of this function evaluated at x=input
-
getSlope
public double getSlope()
Returns the slope parameter of this function- Returns:
- slope parameter of this function
-
setSlope
public void setSlope(double slope)
Sets the slope parameter for this function- Parameters:
slope- value for the slope parameter
-
getAmplitude
public double getAmplitude()
Returns the amplitude parameter of this function- Returns:
- amplitude parameter of this function
-
setAmplitude
public void setAmplitude(double amplitude)
Sets the slope parameter for this function- Parameters:
amplitude- value for the amplitude parameter
-
-
DMelt 3.0 © DataMelt by jWork.ORG