Drug Contraindication Mining.
Mining 239,000 anonymised medical prescriptions to surface potentially risky co-prescriptions — drug–drug interactions and contraindications. Frequent-pattern mining (ECLAT, FP-Growth) and association rules narrow a roughly four-million-pattern space down to a handful a clinician can review, shipped as a Streamlit tool with real-time analysis and anomaly alerts.
Two algorithms, one cabinet.
The goal was narrow and clinical: out of a long prescription log, find the co-prescriptions that should not happen together — drug–drug interactions and contraindications hiding in routine practice.
A two-stage pipeline does the mining. ECLAT runs vertical association mining over the raw prescription log; FP-Growth compresses the resulting itemset space into a much smaller set of association rules. The output is a short list of co-prescribed-drug patterns, each with confidence and lift, that a reviewer can examine in an afternoon rather than a quarter.
From notebook to something a pharmacist opens.
The model is only useful if a clinical reviewer can act on it, so it ships as a Streamlit interface rather than a notebook. Patterns surface with their confidence, lift, and a per-pattern anomaly score; new prescriptions are checked in near real time and flagged when they fall out of distribution.
What it found.
Out of an itemset space of roughly four million candidate patterns, fourteen were flagged for clinical review. None became an intervention on their own — the value was in the conversation they started.
The lesson is the one everyone repeats and few internalise: the algorithm is the smallest part of the problem. The data cleaning was where the real work lived.
Evaluation setup.
Patterns are ranked by confidence and lift, with a per-pattern anomaly score flagging out-of-distribution prescriptions. A clinical reviewer makes the final call on which flags warrant follow-up — the binding metric is reviewer usefulness, not raw rule count.
Outcome.
The harness teaches you what the model is doing. Build it first; the rest is implementation.