Skip to content
Home/Case studies/Appointment No-Show Risk Model

Appointment No-Show Risk Model

Machine learning that predicts which appointments are likely to be missed, so staff confirm those first.

Applied Machine LearningCase study6 technologies
Quick summary

A prediction model built on past booking history that sorts tomorrow’s appointments into risk bands, each with a short reason, so reminder calls go where they matter.

Appointment No-Show Risk Model preview
Applies

Overview

What this is and why it matters, in plain English.

A prediction model built on past booking history that sorts tomorrow’s appointments into risk bands, each with a short reason, so reminder calls go where they matter.

Machine learning that predicts which appointments are likely to be missed, so staff confirm those first.

The situation

What was going on before, and why it needed fixing.

Reminder calls went out in schedule order, so staff spent their time on patients who always attend while the slots that went empty were never confirmed.

The clinic had years of booking history in MySQL but no way to use it to prioritize the day.

Reminder calls went out in schedule order. Staff spent the morning on patients who always attend, and the slots that went empty were the ones nobody had time to confirm.

What it needed to do

The outcomes the project had to deliver.

  • Score tomorrow’s appointments by the chance they will be missed.
  • Give staff a short reason for each score, not just a number.
  • Fit into the existing Laravel scheduler without changing how staff work.

What I did

My part of the work and who I worked with.

I framed the problem, built the feature pipeline and model in Python with scikit-learn and Pandas, designed the evaluation, and integrated the scores into the Laravel scheduler through Redis.

How it works

The main building blocks, from the screen people use to the data underneath.

A nightly Python job builds features from past bookings in MySQL, scores tomorrow’s appointments with a regularized logistic regression model, and the Laravel scheduler reads the risk band from Redis to sort the confirmation queue.

  1. 01

    Feature build (Pandas)

    A nightly job reads past bookings from MySQL and builds features known before the visit: lead time, weekday, slot hour, visit type, and prior attendance history.

  2. 02

    Model (scikit-learn)

    A pipeline of scaling, one-hot encoding and regularized logistic regression with balanced class weights.

  3. 03

    Risk bands

    Probabilities are converted into three bands with thresholds chosen on validation data, plus the top contributing features from the coefficients.

  4. 04

    Laravel integration

    Bands are written to Redis; the scheduler sorts the confirmation queue by band.

Key choices and trade-offs

Every build involves trade-offs. These are the important ones and what each one cost.

DecisionTrade-off
Logistic regression over a more complex model.Possibly less raw predictive power, but coefficients give staff a clear reason for each band.
Time-based train and test split.Less training data for the latest period, but evaluation reflects how the model will be used: on future appointments.
Three bands instead of a raw probability.Less precision on screen, but staff act on bands, not decimals.

Under the hood

Implementation details for technical readers, with a code sample.

  • Applies supervised classification from the Supervised Machine Learning: Regression and Classification course: logistic regression, feature scaling, regularization and decision thresholds.
  • Builds the end-to-end workflow in Python taught in Machine Learning with Python, from Pandas features to a scikit-learn pipeline.
  • Explainable output: every band comes with the features that pushed it up.
pipeline = Pipeline([
    ("prep", ColumnTransformer([
        ("num", StandardScaler(), ["lead_days", "prior_no_shows", "prior_visits"]),
        ("cat", OneHotEncoder(handle_unknown="ignore"), ["weekday", "slot_hour", "visit_type"]),
    ])),
    ("clf", LogisticRegression(C=0.5, class_weight="balanced", max_iter=1000)),
])
pipeline.fit(X_train, y_train)
bands = np.digitize(pipeline.predict_proba(X_tomorrow)[:, 1], [0.35, 0.6])

Problems solved

What got in the way, and how each problem was fixed.

  1. 01

    Missed visits are the minority class, so the model is judged on precision and recall at the chosen threshold, not on raw accuracy.

    Balanced class weights and evaluation on precision and recall at the chosen threshold, with the threshold selected on a validation set.

  2. 02

    Features had to come only from data known before the visit, so nothing from the appointment outcome leaks into training.

    Features are restricted to what is known at booking time, and the split is by date so no future information leaks into training.

  3. 03

    Staff need a reason, not a score, so each band ships with the top contributing features from the model coefficients.

    Coefficient-based explanations attached to each band, shown in the queue next to the appointment.

Security, speed and growth

How data is protected, and how the system stays fast as usage grows.

Security

The model reads booking metadata, not clinical notes. Scores are stored as bands in Redis with the same access rules as the schedule.

Speed & growth

Scoring runs nightly in batch, so the scheduler reads precomputed bands with no model call at request time.

Quality and releases

How changes were tested and shipped safely.

Held-out evaluation on a later time window, checks for leakage in feature generation, and a review of explanations with front-desk staff before rollout.

Tech stack

The tools and technologies used, for recruiters and technical reviewers.

Pythonscikit-learnPandasLaravelMySQLRedis

Results

What the system is designed to achieve, and how.

MetricResult
ModelLogistic regression
EvaluationHeld-out time split
Output3 risk bands

These are design targets and approach choices for the system, not reported production figures.

Questions

Plain answers first, then the detail a technical reviewer would ask about.

Common questions

What does this mean for the front desk?
Staff get tomorrow’s appointments sorted by risk, with a short reason for each, so reminder calls go to the bookings most likely to be missed first.
Does it decide who gets an appointment?
No. It only changes the order of the reminder list. Nobody is refused a booking.

For your tech lead

Which certification does this apply?
Supervised Machine Learning: Regression and Classification, and Machine Learning with Python.
Why logistic regression?
It is a strong baseline for binary outcomes and its coefficients explain each score.
Does the model change who gets an appointment?
No. It only orders the confirmation call list.

Key takeaways

  • •Machine learning that predicts which appointments are likely to be missed, so staff confirm those first.
  • •Built with Python, scikit-learn, Pandas, Laravel, MySQL, Redis.
Send a brief
Engagement

Choose how we work together

01

Join your team

A senior engineer inside your team. I work in your codebase, standups and code reviews, and stay long enough to own a real part of the product. Under the hood: Laravel, Node.js, Python or AWS.

Full-time or long contract
02

Work solely for your company

A dedicated engineer for one company. I take the product from planning to the live version: backend, data, hosting and screens, with your product as my focus.

Dedicated contract
03

One project

A clearly defined build, then a clean handover: an MVP, taking an AI-built prototype (Lovable, Bolt, Cursor) to production, a migration, or an AI feature. Get in touch to discuss scope and pricing.

Fixed-scope project

Prefer to hire through a platform? I'm onUpworkand