Sigmoid function
Say it: "sigma of z", "sigmoid of z"
What it means
squashes any number into the range 0 to 1. (The same letter also means standard deviation; context tells you which.)
Example
Large inputs go towards 1, negative ones towards 0.
In code
import numpy as np sigmoid = lambda z: 1 / (1 + np.exp(-z)) print(sigmoid(np.array([-4, 0, 4])).round(3))
Output
[0.018 0.5 0.982]
Where it appears in machine learning
Turns a score into a probability in logistic regression and in the last layer of binary classifiers.
Related symbols
Learn it properly in the free lesson Derivatives & the Chain Rule, with practice questions that check your answers.