AngouriMath

Navigation

← Back to list of members

Sigmoid​(AngouriMath.​Entity)

 Method (no overloads)

Summary

The logistic function, 1 / (1 + e^(-a)).
https://en.wikipedia.org/wiki/Sigmoid_function

Parameter "a"

The argument of the sigmoid.

Returns

The expression it is defined as, not a node of its own — so everything that already
works on an exponential works on this: it differentiates, it evaluates, it prints.

Remarks

One of the "non-kernel" functions of
#321: things
worth being able to write, which need no new node type because the kernel can
already say them. Adding a node instead would mean the eleven steps of
Docs/Contributing/AddingNode.cs and a new shape for every rule to ignore.

Example

using System;
using AngouriMath;
using static AngouriMath.MathS;
            
Console.WriteLine(Sigmoid("x"));
Console.WriteLine(Sigmoid(0).EvalNumerical());

Prints
1 / (1 + e ^ (-x))
1/2

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online