Logistic Regression
Turn a weighted score into probability and watch the decision boundary move.
Logistic Regression is a linear probabilistic classifier. ModelOrigen exposes its weighted score, sigmoid probability, log loss, gradients, regularization, threshold, and genuine boundary updates.
Step by step
- Compute the weighted score z.
- Map z to probability with the sigmoid function.
- Apply the class threshold.
- Calculate binary log loss and optional L2 penalty.
- Use gradients to update coefficients.
- Watch the new probability field and boundary.
Core formulas
Linear score
z = wᵀx + bFeatures are combined into a single score before probability conversion.
Sigmoid
p = 1 / (1 + e^(−z))Maps any real score to a probability between 0 and 1.
Binary log loss
L = −[y ln p + (1−y) ln(1−p)]Confident wrong predictions receive a large penalty.
When to use Logistic Regression
- Binary classification needs a clear, interpretable probability baseline.
- A roughly linear decision boundary is reasonable.
- You want coefficients that explain direction of feature influence.