Skip to content

Latest commit

Β 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“– Topic Modeling of HIV Stigma Dimensions, Social, and Related Behavioral Circumstances

This project applies natural language processing (NLP) and topic modeling to electronic health record (EHR) clinical notes to uncover how HIV stigma and related social and behavioral circumstances are expressed among people living with HIV (PLWHs). Using Latent Dirichlet Allocation (LDA), expert-curated keyword lists, and demographic subgroup analysis, the study characterizes the topics of stigma, offering new insights into the patterns within clinical documentation.

Demo Screenshot

⚑ Intro

  • Load Data: code/datasample.csv provided
  • Text Preprocessing: Stopword removal, punctuation filtering, and lemmatization
  • Topic Modeling: Latent Dirichlet Allocation (LDA) from Gensim
  • Evaluation Metrics: Coherence Score, Average Jaccard Similarity, Topic Diversity
  • Automated Analysis: Iterate over multiple numbers of topics and iterations to identify optimal model parameters
  • Result Export: Outputs metrics for all experiments into a CSV file for downstream analysis

πŸš€ Usage

  1. Clone the repository:
git clone https://github.com/uf-hobi-informatics-lab/HIV-Stigma-Topic-Modeling.git
cd HIV-Stigma-Topic-Modeling
  1. Prepare your dataset as a CSV file with a column note_text from clinical notes.
  2. Run the LDA pipeline:
python code/lda_hiv_stigma.py
  1. The script will output: output.csv containing iteration, number of topics, coherence score, Jaccard similarity, and topic diversity
  2. Printed topics for each iteration and topic number

πŸ“š Citation

Please cite our paper: https://arxiv.org/abs/2506.09279

@article{chen2025topic,
  title={A Topic Modeling Analysis of Stigma Dimensions, Social, and Related Behavioral Circumstances in Clinical Notes Among Patients with HIV},
  author={Chen, Ziyi and Liu, Yiyang and Prosperi, Mattia and Vaddiparti, Krishna and Cook, Robert L and Bian, Jiang and Guo, Yi and Wu, Yonghui},
  journal={arXiv preprint arXiv:2506.09279},
  year={2025}
}

Contact

Please contact us or post an issue if you have any questions.

About

To characterize stigma dimensions, social, and related behavioral circumstances in people living with HIV (PLWHs) seeking care, using natural language processing methods applied to a large collection of electronic health record (EHR) clinical notes

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages