neuralnetworks.sigmoid-fn

hyperbolic-tangent

(hyperbolic-tangent)

Returns new instance of HyperbolicTangent sigmoid function.

It’s an optimized version of hyperbolic tangent function where it uses the following formula: 1.7159 * tanh(2/3 * x) Efficient BackProp

Output is normalized to be between -1.0 to 1.0

Derivative is 1-f(x)^2

Sigmoid

protocol

Sigmoid function protocol

members

f

(f this x)

Calculate the sigmoid function for the given x parameter

f'

(f' this activated-nodes)

Calculate the derivative of the sigmoid function for the given activated nodes (nodes with sigmoid function applied to it). This is done for efficiency so we don’t have to keep performing sigmoid function over and over again

standard-logistic

(standard-logistic)

Returns new instance of StandardLogistic sigmoid function which uses the following formula: 1/(1+e^-x)

Yields output between 0 and 1

Derivative is f(x)+(1-f(x))