Statistics
Logistic Regression Simulator
Classify points in 2D and see how a probability field emerges from the logistic model.
Classification plane
Left click = class 0, right click = class 1. Drag to move.
Blue = class 0, orange = class 1. The gradient shows probabilities.
Point generation
Left click adds class 0, right click adds class 1, double click removes.
Live metrics
Concept bridge: from linear to probability
Show / hide explanation
Step 1 — Linear combination
z = β₀ + β₁x + β₂y. z can take any real value.
Step 2 — Log-odds
z equals log-odds: log(p / (1-p)).
Step 3 — Sigmoid
p = 1 / (1 + e⁻ᶻ). The dot shows the probability for a given z.
About this tool
When the variable to predict is binary, logistic regression directly models the probability of class membership through the sigmoid function which transforms any real value into a probability between 0 and 1. Coefficients are estimated by maximizing the likelihood via gradient descent or quasi-Newton methods.
The model learns a linear decision boundary in the space of predictor variables. Coefficients are interpreted in terms of log-odds: a positive coefficient means that increasing by one unit increases the log-odds of belonging to the positive class by , or equivalently, the odds ratio is multiplied by .
This tool visualizes the binary classification process interactively. Modify the training data and model parameters to observe how the decision boundary shifts and how predicted probabilities change. Especially useful for understanding what happens when classes are not linearly separable and how regularization affects model complexity.
Articles published on the blog
- Diferencias entre regresión y clasificación en aprendizaje automático
- La regresión logística
- Comparación entre la regresión logística y SVM (máquinas de vectores de soporte)
- Diferencia entre R2 y R2 ajustado en modelos de regresión
- Análisis de correlación para modelos de regresión: Cómo eliminar la multicolinealidad y mejorar la robustez
