Using Pre-Trained Distil-Bert Model in Predicting Patients Sentiments Regarding Medical Treatment Results

Main Article Content

Alaa Hassan, Jamshid Bagherzadeh Mohasefi, Amir Sorayaie Azar

Abstract

Texts pertaining to medications are among the other fields that has been increased because of information explosion and technological advancements. In medicine, sentiment analysis (SA) is crucial for providing physicians with information about how patients feel about the course of treatment.


This study investigates the application of Large Language Models (LLMs) to predict polarity of patients' opinions (also called sentiment analysis). In this study a dataset including reviews of patients about their satisfaction for treatment and drug prescription is used. Three scenarios are implemented for opinion classification, including two classes (positive, negative), three classes (positive, neutral, negative), and 5 classes (negative, slightly negative, neutral, slightly positive, positive). DistilBERT tokenization method is used for word embedding. For training and fine tuning in clinical domains, three traditional ML based methods, three Boosting based methods, and DistilBERT method, are utilized in model development. We found the best hyper-parameters for all models using Grid-CV search method. The results reveals that the fine-tuned DistilBERT-based model with corresponding word embedding representation, achieved the best results, with accuracy and F1-Score of 90.13% and 90% in two classes, 88.43% and 88% in three classes, and 76.15% and 76% in five classes, respectively. Due to the high accuracy and transparency in decision-making, the proposed models can be used as an auxiliary tool in clinics and medical centers.

Article Details

Section
Articles