public class Tanh extends TransferFunction implements Serializable
Tanh neuron transfer function. output = amplitude * tanh(slope * input) = amplitude * ( e^(2*slope*input)-1) / ( e^(2*slope*input)+1 )
output
Constructor and Description |
---|
Tanh()
Creates an instance of Tanh neuron transfer function with default
slope=amplitude=1
|
Tanh(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.
|
Modifier and Type | Method and Description |
---|---|
double |
getAmplitude()
Returns the amplitude parameter of this function
|
double |
getDerivative(double input)
Returns the derivative of this function evaluated at x=input
|
double |
getOutput(double input)
Returns the value of this function at x=input
|
double |
getSlope()
Returns the slope parameter of this function
|
void |
setAmplitude(double amplitude)
Sets the slope parameter for this function
|
void |
setSlope(double slope)
Sets the slope parameter for this function
|
public Tanh()
public Tanh(double slope)
slope
- the slope parameter for the Tanh functionpublic Tanh(Properties properties)
properties
- properties of the Tanh functionpublic final double getOutput(double input)
getOutput
in class TransferFunction
input
- location to evaluate this functionpublic final double getDerivative(double input)
getDerivative
in class TransferFunction
input
- location to evaluate the derivativepublic double getSlope()
public void setSlope(double slope)
slope
- value for the slope parameterpublic double getAmplitude()
public void setAmplitude(double amplitude)
amplitude
- value for the amplitude parameterCopyright © 2019 Neuroph Project. All rights reserved.