Abstract Body

Background

In Thailand, cause of death is stored in free text format on death certificates and classified manually based on clinical expertise, Thai HIV surveillance definitions, and WHO clinical staging guidelines. Limitations, particularly in extracting and categorizing causes of death from text-based records in the Ministry of Interior’s death registry, are significant obstacles in monitoring HIV-related mortality. We developed a text clustering model to automatically classify cause of death and differentiate between AIDS-related and other causes of death among HIV-positive individuals who died between 2002 and 2022.

Methods

We developed and applied a text clustering model to automatically categorize cause of death into 3 main groups: AIDS-related causes (e.g., opportunistic infections), non-AIDS related causes (including non-communicable and non-natural causes), and ill-defined causes. Clustering was based on similarity ratios, keywords, and >85% fuzzy string-matching score in Python. Additionally, we created a confusion matrix to measure the text clustering model’s overall performance by analyzing its precision (true positive/ (true positive + false positive)), recall (true positive/(true positive + false negative)), and F-1 score ((2*precision*recall)/(precision +recall)).

Results

Of 165,541 deaths recorded in NAP, 163,251 (99%) had specific information on cause of death. A total of 96,350 deaths (58%) were AIDS-related, 59,871 (36%) were non-AIDS-related, and 9,320 (6%) were classified as ill-defined. After deduplication, 26,913 unique causes of death and 31 major disease groups were identified. The text clustering model achieved 95% precision, 95% recall, and 95% f-1 score. Precision scores revealed low accuracy for AIDS-related causes from immune deficiency or Lost to Follow-up (79%), hematologic diseases (77%), and assault (52%). Recall scores were low for hematologic disease (24%) and poison (53%). F-1 scores were for low for hematologic disease (37%) and assault (66%). Tuberculosis and cancer had the highest precision (100%), recall (100%), and f1-score (100%) in the model.

Conclusions

The text clustering model showed high performance overall, but certain categories had low precision, recall, and F1-scores, possibly due to incomplete information on death certificates. Future improvements to utilize AI to enhance text clustering capabilities may increase system effectiveness.

Table or Figure