shrutimalik123/the-adherence-predictor-logistic-regression-patient-compliance-engine — explained in plain English
Analysis updated 2026-05-18
Learn how logistic regression converts a percentage into a risk prediction.
Experiment with slope and bias values to see how they change a model's sensitivity.
Use as a teaching demo for the sigmoid function and decision thresholds.
| shrutimalik123/the-adherence-predictor-logistic-regression-patient-compliance-engine | 0xallam/my-recipe | 0xhassaan/nn-from-scratch | |
|---|---|---|---|
| Stars | 0 | — | 0 |
| Language | Python | Python | Python |
| Last pushed | — | 2022-11-22 | — |
| Maintenance | — | Dormant | — |
| Setup difficulty | easy | moderate | moderate |
| Complexity | 1/5 | 2/5 | 4/5 |
| Audience | developer | general | developer |
Figures from each repo's GitHub metadata at analysis time.
Needs only Python 3, no external libraries or frameworks required.
This project is an interactive, educational Python program that teaches a statistics and machine learning technique called logistic regression, by wrapping it in a pharmacy themed simulation game. You play the role of a data analyst at a specialty pharmacy building an early warning system that flags patients who are likely to stop taking their prescribed medication. The core idea it teaches is how to turn a continuous number, in this case a patient's percentage of days they actually took their medicine, into a yes or no prediction of whether that patient is at risk of quitting their treatment. It does this using a mathematical curve called a sigmoid function, which takes any number and squeezes it into a probability between zero and one, and a threshold that decides where that probability counts as a warning versus safe. The program lets you adjust two settings yourself, a slope value and a bias value, which together control the shape of the underlying prediction line before it gets converted into a probability. Adjusting these settings changes how sensitive the system is, so you can see directly how the math behind the model responds to different choices. To play, you need only Python 3 installed, no extra libraries or frameworks. You clone the repository, save the provided script, and run it from the command line. Once running, you review sample patient compliance data, enter your own slope and bias values, and watch how the simulation handles a specific borderline patient whose medication compliance has dropped to 62 percent, to see whether your settings would trigger an automatic pharmacist follow up call. Because the project builds everything from basic Python math rather than relying on an existing machine learning library, it is meant as a learning tool for understanding how these prediction models work under the hood, rather than a production ready tool for real healthcare use.
An educational Python simulation that teaches logistic regression by having you predict which pharmacy patients are at risk of stopping their medication.
Mainly Python. The stack also includes Python.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.