A novel mixed values k-prototypes algorithm with application to health care databases mining

Ahmed Najjar, Christian Gagné, Daniel Reinharz

Introduction

Clustering large-scale administrative databases is a critical task for identifying patterns in healthcare delivery. However, traditional clustering algorithms like $k$-means or $k$-modes are often limited by their inability to handle "multivalued categorical variables"—features consisting of variable-length sets of categories, such as a patient's list of diagnosis codes or medical procedures. Forcing such data into fixed-size vectors often results in significant information loss. This paper introduces a novel extension to the $k$-prototypes algorithm specifically designed to natively support numerical, categorical, and multivalued categorical data.

Methodology

The proposed algorithm integrates techniques from Natural Language Processing (NLP) and association rule mining to process complex medical records without destructive preprocessing:

  1. Feature Space Construction: The Apriori algorithm is employed to mine "frequent itemsets" from multivalued variables, creating a manageable vocabulary of category combinations.
  2. Vector Representation: Each record is represented using a Bag-of-Words (BoW) approach based on this vocabulary, further refined by Term Frequency-Inverse Document Frequency (TF-IDF) weighting to highlight informative, rare category sets.
  3. Dissimilarity Measure: A composite distance function is used to assign objects to clusters, combining Euclidean distance for numerical attributes, matching dissimilarity for standard categorical attributes, and cosine dissimilarity for the BoW-represented multivalued categorical attributes.
  4. Cluster Update: During the iterative process, cluster centers for multivalued variables are computed as the average weight of the BoW vectors within the cluster.

Experimental Evaluation

The algorithm was tested on two massive administrative healthcare datasets from Quebec, Canada, focusing on patients aged 65 and older diagnosed with heart failure:

  • Hospital Stays: 684,906 records (including diagnostics and interventions).
  • Consultations: 2,864,934 records (ambulatory care visits and prescriptions).

Optimal Cluster Discovery

The quality of the clustering was evaluated using the Calinski-Harabasz (CH) index. The analysis revealed that the data naturally organized into 35 clusters for hospital stays and 25 clusters for consultations, as indicated by the peaks in the CH index plots.

Calinski-Harabasz (CH) index vs. number of clusters for (a) Hospital stays and (b) Consultations.

Clinical Interpretability

The resulting clusters demonstrated high clinical relevance, effectively isolating specialized care pathways. For instance, in the consultations dataset, clusters were clearly differentiated by medical specialty, such as ophthalmology, respiratory care, and radiology.

Support for the 'Cataracts' diagnosis across different clusters, showing high concentration in specific groups.

As shown in the figure above, specific diagnoses like cataracts are highly concentrated in particular clusters (e.g., Cluster 20 and 29), validating the algorithm's ability to capture real-world clinical logic. Similarly, the algorithm successfully identified clusters corresponding to rapid follow-up visits or imaging services where no medication was prescribed, proving its sensitivity to nuanced medical patterns.

Conclusion

By natively supporting variable-length category lists, this modified $k$-prototypes algorithm preserves the nuance of medical records rather than flattening them into lossy formats. The successful identification of distinct sub-populations within a single primary diagnosis (heart failure) provides a foundation for future work in longitudinal "patient pathway" analysis. Mapping how patients transition between these clusters over time will enable more sophisticated modeling and optimization of care trajectories.

Summary updated

BibTeX
@inproceedings{najjar2014novel,
  author = {Ahmed Najjar and Christian Gagné and Daniel Reinharz},
  title = {{A novel mixed values k-prototypes algorithm with application to health care databases mining}},
  booktitle = {CICARE},
  year = {2014},
  doi = {10.1109/cicare.2014.7007849},
}
Figure