🏋️  Sigmoid Function

Sigmoid Function#

Maps any real value to (0, 1), used for probabilities and gating.

Important

✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.

What it is#

The sigmoid function \(\sigma\) maps any real number to the open interval (0, 1), tracing an S-shaped curve:

\[\sigma(z) = \frac{1}{1 + e^{-z}}.\]

At \(z=0\) it returns 0.5; large positive \(z\) → near 1, large negative \(z\) → near 0.

Its role#

It is the inverse of the logit — it turns a log-odds score back into a probability — which makes it the output activation of logistic regression and of binary-classification output layers, and the basis of binary cross-entropy loss. Each output is an independent probability, so sigmoid also serves multi-label problems.

Watch out#

In the hidden layers of deep networks the sigmoid causes vanishing gradients (its slope flattens for large \(|z|\)), so ReLU-family activations are preferred there; sigmoid is kept for the output.


Theme: Model Training & Optimization  ·  All terminology



See also

Source article Adapted (context, re-expressed) in our own words from: Sigmoid Function (insightful-data-lab.com).

Tags: purpose: reference topic: terminology level: intermediate