- Dataset Problems π€
- π The Drug Review Dataset is taken from the UCI Machine Learning Repository. This Dataset provides patient reviews on specific drugs along with related conditions and a 10-star patient rating reflecting the overall patient satisfaction. The data was obtained by crawling online pharmaceutical review sites.
- π The Drug Review Data Set is of shape (161297, 7) i.e. It has 161297 Data Points or entries and 7 features including the review.
- π The goal of the problem is to recommend top 5 useful drugs per each different medical conditions based on reviews and calculated usefulness from rating * usefulCount * eff_score(normalized average rating).
- π Let's treat this a multi-class classification problem.
- π Choose the best machine Learning Models / Deep Learning Models with highest Accuracy Score and F1 Score to recommend the top 5 most useful drugs for each different Medical Conditions.
- Dataset Description π§Ύ
π There are 7 variables in this dataset:- FEATURES
- uniqueID | An identifier for each post.
- drugName | The name of the drug for which review is made.
- review | The review made by patients for a particular medicine.
- rating | Ratings, given by the patients to each medicine on a scale of 10 where 10 represents the maximum efficacy.
- date | Date of review entry.
- usefulCount | The number of users who found the review useful.
- condition | The name of the medical condition for which the medicine is used.
- Machine Learning Modules π¨βπ»
π The models used in this notebook:- Linear Support Vector Machine (LinearSVC),
- Multinomiaa Naive Bayesian (MNB),
- Light Gradient Boosting Machine (LGBM),
- Passive Aggressive Classifier,
- Outcome β
- π Recommend the top 5 most useful drugs for each different Medical Conditions by calculated usefulness through python @interact.
- π Recommend the top 5 most useful drugs for each different Medical Conditions by the best Machine Learning models or Deep Learning models.
drugsComTrain_raw.csv
: the train dataset file.drugsComTest_raw.csv
: the test dataset file.
Passive Aggressive Classifier
- Accuracy achieved: 93.91%
- In this study respectively,
- We have tried to predict a multi-class classification problem in Drug Dataset by a variety of models to to recommend top 5 drugs for each different medical conditions based on revews given.
- We have made the detailed exploratory analysis (EDA).
there is missing values on the 'condition' column and drops rows containing missin values.
- Check the top 10 Common Medical Conditions
"Birth Control", "Depression", "Pain", "Anxiety", "Acne", "Bipolar Disorder", "Insomnia", "Weight Loss", "Obesity" and "ADHD".
- Check the top 10 Common Drug Names Used
"Levonorgestrel", "Etonorgestrel", "Ethinnyl Estradiol / Norethindrone", "Nexplanon", "Ethinnyl Estradiol / Norgestimate", "Ethinnyl Estradiol / Levonorgestrel", "Phentermine", "Sertraline, "Escitalopram" and "Mirena".
- Check the top 10 Most Drugs Available per Condition,
"Pain", "Birth Control", "High Blood Pressure, "Acne", "Depression", "Rheumathoid Arthritis", "Diabetes Type 2", "Allergic Rhinitis", "Osthoarthritis" and "Bipolar Disorder".
- Check Most Drug Available to be Used for Many Conditions
"Prednisone", "Gabapentin", "Ciprofloxacin", "Doxycycline", "Amytriptyline", "Metronidazole", "Venlafaxine", "Neurontin", "Dexamethasone" and "Lyrica".
- The review length has no clear effect on drugs ratings.
- Perform data cleaning, wrangling and feature engineering with
- Remove all the hyperlink, html tags, punctuation, Numbers, Symbols, Special Characters, space, accented characters an stop words
- Decontract text
- Tokenize using NLTK's word_tokenize
- Make all texts to lowercase
- Lemmatization
- Text string formation)
- Clean Medical Conditions Columns Containing Redundant Information
- Remove Any Person Name, Location Name, Organization Name, Date & Time, Money, etc by NER
- Remove DataFrame Rows where The Medical Conditions has Only 1 Drug
- The suitable NGrams for building machine learning model is 2-grams and 4-ngrams.
- The positive reviews are 70% of the data. This is imbalanced data.
- The best model is Paassive Aggressive Classifier with 92.75% accuracy.
- Provided 2 ways of analyzing 3/5 most useful drugs per medical conditions
through calculated effectiveness and usefulness of Drugs displayed using pyhton @interface magic function. through machine learning drugs recommendation system. (The extracted keywords from reviews, bring meaningful context to each medical condition showwn by most informative features reviews fro each different classes.) -> Top 5 drugs recommended based on each conitions.
- Kaggle Notebook π
- Prescription Drugs using Consumer Reviews by ABDELRHMAN RAGAB
- Recommendation Medicines by using a review by CHOCP, EUNJOO MIN, JUYEON PARK, JY LEE & SUMIN
- Word clouds of various shapes by AASHITA KESARWANI
- Github Notebook π
- Drugs-Recommendation-using-Reviews by SHARMAROSHAN
- Online Articles π
- Drug Recommendation System by RUTHVIK MARSHETTY
- Predict Patientβs Medical Condition based on Medicine Review β Part 1 by Hamiz Ahmed
- An Example of Word Cloud with Mask by Eduardo Andrade
- Creating Stylish, High-Quality Word Clouds Using Python and Font Awesome Icons by Max Woolf
- Online Learning Channel π
- Master Artificial Intelligence 2022 : Build 6 AI Projects by Dataisgood Academy