Since COVID-19 our medical fraternity is in distress, which results in numerous individuals demise. Due to unavailability, so people independently started taking medicines without proper consult which led to even worse condition. In such case Machine Learning can be useful to build the Prescription system that uses the reviews of patients using various NLP techniques and recommend the top drug for given disease.
Number of data points: 161,297
Number of unique drugs: 3,436
Number of disease: 884
Timespan: Apr 2008 - Sep 2017
Attributes: 7
Attribute Information:
- UniuqeID -
- DrugName - Drug Name
- Condition - Patient condition
- review - reviews given by patient after drug consumption
- ratings - ratings given by patient after drug consumption (0-10)
- date - Date when review given by patient
- UsefulCount - Number of patient marked it as useful
Target Var:
- Drug: Prescribe the best Drug based on sentiment of patients.
To build Prescription model, which help in Prescribing the best drug based on given conditions and sentiment of patients.
Observation: There is a huge spike in ratings from 2014.
Observation: By looking at CDF it seems that out of 800 unique conditions our 90% of data includes only top (50-75) conditions
- Creating Word Cloud for Likes i.e (positive / negative reviews)
- We can observe the most frequent occuring words for negative / positive reviews
- So after loading the data we started with EDA process to understand the data through visualizations and also handles outliers and NaN values.In feature engineering we have created some of the features like rating per year,Last time prescribed drug,rating from 1-10.
- With help of Natural language processing we tried to understand the sentiment of patient w.r.t.o drug for given condition and calculated sentiment score (0-1) with help of inbult library sentiment_analyzer in NLP.
- After EDA & Feature engineering we scaled the data using MinMax scaler and with important features we have applied scoring process by manually adding weights to each feature and calculated score.
- After that we build the recommender system where by inserting the given condition it will provide top 5 best drugs with higher scores.