Skip to content

Commit

Permalink
docs: improves sigmoid function docs
Browse files Browse the repository at this point in the history
  • Loading branch information
NickUfer committed Oct 4, 2024
1 parent 7f21c7f commit a8b0e71
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions doc/classes/@GlobalScope.xml
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,7 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
Computes the sigmoid of [param x], which maps the input value into the range (0, 1).
The sigmoid function is defined as:
Computes the sigmoid for [param x], which maps the input value into the range (0, 1).
[codeblock]
sigmoid(x) = 1 / (1 + exp(-x))
[/codeblock]
Expand All @@ -496,7 +495,7 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
Computes an approximation of the sigmoid function for [param x].
Computes an approximation of the sigmoid function for [param x], which maps the input value into the range (0, 1).
The approximation is defined as:
[codeblock]
sigmoid_approx(x) = 0.5 + (x / (4 + abs(x)))
Expand All @@ -515,7 +514,7 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
Computes a fast approximation of the sigmoid function for [param x].
Computes a fast approximation of the sigmoid function for [param x], which maps the input value into the range (-1, 1).
The fast sigmoid is defined as:
[codeblock]
fast_sigmoid(x) = x / (1 + abs(x))
Expand Down

0 comments on commit a8b0e71

Please sign in to comment.