Drug Recommendation System in Medical Emergencies Using Machine Learning
Drug Recommendation System in Medical Emergencies Using Machine Learning
C M ounika K Poorvitha
Dept. of Information Technology Dept. of Information Technology
Sree Vidyanikethan Engg. College Sree Vidyanikethan Engg. College
Tirupati, India Tirupati, India
[email protected] [email protected]
Abstract— Online recommender systems are being used state may be deduced from a variety of case data using deep
increasingly often for hospitals, medical professionals, and learning drug recommendation models, which can map medical
drugs. Today, the great majority of consumers look online concepts into implicit vector representations. Early drug discovery
before asking their doctors for prescription suggestions for a often entails the identification and characterization of targets, lead
range of health conditions. The medical suggestion system can discovery, and lead optimization. M L and DL have become
be valuable when pandemics, floods, or cyclones hit. In the age popular methods for finding new drugs. The entire process of
of Machine Learning (ML), recommender systems give more finding new drugs uses M L and DL algorithms, rather than just a
accurate, precise, and reliable clinical predictions while using single stage.
less resources. The medicine recommendation system gives the
patient reliable information about the medication, the dosage,
and any possible adverse effects. Medication is given based on
the patient's symptoms, blood pressure, diabetes, temperature, II. LITERATURE SURVEY
and other parameters. Drug recommendation systems provide Yan Chao Tan et al. [1], proposed a Prescription help for clinicians
precise information at any time while improving the using a symptom set-based drug recommendation framework with
performance, integrity, and privacy of patient data in the patient privacy protection. They specifically proposed Symptom-
decision-making process. Recommender system, the decision based Set-to-Set Small and Safe medication suggestion, which
tree produces the most accurate results. In times of medical includes a unique set-to-set comparison module, symptom set
emergency, a drug recommendation system is helpful for module, and drug set module (4SDrug). This study has some flaws,
giving patients recommendations for safe medications. such as the failure of the proposed approach to forecast diseases.
There are no dose recommendations in the proposed approach.
Keywords— Machine learning, Decision tree, Recommender S. M utagen et al. [2], a Pipelines for drug research and
systems, Medicines development are large, intricate, and dependent on a variety of
factors. M achine learning (M L) techniques provide a collection of
tools that help improve discovery and decision-making for well-
defined issues with a large amount of excellent data. Opportunities
to employ machine learning occur at many phases of drug
I. INTRODUCTION
development. Target validation, the discovery of prognostic
biomarkers, and the analysis of digital pathology data in drug trials
These computer-assisted computational methods, which were are some examples. The contexts and methodologies of
initially studied in the 1950s, have already been used to drug applications have varied, with some methods producing precise
development, bioinformatics, and cheminformatics. With an forecasts and insights.
emphasis on all-encompassing care, a conventional method to S. Garg, Anjum Unisa et al.[3], proposed a medicine
medication discovery has been adopted. The growing accumulation recommendation system that uses cutting-edge methods such as
of Electronic Health Records (EHRs) offers medical health machine learning, data mining, and others to uncover interesting
researchers strong assistance. The current state of affairs in the information buried in medical data and reduce mistakes made by
globe, people are becoming increasingly concerned about their doctors while prescription medications. System is comprised of the
health and medical diagnosis challenges. According to a survey, database module and the data preparation module.
55% of those with Internet access use it to search for health-related
information. By examining the search phrases used in well-known A. Abdelkrim et al. [4], A new feature selection strategy based on
search engines, a study was carried out to ascertain the real random forests is suggested for an efficient classification problem.
frequency of health-related online searches. Additionally, early They compare our feature selection strategy to base-line support
work on describing and categorizing these queries should be vector machine and artificial neural network classifiers. The
done. The NCBI article states that about 99,000 individuals each prediction of Drug-Target Interaction Using Weisfeiler-Lehman
year pass away because they don't receive prompt medical Neural M achine is another machine learning application given in
attention. Based on a patient's current state of health, the drug the paper.
recommendation job proposes the best medicine combinations for
them. The association between medications and patients' health
M . D. Hossain et al. [5], a system that recommends medications Rohan Gupta et al. [12], M edication readiness and advancement is
and can greatly lessen the workload of specialists. Researchers an important aspect of drug organisations' and drug researchers'
developed a system for suggesting drugs in this study that uses research. Nonetheless, incompetence, item delivery, efficient use
patient evaluations to anticipate sentiment using a number of of time, and significant costs create impediments and difficulties
vectorization approaches such as Bow, TF-IDF, Word2Vec, and that affect science and disclosure. Furthermore, genomic,
manual feature analysis. System can assist various classification proteomic, microarray data, and solid, massive clinical medication
algorithms in suggesting the best treatment for a particular disease. data are interfering. with the medication recognition organisation.
To evaluate predicted sentiments, precision, recall, f1score, AI and ability knowledge play a significant role in revelation and
accuracy, and AUC score were utilised. improvement. Finally, neural organisations and top -down learning
calculations have shifted areas. Peptide blend, analytic based,
J. Shang, M ong li le, et al. [6], Graphs are used to depict the variation-based ligand, harmfulness expectation, drug control and
proposed system, drug interactions from an external drug database, discharge, drug screening, pharmacological activity, useful
and drug co-occurrences from the EHR. PREM IER surpasses
connections - drug, polypharmacology, physicochemical
material removal medicine recommendation algorithms in tests movement. In this segment, historical evidence emphasises the use
using M IM IC-III and a sensitive outpatient dataset, achieving the of specialised insight and in-depth research. Similarly, the ability
best balance of accuracy and drug-drug interaction. to extract, group, and manage new data has significantly improved
Sun, J., Gamenet, et al. [7], proposed system will apply data fusion the calculation plan. As a result, innovation and significant
to reduce the needless strain on the system's processing resources progress consider better medication planning and disclosure, which
and enhance the effectiveness of the suggested system in will eventually influence individuals.
anticipating and advising this potentially fatal condition. To
forecast disease, an ensemble machine learning model is trained.
Utilizing a well-known disease dataset, this adaptive method is
evaluated, and the results are contrasted with the most current
advances in the field. III. M ETHODOLOGY
The BNN model is currently being used to recommend
the drug. BNN represent all of the random variables in the
A. Sedik, Constanze Knahl, et al.[8], Authors undertake a study of problem, as well as the conditional dependencies between them.
the literature on current medical recommender system solutions, However, neural networks are extremely complex, and their
characterise and contrast them according to different aspects, and accuracy is low. Using BNN, the correct dosage was not suggested.
suggest potential future research areas. The time complexity of this type of drug recommender system is
Himanshu Gupta et al. [9], propose a strategy for determining the high.
condition based on the patient's symptoms and then recommending
the appropriate treatment. To accomplish the goal, a Decision Tree Proposed S ystem
M ap, Naive Bayes model, and Random Forest algorithm are used. M any health severities occur because of a lack of
This work investigates the development of a system that performs immediate health consultancy and the right amount of drug dosage
the twin duties of sickness prediction and pharmaceutical intake. Identifying the right disease based on the symptoms is
suggestion in order to improve the performance of the current happening only with offline doctor consultancy. Identifying the
system. right drug for the combination of diseases is needed to avoid side
S. Dongre, M ahima; Nayak, et al. [10], Drug recommendation effects. The proposed online drug recommender system provides
systems are created to help users choose the best medication for a immediate health consultancy and it also suggests the right amount
specific health problem based on reviews made by other users on of drug dosage, identifies the disease based on symptoms, and
various medications for various specific condition. The purpose of suggests a drug for the combination of diseases. This recommender
this recommendation system is to examine the dataset using data system fulfills the bas ic first aid needs of patients. Users can use
mining concepts, sentiment analysis, and visualisation, and to the web for the basic emergency first aid.
recommend drugs based on each patient's health condition, ratings, A large number of medications used in clinics and health centres in
and reviews using machine learning techniques, content, and our daily lives are difficult to distinguish. It can also be unpleasant
collaborative filtering methods. to realise every day unless you know exactly what you are doing.
Paula Carracedo-Reboredo et al. [11], The purpose of the drug Drug is possibly the most important way to improve your well-
disclosure is to monitor new medicines with clear treatments. The being and prosperity. Standards are initially used to define a
approaches employed in this study have recently attracted certain model. With the use of structured data, machines may now
significant attention in software engineering, as has the majority learn to illustrate and perform simple estimations. They developed
rules system's fast progress of AI techniques. In order to meet both models that may forecast the usage of drugs and their behaviours
the new problems and the objectives of the Advanced M edicine using SVM . The model can also suggest medications for a
Initiative, a reliable, efficient, and fundamental computing particular patient.
approach must be established. Predictive models based on AI have
been helpful up until this point in the pre-clinical stage. The price
and amount of time needed to produce new medicines are
considerably reduced by this process. This audit focuses on the
most recent instances of research using this new technique. An
industry-wide inquiry will provide light on the best outcomes,
where chemo medicines will be produced in the future, and where
they will end up. The focus of this audit will be on atomic data
visualisation as well as biological problems investigated by
machine learning algorithms that have recently been used to
identify medications.
IV. RESULTS
A. Generating accuracy for the trained and test results
Table 1 can predict the accuracy values for the four algorithms,
with Decision Tree classification having the highest accuracy when
compared to the other models.
B. Classification report
Fig 1. Process Workflow The classification report of 4 algorithms models based on the
review dataset.
The Three stages make up the medication recommender system's
process. The data set must be uploaded first. The data collection Table 2. Classification report of precision and recall
includes characteristics like age, medication, dose, and conditions. s.no Model Precision recall
Pre-processing of data happens after the data set has been
submitted. Data pre-processing is the cleaning and filtering of data. 1 Decision Tree 1.00 1.00
It identifies and rejects null values, empty values, and repetitive
2 Random Forest 0.95 0.96
rows from the decision-making process, resulting in high accuracy.
The feature extraction approach converts unprocessed raw data 3 Logistic regression 0.66 0.73
into numerical features that may be handled while retaining the
original data set's content. Following that, the medicine is 4 Navie Bayes 0.96 0.97
categorised according to blood pressure and sugar levels. There are
two divisions in the categorization of medications. Different
medications are administered to individuals with normal and Table 2 can give the classification report of the 4 models with the
abnormal illnesses. We employ machine learning methods to respective metrics as precision and recall values. In which
choose the best medication and dose. Decision Tree has higher precision and recall metrics can obtained.
for x in request.form.values() Table 3 can give the classification report of the 4 models with the
respective metrics as F1-score and support values. In which
feature <- [np.array(x)] decision tree has higher precision and recall metrics can obtained.
C. Confusion Matrix
drug_pred <- drug.predict(features)
The Decision tree classification algorithm performed better that the
dosage_pred <- dosage.predict(features)
remaining models when the vales is set to the Drug and the
Dosage.
side_pred <- side.predict(features)
return drug_pred+dosage_pred+side_pred
End for
Accuracy
120
100
80
60
40
20
0
Logistic Rando
Decisio Navie
Regress m
n Tree Bayas
ion Forest
Accuracy 99.3 73.23 97.2 96.73
D. Classification Metrics
F. Viewing Train and test accuracy results:
The line chart shows the accuracy results of the 4 models and its
ranging from 94 to 96.
The plots of bar graphs show the accuracy of trained and test
values for the four algorithms models.
Here Fig 4 displays the results of training and test data from the
dataset, allowing for visualisation of the accuracy outcomes. The
Naviebayes, Random forest, Logistic regression, and decision tree
classifier algorithms produced the following findings.
40
[1]. Yanchao Tan, Chengjun Kong Dominic Clark, Paul Czodrowski ,
20 Ian Dunham, Edgardo Ferran, George Lee, Bin Li,
Anant Madabhushi, Parantu Shah, Michaela Spitzer and
Shanrong Zhao/ KDD ’22, August 14–18, 2022, Washington, DC,
0 USA
Logistic
Decision Random Navie
Regressi [2]. [2] S. Momtahen, F. Al-Obaidy and F. Mohammadi, "Machine
Tree Forest Bayas Learning Drug Discovery and Development," 2019 IEEE Canadian
on
Conference of Electrical and Computer Engineering (CCECE), 2019,
Accuracy 99.3 73.23 97.2 96.73 pp. 1-6, doi: 10.1109/CCECE.2019.8861842.
Precison 100 66 95 96 [3]. [3] S. Garg, "Medicine Recommendation System Based On Patient
Reviews," 2021 11th International Conference on Cloud Computing,
Recall 100 76 96 97 Data Science & Engineering (Confluence), 2021, pp. 175-181, doi:
10.1109/Confluence51648.2021.9377188.
[4]. [4] A. Abdelkrim, A. Bouramoul and I. Zenbout, "APPLICATION
OF MACHINE LEARNING IN DRUG DISCOVERY” 2021
Fig 6. Comparison of 4 algorithms. International Conference on Theoretical and Applicative Aspects of
Computer Science (ICT AACS), 2021, pp. 1-8, doi:
10.1109/ICTAACS53298.2021.9715218.
[5]. M. D. Hossain, M. S. Azam, M. J. Ali and H. Sabit, "Drugs Rating
Generation and Recommendation from Sentiment Analysis of Drug
Reviews using Machine Learning," 2020 Emerging Technology in
Computing, Communication and Electronics (ET CCE), 2020, pp. 1-
6, doi: 10.1109/ETCCE51779.2020.9350868.
[6]. J. Shang, T. Ma, C. Xiao, and J. Sun. Pre-training of graph
augmented transformers for medication recommendation. In IJCAI,
pages 5953–5959, 2019.
[7]. J. Sun. Gamenet ,C. Xiao, T . Ma, H. Li: “A Smart Healthcare
Recommendation System for Multidisciplinary Patients with Data
Fusion Based on Deep Ensemble Learning”. In AAAI, pages 1126–
1133, 2020.
Fig 7. Drug recommender system inputs
[8]. A. Sedik, M. Hammad, F. E. Abd El-Samie, B. B. Gupta, and A. A.
A. El-Latif, “Effiffifficient deep learning approach for augmented
detection of Coronavirus disease,” Neural Computing &
Applications, vol. 8, 2021.
[9]. N. Varshney, S. Ahuja and Kanishk, "An Intelligence System for
Medicine Recommendation: Review," 2021 5th International
Conference on Information Systems and Computer Networks
(ISCON), 2021, pp. 1-5, doi: 10.1109/ISCON52037.2021.9702342.
[10]. S. Dongre and J. Agrawal, "Drug Recommendation and ADR
Detection Healthcare in IEEE T ransactions on Computational So cial
Systems, doi: 10.1109/TCSS.2022.3231701.
[11]. Paula Carracedo-Reboredo, Jose Linares-Blanco, Nereida
Rodriguez-Fernandez/ 2021 “A review on machine learning
Fig 8. Drug recommender system output approaches and trends in drug discovery
[12]. Rohan Gupta, Devesh Srivastava, Mehar Sahu, Swati
Tiwari, Rashmi K. Ambasta, and Pravir Kumar/ 2021 “ Artificial
intelligence to deep learning: machine intelligence approach for drug
discovery”
V. CONCLUS ION AND FUTURE WORK
Taking right amount of dosage of drug is important. Immediate [13]. N. F. Yıldız and A. Özcan, "Using Supervised Machine Learning
recommendation of drug is needed to avoid complications in health Algorithms For Drug T arget Interaction Prediction," 2022
problems. The proposed system recommends right amount of drug Innovations in Intelligent Systems and Applications Conference
and its dosage along with side effects. Every age group need to (ASYU), Antalya, T urkey, 2022, pp. 1-5, doi:
10.1109/ASYU56188.2022.9925433.
take different amount of dosage, that is the key to recover, so the
drug recommendation system takes age as key element to [14]. R. Biswas, A. Basu, A. Nandy, A. Deb, K. Haque and D. Chanda,
recommend the drug. Decision tree was the key algorithm which is "Drug Discovery and Drug Identification using AI," 2020 Indo –
giving high accuracy for predicting the drug. Development has Taiwan 2nd International Conference on Computing, Analytics and