Skip to main content
. 2026 Jun 4;26(11):3582. doi: 10.3390/s26113582
Algorithm 1 Hybrid Candidate Generation and Reciprocal-Rank Fusion
  • Input: case query q(c), disease catalog D, per-source depth Ks, final depth Kf.

  • Output: hybrid candidate list πc(0).
    1. Score all diseases in D with BM25 over disease-profile text and retain the top Ks results.
    2. Transform q(c) with the fitted TF–IDF vectorizer, predict class probabilities with the class-balanced linear classifier, and retain the top Ks diseases.
    3. Encode q(c) and all disease profiles with MedCPT, compute cosine similarity, and retain the top Ks diseases.
    4. Merge the three ranked lists with RRF using source weights {1.5,0.75,1.0} and constant K=60.
    5. Sort diseases by sRRF and retain the top Kf candidates.