de.htwdd.rosenkoenig.neuro.net
Class Tanh

java.lang.Object
  extended by de.htwdd.rosenkoenig.neuro.net.Tanh
All Implemented Interfaces:
ActivationFunction

public class Tanh
extends java.lang.Object
implements ActivationFunction

An activation function using tanh.


Field Summary
private static Tanh instance
           
 
Constructor Summary
private Tanh()
          Default ctor
 
Method Summary
 double compute(double value)
           
 double computeDerivation(double value)
           
static Tanh getInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

private static Tanh instance
Constructor Detail

Tanh

private Tanh()
Default ctor

Method Detail

compute

public double compute(double value)
Specified by:
compute in interface ActivationFunction
Parameters:
value - value to compute something from.
Returns:
result computed from value. Takes value and computes something from it using a function.

computeDerivation

public double computeDerivation(double value)
Specified by:
computeDerivation in interface ActivationFunction
Parameters:
value - value to compute something from.
Returns:
result computed from value. Takes value and computes something from it using a derivation of a function.

getInstance

public static Tanh getInstance()
Returns:
the instance of this class