Math Functions

Handle sigmoid and hyperbolic operations

Apoc provides a set of function useful to ML purpose. All these functions returns a Double value.

Statement Description

apoc.math.sech(val)

returns the hyperbolic secant

apoc.math.sigmoid(val)

returns the sigmoid value

apoc.math.sigmoidPrime(val)

returns the sigmoid prime [ sigmoid(val) * (1 - sigmoid(val)) ]

apoc.math.sinh(val)

returns the hyperbolic sin

apoc.math.tanh(val)

returns the hyperbolic tangent

apoc.math.coth(val)

returns the hyperbolic cotangent

apoc.math.cosh(val)

returns the hyperbolic cosin

apoc.math.csch(val)

returns the hyperbolic cosecant

Usage examples

The following returns the hyperbolic cosecant
RETURN apoc.math.csch(1.5) AS output;
Table 1. Results
Output

0.47

The following returns the hyperbolic secant
RETURN apoc.math.sech(1.5) AS output;
Table 2. Results
Output

0.43

The following returns the hyperbolic cosin
RETURN apoc.math.cosh(1.5) AS output;
Table 3. Results
Output

2.35

The following returns the hyperbolic sin
RETURN apoc.math.sinh(1.5) AS output;
Table 4. Results
Output

2.13

The following returns the hyperbolic cotangent
RETURN apoc.math.coth(3.5) AS output;
Table 5. Results
Output

1.00

The following returns the hyperbolic tangent
RETURN apoc.math.tanh(1.5) AS output;
Table 6. Results
Output

0.90

The following returns the sigmoid prime
RETURN apoc.math.sigmoidPrime(2.5) AS output;
Table 7. Results
Output

0.70

The following returns the sigmoid
RETURN apoc.math.sigmoidPrime(2.5) AS output;
Table 8. Results
Output

0.92