Sigmoid
The sigmoid (logistic) function σ(z) = 1 / (1 + e^(−z)) maps every real number strictly increasingly into the interval (0, 1).
Formula#
Derivative:
Symmetry:
ProofProof of (exam WS 21/22, Task 5.3)
- Chain rule: .
- The first factor is .
- Second factor, multiplied by : .
Hence . The symmetry follows from .
Properties#
- ,
- Monotonically (strictly) increasing, since . Hence .
- Special case of Softmax for two classes: .
- Used as the output function of Logistic Regression, where is the predicted probability of class 1. The derivative formula gives the simple gradient of the cross-entropy loss.
Example#
, , , . Check of the symmetry: . Check of the derivative: , the maximal slope.
Sources#
- Not covered by a WS 25/26 lecture. Source: the DBIS/IR exams.
- Exam WS 21/22, Task 5.3 (not published) (derivative)
- Exam WS 23/24, Task 5.2–5.3 (not published) (
torch.sigmoidin training, softmax of ) - Exam WS 23/24 (2nd date), Task 5.1 (not published) (definition in the logistic regression model)