Sigmoid Function
A sigmoid function (σ
) is a mathematical function with an S-shaped curve
and a bounded output range (typically between 0 and 1 or -1 and 1).
Although the term “sigmoid function” describes a family of functions, it’s often used as an alias for the logistic function defined by the following equation:
The derivative of the logistic sigmoid function is:
Implementing the sigmoid function in numpy
import numpy as np
def sigmoid(x):
return 1 / (1 + np.exp(-x))
print(f"σ(0) = {sigmoid(0)}")
σ(0) = 0.5
This page references the following sources: