---
id:
aliases: []
tags:
  - authorship/original
  - destiny/permanent
  - status/incomplete
  - topic/math
  - type/encyclopedia-entry
title: Sigmoid Functions
dg-publish: true
---
# Sigmoid Functions

![[sigmoid-function-example.excalidraw]]

$f'(x)$ is a **sigmoid** function.

A sigmoid function compresses a function with infinite range to (0,1)

This is preferable to a floor-ceiling piece-wise function
since it remains differentiable.

## Formula

$$
\sigma(x) = \frac{1}{1 + e^{-x}}
$$

```tikz
\begin{document}
  \begin{tikzpicture}[domain=-5:5]
    \draw[->] (-5.2,0) -- (5.2,0) node[right] {$x$}; % x axis
    \draw[->] (0,-5.2) -- (0,5.2) node[above] {$y$}; % y axis
    \draw[color=red]    plot (\x,\x)               node[right] {$f(x) = x$};
    \draw[color=orange] plot (\x,{1/(1+exp(-\x))}) node[right] {$\sigma(x) = \frac{1}{1 + e^{-x}}$};
  \end{tikzpicture}
\end{document}
```
