Skip to main content
Monday to Friday, 8:00am to 6:00pm +254 704 621 587 info@mulan.co.ke

Machine Learning in the Courts: Predicting Case Duration

6 October 2026Machine Learning2 min read7 views
Machine Learning in the Courts: Predicting Case Duration

Case backlogs are one of the most persistent challenges facing justice systems around the world. By the time a case is officially recognised as delayed, months or years may already have been lost. Machine learning offers a new tool: estimating early how long a case is likely to take, so that courts can plan and intervene sooner.

The idea

Courts hold years of historical records: the type of case, the court, the parties, whether they had legal representation, the number of hearings and adjournments, and how long each case ultimately took. Machine learning models can learn patterns from this history and estimate the likely duration of new cases.

The aim is not to decide cases. It is to support planning: allocating resources, scheduling hearings and flagging cases that are at risk of becoming part of the backlog.

JaliHaki: a dual-stage approach

Our JaliHaki project, built on anonymised records from Kenyan magistrate courts, uses three stages:

  1. Same-day disposal: a classifier identifies cases likely to be resolved on the day they are filed, such as many pleas and withdrawals.
  2. Filing-time prediction: for other cases, a model estimates duration using only information available at filing.
  3. Progression-aware prediction: as hearings and adjournments occur, the estimate is updated with this new information.

Each case is then placed in a risk tier, from Low to Critical, so registrars can focus attention where it is most needed.

What the data shows

Patterns like these are what make early prediction useful. In the research behind JaliHaki, the nature and category of a case were the strongest signals at filing time, while the pace of proceedings, such as delays to the first mention and the number of adjournments, became the strongest signals once a case was under way.

Responsible AI in the justice system

Using machine learning in courts demands particular care:

  • Decision support only. Predictions inform planning; they never replace judicial discretion.
  • Explainability. Each prediction is explained, using techniques such as SHAP, so users understand which factors drive it.
  • Privacy. Models are trained on anonymised data and can run entirely on the institution’s own infrastructure.
  • Honest evaluation. Models are tested on recent cases they have never seen, and their limitations are reported openly.

Beyond the courts

The same approach applies wherever organisations need to anticipate how long processes will take: insurance claims, permit applications, procurement and customer service tickets. If you have historical data and a backlog problem, our machine learning and AI team can assess whether prediction could help.

Share this article

Join the conversation

Leave a comment

Your email address will not be published. Comments are moderated before they appear.

Keep reading

Related articles

Mulan Technologies
Request a Demo +254 704 621 587