Ready for a prediction
Enter coefficients and feature values, then calculate a probability.
Manual Probability Calculator
Calculate the logit, probability, odds, class, and each feature contribution.
Predictor Features
Prediction Breakdown
| Term | Value | Coefficient | Contribution | Direction |
|---|---|---|---|---|
| No calculation yet. | ||||
Sigmoid Probability Curve
The selected observation is placed on the logistic curve using its current linear score.
Calculation History
Saved locally in this browser.
| Time | Probability | Class | Logit | Action |
|---|---|---|---|---|
| No saved calculations. | ||||
Train a Binary Logistic Regression Model
Paste CSV data or upload a file. The target must contain two distinct values.
| Preview your dataset to configure training. |
Training Options
Model Evaluation
Train a model to view evaluation results.
Confusion Matrix
True positive
False negative
False positive
True negative
Fit Statistics
| No model statistics. |
Detailed Classification Metrics
| Metric | Value | Interpretation |
|---|---|---|
| No detailed metrics. | ||
Coefficient Estimates
| Feature | Coefficient | Std. error | Z | P-value | Odds ratio | 95% CI | Direction |
|---|---|---|---|---|---|---|---|
| No fitted coefficients. | |||||||
Diagnostics
Cross-Validation Summary
| Fold | Accuracy | Precision | Recall | F1 | AUC |
|---|---|---|---|---|---|
| No cross-validation results. | |||||
Model Visualisations
ROC Curve
Precision–Recall Curve
Calibration Curve
Metric by Threshold
Coefficient Importance
Predicted Probability Distribution
Batch Prediction
Use the latest trained model. The first row must contain feature names matching the trained predictors.
Batch Results
| No batch predictions. |
One-Predictor Coefficient Explorer
Change the intercept and coefficient to reverse, flatten, or steepen the logistic curve.
Formula Used
P(Y = 1 | x) = 1 / (1 + e−z)
Odds = P / (1 − P)
Odds ratio for βⱼ = eβⱼ
Logistic regression converts a linear score into a probability. The sigmoid function keeps that probability between zero and one. A threshold changes the probability into a class label.
How to Use
- Choose manual prediction, model training, batch prediction, or coefficient exploration.
- Enter coefficients and feature values, or paste a binary-labelled CSV dataset.
- Set a decision threshold, regularisation method, and other training options.
- Calculate or train the model, then review probabilities, coefficients, metrics, and diagnostics.
- Copy results, export CSV files, or print the report as a PDF.
Worked Example
| Predictor | Value | Coefficient | Contribution |
|---|---|---|---|
| Intercept | 1 | −2.5 | −2.5 |
| Study hours | 6 | 0.65 | 3.9 |
| Attendance rate | 0.82 | 1.8 | 1.476 |
The linear score is 2.876. Its sigmoid probability is approximately 0.9467. At a 0.50 threshold, the positive class is predicted.
Assumptions and Limitations
- The target should represent two classes.
- Observations should be reasonably independent.
- Continuous predictors should relate linearly to the log odds.
- Strong multicollinearity can destabilise coefficients.
- Perfect separation can prevent reliable maximum-likelihood estimates.
- Threshold choice should reflect real error costs.
- Browser-based training is intended for learning and moderate datasets.
Frequently Asked Questions
What does logistic regression predict?
It predicts a probability for a binary outcome. The probability can then be converted into a class using a threshold.
Why is the sigmoid function used?
The sigmoid maps any real-valued logit into the zero-to-one range. This makes the result interpretable as a probability.
What does a positive coefficient mean?
A positive coefficient increases the log odds as that feature rises. Its odds ratio is greater than one.
What does an odds ratio below one mean?
It means higher feature values reduce the estimated odds of the positive class, holding other predictors constant.
Should every model use a 0.50 threshold?
No. The threshold should reflect class balance, business costs, safety needs, and acceptable false-positive or false-negative rates.
What is regularisation?
Regularisation penalises large coefficients. It can reduce overfitting and improve stability when predictors are numerous or correlated.
What is ROC-AUC?
ROC-AUC measures ranking performance across many thresholds. A value near one indicates stronger class separation.
Why can training fail to converge?
Causes include extreme scaling, perfect separation, unsuitable learning rates, excessive regularisation, or insufficient iterations.
Can this replace a statistical package?
It is suitable for learning, exploration, and moderate datasets. High-stakes analysis should be verified with established statistical software.
Generated: 2026-08-10 15:34:30
All calculations run in your browser. Uploaded datasets are not sent to a server by this page.