The Sigmoid
The sigmoid is a function with an s shape that's used in logistic regression (and
elsewhere).
\[\begin{aligned}
\sigma(z) &= \frac{1}{1+e^{-z}}\\
\sigma(0) &= \frac{1}{2}\\
\lim_{z \to \infty} \sigma(z) &= 1\\
\lim_{z \to -\infty} \sigma(z) &= 0\\
\end{aligned}\]
elsewhere).
The Equation
\sigma(z) &= \frac{1}{1+e^{-z}}\\
\sigma(0) &= \frac{1}{2}\\
\lim_{z \to \infty} \sigma(z) &= 1\\
\lim_{z \to -\infty} \sigma(z) &= 0\\
\end{aligned}\]
Applying to a Linear Regression Classifier
- Apply the Sigmoid to z multiplied by a weight learned by the classifier.
- Classify using round(Sigmoid(z))