Deep Learning Analysis of Drug Reviews: Identifying Patient Conditions, Predicting Drug Ratings, and Sentiment Analysis
Rafat Hammad1, Mohammad Ashraf Ottom1 & Ayah Bani Baker1 Show affiliations
- Department of Information Systems, Faculty of Information Technology and Computer Sciences, Yarmouk University, Irbid, Jordan
Journal of Computer Science, Volume 22, Issue 9, pp. 2692–2699 · doi.org/10.3844/jcssp.2026.2692.2699
Abstract
Understanding patients' experiences with medications is essential for improving drug effectiveness, detecting potential side effects, and enhancing overall patient satisfaction. This research investigates applying machine learning to patient drug reviews across three main tasks: Identifying patient conditions, predicting drug ratings, and performing sentiment analysis. We implemented and evaluated Convolutional Neural Networks (CNNs), Artificial Neural Networks (ANNs), and Recurrent Neural Networks (RNNs) using a large dataset of patient reviews collected from reputable medical platforms. Model performance was assessed using accuracy, precision, recall, and F1-score for classification tasks, Mean Squared Error (MSE), and coefficient of determination (R²) for rating prediction. For patient condition identification, the RNN achieved the highest accuracy of 96.50%, followed by the ANN (96.30%) and CNN (95.80%). In the drug rating prediction task, the CNN outperformed the other models, achieving an MSE of 0.0296 and an R² of 0.9692. For sentiment classification, the RNN achieved the best performance with an accuracy of 94.82%. Cross-validation results demonstrated the robustness and stability of all models, with standard deviations below 0.3%. The findings indicate that deep learning models can effectively extract meaningful insights from unstructured patient-generated reviews. Moreover, the results suggest that model effectiveness is task-dependent: RNNs excel at tasks that require sequential text understanding, such as condition identification and sentiment classification, while CNNs perform better at predicting drug ratings through efficient local feature extraction.
Licence and reuse
Open access. This article is licensed under a Creative Commons Attribution 4.0 International Licence (CC BY 4.0), as printed on the article, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original authors and the source. No permission is needed.
How to reuse this articleResponses (0)
About this article
Hammad, R., Ottom, M. A. & Baker, A. B. (2026). Deep Learning Analysis of Drug Reviews: Identifying Patient Conditions, Predicting Drug Ratings, and Sentiment Analysis. Journal of Computer Science, 22(9), 2692–2699. https://doi.org/10.3844/jcssp.2026.2692.2699
- Licence
- CC BY 4.0
- Issue
- Volume 22, Issue 9
- Policies
- Editorial independenceUse of generative AIData availabilityAppeals and complaints
- Version
- Version of record
