Work / Case study

Granted Patent · Indian Patent No. 601763Hybrid fuzzy
cardiac prediction

A fuzzy-logic pipeline that predicts the state of a heart from imprecise clinical data, where every step from feature selection to the final score can be followed by a clinician.

Granted
8 September 2026 · Indian Patent Office
Filed
19 January 2024 · 8 claims · 20-year term
Domain
Clinical prediction · explainable AI · fuzzy logic
Healthcare AIFuzzy logicExplainable AIFeature selectionMetaheuristicsPython
Patent No. 601763 App. No. 202441004228 Filed 19 Jan 2024 Published 9 Feb 2024 Granted 8 Sep 2026 20-year term

01 · The problem

Messy data,
opaque models

Cardiovascular disease is a leading global cause of illness and death. Early, accurate prediction matters, and the data it depends on is rarely clean.

Clinical records are uncertain and imprecise. Values go missing, normal and abnormal ranges overlap, and borderline patients do not fit crisp categories. A crisp threshold treats the patient just under a cut-off as entirely different from the one just over it.

Many existing tools are black-box neural networks, or they target something else entirely: billing-code accuracy, or risk scores from ECG traces alone. They do not use fuzzy logic or hybrid membership functions, and a clinician cannot see why a prediction was made.

The goal: a prediction approach that handles that uncertainty directly and stays interpretable at every stage.

02 · The approach

Six steps, each one readable

Raw clinical data goes in, a single crisp value comes out, and nothing in between is hidden.

  1. Step 01

    Pre-processing

    Missing values are replaced with the attribute mean. Data is standardised and normalised, and outliers and inconsistencies are removed.

  2. Step 02

    BBSO feature selection

    Binary Brain Storm Optimization evolves a population of feature subsets to maximise F1-score, and stops when consecutive iterations show no improvement.

  3. Step 03

    Hybrid fuzzy membership

    Each selected attribute is fuzzified with a trapezoidal and a Gaussian function combined by element-wise maximum. The core novelty.

  4. Step 04

    Fuzzy inference

    A rule base relates fuzzified inputs to the output. Per-attribute models produce outputs that are combined with a weighted average.

  5. Step 05

    Centroid defuzzification

    The Center of Gravity method collapses the fuzzy output into one crisp, interpretable value.

  6. Step 06

    Prediction

    The heart state, including abnormalities, is predicted from that value and evaluated on accuracy, precision, recall, F1-score, and support.

03 · The core idea

Trapezoid + Gaussian, take the max

Hybrid fuzzy membership function

A trapezoidal function (parameters a, b, c, d) is bounded and captures broad trends: full membership over set intervals, nothing outside them.

A Gaussian function (mean μ, spread σ) is smooth and bell-shaped. It focuses membership around a key value and helps highlight abnormalities.

The hybrid takes the element-wise maximum of the two at every x. The result handles gradual transitions and abrupt shifts in the same function, and its shape can be matched to different data distributions by changing the parameters.

Drag the sliders. The red curve is the hybrid membership.

HYBRID FUZZY MEMBERSHIP FUNCTION
Trapezoid Gaussian Hybrid = max

04 · Open-source reimplementation

The method, rebuilt
and measured

I reimplemented the patented method as a Python pipeline on the public UCI Heart Disease dataset, 920 patients from four hospitals, with a leakage-safe protocol and bootstrap confidence intervals.

Main findings

  • The whole model is 31 rules on one page, and every prediction comes with a per-patient account of which findings fired which rules.
  • Missing tests are never imputed. A patient is scored on what was measured, and the explanation says so.
  • Cross-validated macro F1 is 0.58, against 0.63 for a random forest under the same protocol. The gap is real, and it is the price of a model a clinician can read.

Limits: single-attribute rules cannot express interactions, and this is a research reimplementation, not a clinical tool.

One patient explained end to end: fired terms, per-attribute contributions, combined scores, output sets, centroid and decision
One patient, explained end to end.
ModelCV macro F1Test macro F1 [95% CI]
Random forest0.63 ± 0.050.62 [0.54, 0.69]
Logistic regression0.62 ± 0.050.61 [0.54, 0.68]
Hybrid fuzzy, 31 rules0.58 ± 0.030.50 [0.43, 0.57]
Hybrid fuzzy + pairwise rules0.58 ± 0.040.54 [0.47, 0.61]
Held-out test macro F1 and accuracy with bootstrap 95% confidence intervals for every model
Held-out macro F1 and accuracy with bootstrap 95% CIs.

05 · Results and reflection

What the patent protects,
and what the numbers say

The contribution is the method, not a headline score. Fuzzy rules and centroid defuzzification give an output a clinician can trace back to the inputs. BBSO selects features against F1-score with no hand-tuning. The hybrid membership function is the novel piece: a trapezoidal base for broad trends and a Gaussian peak for the values that matter most, in one function.

The reported results are modest, and the patent states them plainly. Both the hybrid fuzzy model and a Keras deep learning baseline reach the same accuracy and weighted F1 on their respective test sets. The two evaluations use different class schemes and sample sizes, so they are a reference point rather than a direct comparison. The Low class in the fuzzy model is almost never recalled, which points at class imbalance.

What I would improve next:

  • Calibrate the combined scores before defuzzification, or regularise the cut-points, and check whether the CV-to-test drop closes.
  • Re-run selection and the fuzzy model with the three hospital-linked attributes dropped, to measure how much rests on them.
  • Review the rule base with clinicians, since interpretability is only valuable if the rules match how they reason.
  • Validate on a second, more recent dataset.

Reported in the patent

ModelClassesTest nAccuracyWeighted F1
Hybrid fuzzy membership3 · High / Moderate / Low9190.430.40
Deep learning baseline (Keras)5 · labels 0–41840.430.40

Hybrid model, High class: precision 0.48 · recall 0.54 · F1 0.50. Low class: recall 0.01.

Stack

Language
Python
Membership
NumPy · linspace, where, maximum
Plots
Matplotlib
Baseline
Keras Sequential API
Selection
Custom BBSO implementation

Get in touch

Working on interpretable clinical ML? Let's talk.

Contact