DOI: 10.5281/zenodo.10938200
title: Sentiment analysis in medication adherence: full code

description: This database, associated with the research article on sentiment analysis in medication adherence, comprises an extensive collection of files essential for understanding and replicating the study's findings. It includes 362,806 anonymized medication reviews, meticulously analyzed to explore the correlation between patient sentiments and medication adherence.

Organize folders and code:

MedicationAdherenceSentimentAnalysis/
│
├── 01 - Original dataset/
│   └── originalDataset.csv
│
├── 02 - Dataset cleaning/
│   ├── CleaningStep1.py
│   ├── CleaningStep2.py
│   ├── CleaningStep3.py
│   ├── CleaningStep4.py
│   ├── Balancing.py
│   ├── CleanedDatasetStep1.csv
│   ├── CleanedDatasetStep2.csv
│   ├── CleanedDatasetStep3.csv
│   └── CleanedDatasetStep4.csv
│   └── FinalBalancedDataset.csv
│
├── 03 - Vader analysis/
│   ├── vaderAnalysis.py
│   └── vaderResults.csv
│
├── 04 - DistilRoBERTa analysis/
│   ├── DistilRoBERTa_Analysis.py
│   └── DistilRoBERTa_Results.csv
│
├── 05 - Dataset report/
│   ├── datasetReport.py
│   ├── filtredNegativeMeds.py
│   ├── filtredPositiveMeds.py
│   └── Outputs printed in terminal (Note: Terminal outputs are not stored as files)
│
├── 06 - Charts/
│   ├── charts.py
│   ├── sentimentByLikert.html
│   ├── vaderVsDistilRoBERTa.html
│   ├── emotionsByLevelOfEffectiveness.html
│   ├── emotionsByLevelOfEaseofuse.html
│   └── emotionsByLevelOfSatisfaction.html
│
└── 07 - Model metrics/
    ├── modelMetrics.py
    └── dataserForMetrics.csv


 

Contents:



Anonymized Medication Reviews: The original dataset must be downloaded from the original source indicated in "ReadmeDataset.docx". This is comprehensive dataset of 362,806 medication reviews, anonymized to protect patient privacy. These reviews serve as the primary data source for the sentiment analysis conducted in the study.

Sentiment Analysis Results: Detailed files containing the output of the sentiment analysis performed using VADER and DistilRoBERTa models. This includes sentiment polarities, emotional responses, and their correlation with the perceived effectiveness, ease of use, and satisfaction reported by patients.

Statistical Analysis Files: Contains the statistical tests and analysis results that establish the significant correlations between sentiment polarities and patient perceptions, as discussed in the article.

Methodology Documentation: Detailed documentation of the methodologies used, including the application of AI tools like VADER and DistilRoBERTa for sentiment analysis. This section aids in replicating the study's approach for further research.

Supplementary Information: Additional files that support the article's content, possibly including code snippets used for analysis, raw data processing details, and any other supplementary materials that contribute to the transparency and reproducibility of the research.


Usage:

This database is intended for researchers, clinicians, and academicians interested in exploring the intersection of artificial intelligence, sentiment analysis, and clinical pharmacy. It provides a rich resource for understanding patient sentiments towards medications and their potential impact on adherence. Researchers can utilize this data to replicate the study, conduct further analyses, or explore new hypotheses in the realm of health informatics and patient care optimization.