The sigmoid function, also called the logistic function, is a mathematical function defined as σ(x) = 1 / (1 + e^(-x)). It maps any real-valued number to a value between 0 and 1, producing an S-shaped curve. The sigmoid function is widely used in machine learning as an activation function in neural networks, particularly in the output layer of binary classification models where the output represents a probability. Its derivative is σ'(x) = σ(x) × (1 − σ(x)), which has a maximum value of 0.25 at x = 0. While largely replaced by ReLU in hidden layers due to the vanishing gradient problem, sigmoid remains essential in logistic regression, LSTM gate mechanisms, and attention layers in transformers.
Built with care by Alpiaal