Three models that predict whether a patient's drug review is positive (rating 7-10) or negative (rating 1-4), trained for the project github.com/temiloluwadeboye/drug-review-sentiment.
| File | Model |
|---|---|
baseline.joblib |
TF-IDF + Logistic Regression (scikit-learn pipeline) |
lstm.pt + lstm_vocab.json |
LSTM trained from scratch in PyTorch (weights + vocabulary) |
distilbert/ |
Fine-tuned distilbert-base-uncased (Hugging Face format) |
| Model | Accuracy | Macro F1 | Negative recall |
|---|---|---|---|
| TF-IDF + LogReg | 0.843 | 0.828 | 0.734 |
| LSTM | 0.847 | 0.835 | 0.771 |
| DistilBERT | 0.884 | 0.874 | 0.822 |
DrugRev (Ahmed et al., 2023, Mendeley Data, CC BY 4.0): patient reviews from Drugs.com, deduplicated to 226,291 reviews; neutral ratings (5-6) removed.
distilbert/model.safetensors 268 MBlstm.pt 11 MBdistilbert/distilbert-base-uncased