0% found this document useful (0 votes)
22 views24 pages

Big Data Analysis On Medical Field For Drug Recomm

Uploaded by

Shashank Yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views24 pages

Big Data Analysis On Medical Field For Drug Recomm

Uploaded by

Shashank Yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Multimedia Tools and Applications

https://doi.org/10.1007/s11042-024-18832-6

Big data analysis on medical field for drug recommendation


using apriori algorithm and deep learning

Sarbani Dasgupta1 · Banani Saha2

Received: 12 June 2023 / Revised: 8 February 2024 / Accepted: 27 February 2024


© The Author(s), under exclusive licence to Springer Science+Business Media, LLC, part of Springer Nature 2024

Abstract
Drug recommendation in the medical field is a challenging real-world task to choose
the best medications to give patients based on their medical histories and symptoms.
In this designed model the primary intention of this model is to recommend the Drugs
for patients. Drug review data are collected as a dataset. These collected data are pre-
processed using the missing value replacement method to increase the dataset’s quality.
The apriori algorithm, an association rule-based classification method used to associate
the received drug data according to the user’s rating and review, is then used to organ-
ize the pre-processed data. These categorized or associated data are trained using the
Bi-LSTM algorithm for recommending the best drug to the user based on the condition
of the user. Precision, specificity, Accuracy, F1_score and recall, are some of the perfor-
mance metrics for this designed model. The attained performance metrics values for the
proposed model are 97, 97, 98, 98 and 97. Comparisons are made between the evaluated
values and those produced using various existing approaches in which proposed showed
better results. Therefore, the existing methodology for big data analysis in the medical
sector for drug recommendation is less successful than the Apriori algorithm and deep
learning.

Keywords Drug Recommendation · Apriori · Bi-LSTM · Missing value replacement ·


Deep learning · DNN

1 Introduction

Personalized medicine prescription is one area of health care where intelligent


information management and information interchange act as essential conditions
for delivering high-quality services. This is particularly observable when numer-
ous drug prescriptions are needed [1]. The wide range of easily available pharma-
cological substances and the various excipients that include the former makes the

* Sarbani Dasgupta
[email protected]
1
Department of MCA, Techno International New Town, West Bengal 700156, India
2
Department of CSE, University of Calcutta, Kolkata, West Bengal 700073, India

13
Vol.:(0123456789)
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

issue worse [2]. Drug prescription is a challenging undertaking characterized by


identifying probable interactions or contraindications [3] because of the many fac-
tors involved. The proportion of real or active ingredients in counterfeit drugs is
inappropriate and may be low or high. They are also made with hazardous contami-
nants, and utilizing them can cause serious health issues for people [4]. Sometimes
the manufacturers of these fake drugs exploited the name of an established, recog-
nized pharmaceutical company to launch their products swiftly [5]. Therefore, these
medications impact the sales of well-known and widely used medications, including
antibiotics, cancer treatments, painkillers, numerous other heart medications, etc.
They also have many negative consequences and worsen pre-existing medical dis-
orders. Over the past few decades, a sizable amount of clinical data documenting
patients’ health states, including doctor reports, test results, and plans for treating
disorders, has been gathered. As a result, far more digital data is now accessible for
patient-centred decision-making [6]. Because such digital content is usually distrib-
uted across several websites, users have difficulty finding pertinent information to
improve their well-being. Additionally, it might be challenging for medical profes-
sionals to select the appropriate treatments for patients because they frequently get
therapy recommendations [7].
Modern algorithms are used in the Drug Recommendation System (DRS) due
to numerous technologies that have been developed. Several machine learning
approaches, such as clustering, sentiment analysis, association rule mining, stack-
ing artificial neural networks, etc., are the foundation of the bulk of modern DRSs’
recommendation algorithms. Only a few people use other tactics, such as the ontol-
ogy-based technique [8]. Most of the DRS under review did not account for patient
details like age and pre-existing medical conditions (such as allergies and preg-
nancy), etc., nor did they consider user comments. It recommends a DRS based on
some of the observed issues that will recommend suitable medications while con-
sidering the individual features of patients [9]. After optimizing the Standard Gold
Dataset (SGD) biological dataset, a biological interaction was discovered by look-
ing at the drug molecule and protein structures to ascertain the connection between
treatment and target for breast cancer [10]. It constructed a machine learning model
utilizing a linear machine learning technique to classify our Standard Gold Dataset
(SGD) using Logistic Regression, Linear Discriminant Analysis (LDA) and Support
Vector Machine.
The above-mentioned systems effectively screened a number of unrelated chemi-
cals and did well in tests, but a few issues still need to be fixed [11]. First, prescription
drugs prescribed by doctors correspond to the patient’s symptoms, as opposed to product
recommendations made via e-commerce based on user preferences [12]. Current strate-
gies choose community-based rehabilitation (CBR) to avoid or reduce this issue to a sin-
gle symptom-drug relationship. Even if it can be challenging to manage, the relationship
between a symptom and a drug greatly impacts how accurately the decision is made in
the end. Second, electronic medical records (EMRS) do not consider free SMS texts [13].
The free text, which incorporates latent traits of distinct patients, is the most changeable
part of a general practitioner’s (GP) written notes. Customization benefits from the extract-
able differentiating characteristics [14]. Third, because many new drugs are introduced
each year to improve therapeutic performance, GPs will be better able to identify the trend
in the leading edge by evaluating the temporal efficiency of pharmaceuticals. The three

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

parameters mentioned above will impact the prescription recommender system’s accuracy
and practical utility, which have not been thoroughly demonstrated in past studies [15].
Deep learning and the Apriori algorithm were utilized in the medical industry’s huge data
analysis to resolve the issues for drug recommendation. These are the main contributions
of the created model.

• Big data analysis on the medical field for drug recommendation using apriori algorithm
and deep learning.
• KNN based missing value replacement technique is used to replace the missing values
using nearest neighbour to improve data quality.
• An apriori algorithm is used for categorizing the effective drugs from the prevailing
drug based on review and rating according to the patient’s symptoms.
• Bi-LSTM algorithm is used for predicting the best drug to the user based on varying
patients details such as pre-existing medical condition.

In next sections of the paper are organized in the following ways: A list of articles that
have been examined and linked to drug recommendations can be found in Section 2, and
a brief explanation of the suggested methods can be found in Section 3. Before the study
article is closed in Section 5, the experimental results for the proposed model are illustrated
in Section 4.

2 Related works

In this section, most of the detailed articles related to Drug recommendation using different
algorithms are studied, and some of them are reviewed below with drawbacks.
Sahoo et al. [16] developed deep learning approach for recommending drugs to the
user in big data analytics. An intelligent HRS employs the Convolutional Neural Net-
work (CNN) - Restricted Boltzmann Machine (RBM) technique using deep learning.
This approach demonstrates an opportunity for the healthcare industry to transition
from a typical scenario to a more individualized paradigm in a telecommuting environ-
ment and provides information on how big data analytics can be applied to build effec-
tive healthcare suggestions. Root Square Mean Error (RSME) and Mean Absolute Error
(MAE) data show that the proposed deep learning approach (RBM-CNN) makes fewer
errors.
Sae-Ang et al. [17] provided machine learning systems that produce a relevant list of
drugs under a patient’s diagnosis. Currently, clinicians make suggestions by hand, but
patients with numerous comorbidities may find this difficult. It looked at how prescription
drug recommendations were made using data from patients who are elderly adults with
diabetes, cardiovascular disease and hypertension, often saw medical care centres and have
a number of diseases. Both collaborative filtering methods and traditional machine learn-
ing classifiers were examined. The combined findings of the two models were an AUC of
74.52% on a macro-averaged basis, recall at five of 76.61%, precision at five of 46.20%,
and average physician agreement of 47.50%.
Abbas et al. [18] performed and implemented a brand-new drug supply chain manage-
ment and recommendation system (DSCMR) based on blockchain and machine learning.

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

The two key components of our suggested solution are a blockchain-based drug supply
chain management system and a machine learning-based consumer drug recommendation
system. The medicine supply chain management system in the first module, which can con-
tinuously track and monitor the drug distribution process in the modern pharmacy field, is
built using hyper ledger fabrics. In contrast, the machine learning module uses the N-gram
and Light GBM models to advise the most suitable or efficient medications to clients in the
pharmaceutical industry.
Dongre and Agrawal [19] presented an updated evaluation of the knowledge gaps in
the clinical recommendation system, potential pharmaceutical repositories, and adverse
drug reaction (ADR) studies. The classification of ADR using naive Bayes, SVM, linear
regression, deep neural networks and the random forest is also covered on this page. The
clinical feature extraction and the pre-processing method suggested for drug prescrip-
tion and ADR classification is then presented in this article. This methodology examined
the relationship between linguistic diversity and clinical traits in pre-processed clinical
tweets. This method’s disease-to-drug and patient-to-disease similarity indexing also
includes cooperative filtering and multilayer content. It is a good example of the vari-
ety of advantages and disadvantages of collaborative filtering. ADR identification and
medicine prescribing have improved thanks to the collaborative association for screening
comparable clinical entities.
Bhimavarapu et al. [20] suggested by Machine learning (ML)-based recommender
systems produce clinical recommendations that are more accurate, quick, and eco-
nomical. These systems provide precise information whenever required and guarantee
superior performance, data integrity, and patient privacy during decision-making. It
suggests stacking artificial neural network (ANN) model-based drug recommender sys-
tems to increase the equity and safety of treating infectious diseases. Medications are
suggested based on a patient’s past medical history, way of life, and habits to reduce
adverse effects. This technology may help recommend secure treatments to patients
during a medical emergency.
Mai et al. [21] describe a digital recommendation system that compares its recommen-
dations to those of medical experts for the medication-assisted treatment of hypertension.
The therapy suggested method integrates routine care data (databased) from 298 medical
records and 900 doctor-patient contacts from 7 general practitioner practises with internal
evidence (knowledge-based) drawn from clinical recommendations and drug knowledge.
Data on customized treatment plans and SDM support targets are visualized in Graphical
User Interface (GUI). Twenty-three imaginary test patients (case vignettes) were used to
evaluate the CDSS, and its performance was compared against the recommendations of
five highly skilled medical experts.
Kalakoti et al. [22] presented a multiclass classification method based on machine learn-
ing that distinguishes between relations among inactive, active and intermediary drug-tar-
get couples. Chemical descriptors and drug compounds were converted into machine-inter-
pretable embeddings from datasets to extract relevant features of protein sequences. Tools
such as iFeature, CHEMBL web resource, and a custom developed deep neural network
aided drug recommendation (dNNDR)-featx were utilized for data extraction and process-
ing. The models were created using big DTI datasets, and the outcomes have shown that
they outperformed more traditional methods. According to the results of external valida-
tion, methods based on gCNN and att-biLSTM can predict novel DTIs. The models per-
formed far better than the competing methods.

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

Azuma et al. [23] developed incorporating directionality, a characteristic of pharmacological


effects, into predicting drug effects using neighbourhood regularised bidirectional matrix
factorization (NRBdMF). With the aid of a matrix that considered pharmaceutical directionality,
this method was utilized to predict adverse effects. While known therapeutic effects were given
a negative (1) label, known side effects received a positive (+1) designation. By placing side
effects at the top and indications at the bottom of the prediction list, the NRBdMF model, which
uses bidirectional drug information, was able to improve it. This preliminary use of NRBdMF to
account for the bidirectional nature of pharmacological effects showed a decrease in false positives.
The majority of the articles evaluated above are related to the Drug recommendation.
Training is more challenging because Restricted Boltzmann Machine is challenging to
calculate the Energy gradient function [16]. Because collaborative filtering can’t detect the
underlying link between synonyms, it will treat these products differently [17]. N-grams
may not occur frequently in the training data, resulting in low or zero probabilities [18].
The assumption of linearity between dependent and independent variables [19]. ANN can’t
generalize from a small set of training data. Neural network models tend to overfit on smaller
datasets [20]. Due to time restrictions, routine care implementation is challenging [21]. They
fail to encode the position and orientation of objects [22]. The Accuracy rate is low [23].

3 Proposed methodology

The importance of online recommendation engines for clinics, physicians, and pharmaceuticals
is rising. Most consumer’s today search online for drug advice for various health conditions.
The medical recommender system may be useful in a pandemic, flood, or hurricane. This drug
recommendation can be used as an online health care system for aged and sick patients to
avail of the best drug for the people. In this paper, the Drug recommendation is based on the
big data analysis in the medical field for drug recommendation using an apriori algorithm and
deep learning. Figure 1 illustrates the process flow of the Drug recommendation.

Fig. 1  Process flow of the drug recommendation system

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

In the proposed method, a dataset is created from the drug review data based on
the medication’s review, rating, and usefulness count. In order to improve the dataset’s
quality, these acquired data are pre-processed using the missing value replacement tech-
nique. The KNN technique, based on the distance to the nearest neighbour, is applied to
replace the missing data in this case. Then, the pre-processed data are organized using
the apriori algorithm, an association rule-based categorization technique used for asso-
ciating the collected drug data according to the rating and review of the user. These cat-
egorized or associated data are trained using the Bi-LSTM algorithm for recommending
the best drug to the user based on the condition of the user.

3.1 Pre‑Processing

The first step in processing raw data is preparing it for the main step or more analysis. The
KNN-based missing value replacement is employed in this pre-processing method.

3.1.1 KNN‑based missing value replacement

In Fig. 2, KNN algorithm is an instance-based learning technique and one of the top 10
data mining techniques. This approach is based on the idea that instances within a data-
set typically are near other instances with comparable attributes [24]. The KNN imputa-
tion is a good option when it doesn’t know how the data are distributed. This approach
chooses the K closest neighbours of an incomplete instance based on a distance metric
and then uses those neighbours’ mean or mode to approximate missing data. The mean
and mode rules are used to forecast the absence of numerical and categorical variables,
respectively.
The k-NN method, from which its name derives, imputes missing values in a case using
estimates from the k closest neighbours. By minimizing a distance function, typically the
Euclidean distance, defined as one can find the closest and most comparable neighbours.

)2
(1)
∑ (
E(c, d) = xci − xdi
i∈A

Fig. 2  Diagrammatic representa-


tion of KNN-based missing value
replacement

d d

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

where

• E(c,d) represents the difference between cases c and d,


• The values of the attribute i in cases c and d are xci and xdi respectively, and
• In all scenarios, A is the collection of characteristics having non-missing values.

The lowered variance problem is not as severe a problem for k-NN as it is for mean
imputation since k-NN imputes different values based on the case being imputed as
opposed to mean imputation, which imputes the same value (the mean), for all cases.
k nearest neighbours (donors) must be identified before creating an estimated
replacement value to replace the missing attribute value. Depending on the data type,
a replacement value can be determined using either the mean or the mode. The mode
is suitable for continuous data. It will instead use the median to suggest a replace-
ment value because it employs Likert data, where the magnitude of a value counts
and the mode may be tied (meaning that numerous values may occur at the same
frequency).

3.1.2 Neighbour strategy

Only complete examples can be used for hot-deck restoration and later for k-NN impu-
tation to impute missing values, or to put it another way, only complete cases can be
neighbours. According to the justification in the previous section, the values of attrib-
utes not in D have no impact on the Euclidean distance between cases. It implies that
this restriction can be loosened gradually. Thus, it is clear that there are two sepa-
rate methods for choosing neighbours. The first approach, which only permits entire
cases to be neighbours, is compatible with the frequently applied method. This shows
the impossibility of substituting a value for an incomplete case using other incomplete
cases. The CC strategy CC, standing for "full case", will refer to this tactic. All entire
cases and some incomplete examples can be handled thanks to the second technique.
A case can only be considered acting as a neighbour when it contains values for each
quality that the case being imputed has values for, in addition to the attribute being
imputed. The "IC strategy," where "incomplete case" stands for this method, will refer
to this strategy.

3.2 Association rule mining using apriori algorithm

Association mining is one of the most crucial data mining operations, which has also
been the subject of the most in-depth academic research. Data mining’s core task is
to extract association rules. An important research area in the dataset is the mining
of association rules in a database of sales transactions between distinct items. These
guidelines can reveal previously unrecognized connections and produce data that
can serve as a basis for predictions and decision-making. The process of finding
association rules is broken down into two stages: finding frequently occurring item sets
and creating association rules. Association rule learning is related to association rule
mining [25].

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

The following is a definition of association rule mining:


Let I = {i1 , i2 , i3 , … ..in } (2)
Here I denote an asset of items.
Let D = {t1 , t2 , t3 , … ..tn } (3)
Here t denotes sat of the transaction in the database.
Each transaction is given a special transaction id. It includes a portion of items I.
The following is how a rule is defined:
X => Y, X, Yϵ1 (4)
For Example,
Item set A => Item set B
The algorithm’s initial stage, which involves counting frequently occurring 1-length
item sets, is shown in Fig. 3. To accomplish this, count the number of times each item
appears in the database as you walk through the whole data set.
Following that, the process will be divided into two sections: creating candidate
item sets with the potential to be frequent and tallying the support needed for the
candidates.

null

A B C D

AB AC AD BC BD CD

ABC ABD ACD BCD

ABCD

Fig. 3  Flow diagram of the apriori algorithm

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

In this instance, item set A is an LHS, while item set B is an RHS. This indicates that
the products on the right are those that are regularly purchased, while the items on the
left are those that are present. The Apriori algorithm is used on a specific transactional
database to identify the rules for this. Typically, three measures are employed in this
technique. They are

1. Support
2. Confidence
3. Lift

Here is an explanation of these:


Let’s consider the rule A => B

1. Support

It is a clue to determine how frequently an item set appears in a specific dataset.


Based on the above equation, it calculates (3)
Number of Transactions with Both A and B
= P(A ∩ B) (5)
Total No of Transaction
2. Confidence
Finding how frequently the rule has been confirmed as true is a sign. Equation (5)
can be used to determine it.
Number of Transactions with Both A and B P(A ∩ B)
= (6)
Total No of Transactions With A P(A)

3. Lift

These two values are used to calculate it. Expected and actual confidence values. Equa-
tion (7) can be used to determine this.
Conf idence P(A ∩ B)
= (7)
Expected Conf idence P(A).P(B)

The pharmaceuticals with the highest ratings and best reviews are chosen and provided
to the Bi-LSTM classifier for training the data to recommend the best medicine based
on the condition of the medicine with the support, lift, and Confidence of the Apriori
algorithm.

3.3 Bi‑LSTM classification

To fully understand the Bi-LSTM, some basic LSTM concepts need to be understood.
The LSTM is a recurrent neural network (RNN) [26]. The main objective of LSTM is
to avoid the vanishing gradient problem, which affects RNN and results in the gradient
communicated back through the network either decaying or increasing exponentially
over time. RNN is not a good model for handling input circumstances with long-term
dependencies. An input gate, a forget gate, an output gate, and a cell state make up each

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

memory block. Equation (8)’s composite function uses these components to calculate the
hidden state h:

(8)
( )
it = σ Wxi xt + Whi ht−1 + Wci ct−1 + bi

(9)
( )
ft = σ Wxf xt + Whf ht−1 + Wcf ct−1 + bf

(10)
( )
ct = ft ct−1 + it tan h Wxc xt + Whc ht−1 + bc

(11)
( )
ot = σ Wxo xt + Who ht−1 + Wco ct−1 + bo

(12)
( )
ht = ot tan ct

where the input and output gates are denoted by ft , it and it respectively. Additionally, ot
represents the global cell state that facilitates the sharing of various cell outputs throughout
the LSTM networks, and ht denotes the cell output at time t .
A sigmoid function exists in the space where W denotes the weight matrices,
b denotes biases, and xt denotes the input vector for the memory cell at time t, σ .
This issue was addressed using an LSTM expansion dubbed bidirectional LSTM
(Bi-LSTM). After simultaneously training two separate LSTMs on the input sequence
in opposed orientations, a bi-LSTM blends the results. In additional terms, the
input xt is given into the LSTM for time t by employing all the data that is currently
available until the current frame time tc to estimate the variable ytc . Though the use
of the notion of a bidirectional network, the network will be able to anticipate ytc by
the input that attains after tc by delaying the output based on a specific number of M
frame time till xt+M . The gathered Bi-LSTM structure, which is used to calculate the
forward hidden sequence h�⃗ , backward hidden sequence h�⃗ , and output sequence y , is
depicted in basic form in Fig. 4. The output sequence y is created by iterating the
forward and backward layers. Additionally, if a max-pooling layer follows the layer
described in the preceding section.
After this layer, a layer is added that compiles the results from all earlier levels into
a single vector. The weights are typically used to the generated features α(w ∗ x + b),
where w ∈ Rm×m is the weights matrix and is the activation function in a fully connected
layer that employs weights to predict the class of input. Mathematically, for measuring
the difference between output label and predicted vector loss function is used.
Equation 13 displays the mathematical expression for loss function.
1 2
L(𝜗) = ̂)
(→ (𝜗) − → (13)
2 y y

In above equation → represents the predicted vector and →


̂ represents output label.
y y
As a result, this implements the medication recommendation based on the data collected
from the Apriori algorithm. Algorithm 1 illustrates the pseudocode of the proposed
drug recommendation system.

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

Algorithm 1  Big data analysis on the medical field for drug recommendation using Apriori
algorithm and deep learning

Input: medical data


Output: drug recommender to patients
For (all data) do
#Pre-processing
PR1= KNN based missing value replacement//
if
Missing value is present
then
perform KNN based missing value replacement using equation (1)
else
use the same data
#Association rule-based categorization
A1=Apriori algorithm//By using equation (2) to(7)
#Classification
B1 =Training Bi-LSTM// training the Bi-LSTM based on 80% of the data given
B2=Testing Bi-LSTM// testing the Bi-LSTM based on 20% of the data given
If (class=0)
Print “depression”
If (class=1)
Print “Emergency Contraception”
Else If (class=2)
Print “Weight Loss”
Else If (class=3)
Print “Birth Control”
Else If (class=4)
Print “Bipolar Disorde”
Else If (class=5)
Print “Obesity”
Else If (class=6)
Print “Vaginal Yeast Infection”
Else If (class=7)
Print “Acne”
Else If (class=8)
Print “Insomnia”
Else If (class=9)
Print “ADHD”
Else If (class=10)
Print “Pain”
Else If (class=11)
Print “Diabetes, Type 2”
Else If (class=12)
Print “ADHD”
Else If (class=13)
Print “Constipation”
Else If (class=14)
Print “Anxiety”
End
Output: Recommend effective drug to the patient based on their condition

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

Fig. 4  Block diagram of the proposed Bi-LSTM

4 Result and discussion

To prescribe a drug utilizing the Apriori algorithm and deep learning, the proposed technique is
put into practice for big data analysis in the medical industry. An Intel(R), Core(TM) i5-10300H
processor with a clock speed of 2.50GHz, 32.0 GB of RAM (31.8 GB of which is useable),
and a 64-bit operating system were used to evaluate the intended model in Python 3.8.8.
The drug review data are collected and pre-processed using the missing value replacement
technique to enhance the dataset’s quality by replacing the missing data in the column.
Then, the pre-processed data are organized using the Apriori algorithm, an association rule-
based categorization technique for associating the collected drug data according to the rating
and review of the user. These categorized or associated data are trained using the Bi-LSTM
algorithm for recommending the best drug to the user based on the condition of the user.

4.1 Dataset description

A data set employed in this model’s formulation includes patient reviews of particular medications,
information on concomitant conditions, and a patient rating of 10 stars, which reflects overall patient
happiness [27]. The information was gathered by browsing internet drug review sites. Attributes of
this dataset are Drug Name, Condition, Patient Review, Rating, Date, and Useful Count. Based on
this dataset, the drug recommendation system is designed. For recommending the drug name based
on the condition, 70% of the data are trained, and 30% of the data are used for testing.

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

A proposed model’s confusion metrics are shown in Fig. 5. A condensed table used to
evaluate the effectiveness of a classification model is referred to as a confusion matrix,
also known as an error matrix. Count values summarise and divide the number of accurate
and inaccurate predictions into each type. This confusion metrics evaluates the actual and
predicted data from the given dataset. The total data used for testing is 2250 in that 2232 are
predicted according to the actual class, and the rest of the 18 are predicted incorrectly.
Figure 6 illustrates the raw features of the proposed model, which consist of 7000 raw
features and 600 samples representing the drug recommendation system. In Fig. 7, the
Missing value replacement feature is plotted in the graph. KNN is an informative technique

Fig. 5  Measures of confusion for the proposed model

Fig. 6  Raw features of the pro-


posed model

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

Fig. 7  Missing value replace-


ment feature

for identifying a single point with its nearest k neighbours in a space with several dimen-
sions. It can handle continuous, independent, ordinal, and categorical data, which makes it
very effective for managing data that is missing.
Figure 8 illustrates the scatter plot of Confidence based on the support and lift of rules.
The plot mainly gives an overview of the distribution of support and Confidence in the
rule set. A rule can demonstrate a large association in a data collection because it appears
frequently, but it may occur considerably less frequently while implemented. Support
relates to the degree to which frequently a particular rule exists in the information set
that is being analyzed, whereas Confidence pertains to the number of instances a given
rule shows out to be accurate in practise. In the graph above, the confidence level for the
support is achieved with little rule repetition.
The Apriori algorithm and existing methods are shown in Fig. 9 as execution times.
The model’s execution time for several samples, including 7000, 6000, 5000, 4000,
3000, 2000 and 1000, are 198.6, 164.6, 140.5, 114.2, 89.8, 65.4,42 and 26. Likewise, the
execution time for the existing algorithm, such as Eclat and FP growth values are 268,

Fig. 8  Scatter plot of confidence


VS Support with lift

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

Fig. 9  Execution time of Apriori


algorithm and existing techniques

244, 227, 201, 179, 151, 108, 52 and 295, 273, 251, 236, 209, 197, 154, 79. The Apriori
algorithm executes faster than the existing model.
A Bi-LSTM and existing approaches accuracy comparison is shown in Fig. 10. Any
classification model that compares the classified image to another data source thought
to be accurate or ground truth data must be correct. The Bi-LSTM is compared with
other techniques, such as DBN, RBF, LSTM, and DNN. The Bi-LSTM and existing
approaches both attained an accuracy of 0.98, 0.92, 0.87, 0.97, and 0.94. The Bi-LSTM
model is more accurate than the existing techniques. Figure 11 illustrates the Bi-LSTM
and existing methods of Precision comparisons. The Bi-LSTM and existing methods
obtained precision. A number’s precision is the amount of information each digit can
represent. The Bi-LSTM is compared with existing techniques, including DBN, RBF,
LSTM, and DNN. The Bi-LSTM and the existing approaches have attained precisions
of 0.97, 0.90, 0.88, 0.96, and 0.93, respectively. The Bi-LSTM model is greater than the
existing approaches.

Fig. 10  Comparison of accuracy


of the Bi-LSTM and the existing
approach

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

Fig. 11  Comparison of precision


for the Bi-LSTM with the exist-
ing approach

A recall comparison between the Bi-LSTM and the existing techniques is shown in Fig. 12.
The proportion of related data successfully recovered throughout the information retrieval
process is known as recall. The Bi-LSTM and existing approaches such as DBN, RBF, LSTM,
and DNN respective acquired Recall values are 0.97, 0.92, 0.91, 0.96, and 0.95. The Bi-LSTM
model values are higher than those of the existing model, according to the acquired Recall
values of the proposed model. The comparison of error metrics between the Bi-LSTM and
the existing methods is shown in Fig. 13. The difference between the true predetermined value
and the value actually measured is the error. For Bi-LSTM, DBN, RBF, LSTM, and DNN, the
obtained error values are 0.2, 0.08, 0.13, 0.3, and 0.6. As a result, the Bi-LSTM has lower errors
than existing methods.
Figure 14 compares the Bi-LSTM with existing approaches in terms of specificity.
Specificity is the proportion of genuine negatives that the model correctly detects. This
means that more true negatives, sometimes known as false positives previously believed
to be positive, will be recorded. The Bi-LSTM model is compared to existing techniques,
including DBN, RBF, LSTM, and DNN approaches. The Bi-LSTM and the existing
model’s respective specificity values are 0.96, 0.89, 0.85, 0.95, and 0.92. Figure 15

Fig. 12  Comparison of recall for


the Bi-LSTM compared to the
existing technique

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

Fig. 13  Comparison of error for


the Bi-LSTM with the existing
approach

Fig. 14  Comparison of specific-


ity for the Bi-LSTM with the
existing approach

Fig. 15  Comparison of F1-Score


for the Bi-LSTM and the existing
technique

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

depicts an analysis of the Bi-LSTM and the existing model for F1_score. When data is
unbalanced, such as when the number of samples belonging to one class significantly
outnumbers those found in the other class, the F1 score is a popular performance measure
for classification and is typically preferred above accuracy. Bi-LSTM, DBN, RBF, LSTM,
and DNN all received F1_scores of 0.98, 0.94, 0.90, 0.97, and 0.95, respectively. In terms
of specificity and F1_score value, the Bi-LSTM model performs better than the existing
one. Table 1 illustrates the comparison between proposed and existing model using some
of the evaluation metrics.
A Bi-LSTM and the present model are compared in Fig. 16 regarding training time
measurements. The Bi-LSTM and existing model’s training times are 175.7, 426, 537,
205, and 375, respectively. The Bi-LSTM training time value is greater than that of
the existing model. Testing and execution time of the Bi-LSTM is compared with the
existing methods in Figs. 17 and 18. For the Bi-LSTM, DBN, RBF, LSTM and DNN,
the testing time attained are 0.5, 25, 37, 0.9 and 10 seconds. And in that order, the
overall execution of the proposed and existing models are 198.6, 496, 677, 255 and 431.
The Bi-LSTM model overcomes the existing model in testing and execution time.

Table 1  Comparison between Metrics DBN RBF LSTM DNN Bi-LSTM


proposed and existing model
using some of the evaluation
NPV 0.94 0.9 0.97 0.95 0.98
metrics
MCC 0.93 0.9 0.97 0.94 0.98
FPR 0.05 0.06 0.03 0.04 0.003
FNR 0.08 0.09 0.04 0.05 0.023
FM 0.88 0.84 0.95 0.90 0.97
MK 0.91 0.89 0.96 0.94 0.97
Kappa 0.9 0.88 0.96 0.93 0.98
FOR 0.077 0.05 0.09 0.086 0.009
FDR 0.07 0.11 0.02 0.05 0.002

Fig. 16  Comparison of training


time for the Bi-LSTM and the
existing technique

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

Fig. 17  Comparison of testing


time for the Bi-LSTM with the
existing approach

Fig. 18  Comparison of execution


time for the Bi-LSTM with the
existing technique

Comparison between proposed and existing model using NLR (Negative Likelihood
Ratio) metrics is given in Fig 19. Calculated NLR value for proposed Bi-LSTM model is
0.025 whereas for other existing models such as DBN, RBF, LSTM and DNN estimated
NLR value is 0.09, 0.105, 0.042 and 0.057. Figure 20 illustrates the comparison between
proposed and existing model using PLR (Positive Likelihood Ratio) metric. Bi-LSTM model
attained PLR value of 45 and other existing model such as DBN, RBF, LSTM and DNN
are 18, 15, 32 and 25. Thus, the designed big data analysis on the medical field for drug
recommendation using Apriori algorithm and deep learning performs better than the existing
algorithm. Table 2 illustrates the comparison between proposed and existing state-of-the-art
methods.
Existing state-of-the-art methods is executed in our designed environment and the
evaluation metrics are validated. Based on the analysis it is showed that the proposed
Bi-LSTM model performs better when compared other existing model.

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

Fig. 19  Comparison of NLR


between proposed and existing
models

Fig. 20  PLR Comparison


between proposed and existing
models

Table 2  Comparison between Metrics PSO-ANN[28] DNN[19] ANN[20] Proposed


proposed and existing state-of-
the-art methods
Accuracy 92 90 87 98
Precision 90 87 88 97
F1 score 91 87 88 98
Sensitivity 92 90 85 97
Specificity 90 92 88 97

5 Conclusion

Today, the vast majority of people research prescription options online before consulting
their doctors about various health concerns. When pandemics, floods, or cyclones strike,
the medical recommendation system can be helpful. The patient receives trustworthy
information regarding the medication, the dosage, and potential side effects through the
medication recommendation system. Based on the patient’s symptoms, blood pressure,
diabetes, temperature, and other factors, medication is administered. Systems that recommend

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

medications enhance patient data performance, integrity, and privacy while offering precise
information as needed. Today, reviews are the primary means by which individuals share
their experiences, making the creation of recommendation systems based on user reviews
challenging. The recommendation system has drawn a lot of attention in various industries, but
when it comes to healthcare, some disadvantages still exist because of poor data management.
According to a survey report from the World Health Organisation (WHO), one in ten drugs
used by people in underdeveloped countries are subpar and fake. Recommendation systems
are now used in various applications due to their growing popularity. It investigates matrix
completion strategies for collective filtering-based recommendation systems. The collective
filtering issue may be defined as estimating an individual’s desire for unknown products.
Therefore, the collective filtering issue may be characterized as a matrix completion problem
by solving the unidentified items in the evaluation matrix, which can be formed by utilizing
people as rows, things as columns, and ratings as entries.
Therefore, the apriori method and deep learning are used to construct large data analysis in the
medical industry. This model’s primary goal is to recommend medications to patients. A dataset
is created using the information from drug reviews. These collected data are pre-processed
utilizing the missing value replacement technique using the KNN algorithm in order to enhance
the dataset’s quality. The apriori algorithm, an association rule-based classification method used
to associate the received drug data in accordance with the user’s rating and review, is then used to
organize the pre-processed data. These categorized or related data are trained using the Bi-LSTM
algorithm to suggest the best drug to the user based on the user’s condition. Performance metrics
for this designed model include Accuracy, Precision, recall, Error, Specificity, F1_score, Negative
Predictive Value (NPV), Matthews Correlation Coefficient (MCC), False Positive Rate (FPR),
False Negative Rate (FNR), FM, MK, Kappa, False Omission Rate (FOR), False Discovery
Rate (FDR), Training Time, Testing Time and Execution Time. The proposed model’s achieved
performance metrics values are 98, 97, 97, 0,2, 97, 98, 98, 0,1, 0,3, 97, 97, 98, 0.009, 0.002,
175.7 seconds, 0,5 seconds, and 198.69 seconds.
These evaluated values are contrasted with the results of existing methods like DBN,
RBF, LSTM, and DNN. As a result, the Apriori algorithm and deep learning are more
effective than the existing model for big data analysis in the medical industry for drug
recommendation. The drug recommendation system will be utilized in the future to
provide patients with online medical support without the need for doctors, and it will be
able to be upgraded to provide the best medicine recommendations based on the patient’s
health. Though the performance of proposed model is better but it is validated only on
small dataset in future huge drug recommender database will be collected and studied for
better clarity. Additionally, techniques used in this proposed model such as deep learning
and Apriori algorithm will also be improved to enhance the rate of accuracy. In deep
learning model the hyperparameter will be optimally selection using either grid search
cross validation or heuristic algorithm.

Author contributions The corresponding author claims the major contribution of the paper including
formulation, analysis and editing. The co-author provides guidance to verify the analysis result and manuscript
editing.

Funding The authors declare that no funds, grants, or other support were received during the preparation of
this manuscript.

Data availability Not applicable.

Code availability Not applicable.

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

Declarations
Conflict of interest The authors declared that they have no conflicts of interest to this work. We declare that
we do not have any commercial or associative interest that represents a conflict of interest in connection with
the work submitted.

Consent of publication This article is a completely original work of its authors; it has not been published
before and will not be sent to other publications until the journal’s editorial board decides not to accept it for
publication.

References
1. Quijano-Sánchez L, Cantador I, Cortés-Cediel ME, Gil O (2020) Recommender systems for smart
cities. Inform Syst 92:101545. https://​doi.​org/​10.​1016/j.​is.​2020.​101545
2. Karthick S, Muthukumaran N (2023) Deep regression network for single-image super-resolution based
on down-and upsampling with RCA blocks. National Academy Science Letters 1–5. https://​doi.​org/​10.​
1007/​s40009-​023-​01353-5
3. Bagherian M, Sabeti E, Wang K, Sartor MA, Nikolovska-Coleska Z, Najarian K (2021) Machine
learning approaches and databases for prediction of drug–target interaction: a survey paper. Brief
Bioinform 22(1):247–69. https://​doi.​org/​10.​1093/​bib/​bbz157
4. Zhao X, Jiang Y, Zhao Y, Xi H, Liu C, Qu F, Feng X (2020) Analysis of the susceptibility to COVID-19 in
pregnancy and recommendations on potential drug screening. Eur J Clin Microbiolo Infecti Dis 39:1209–20.
https://​doi.​org/​10.​1007/​s10096-​020-​03897-6
5. Talevi A, Bellera CL (2020) Challenges and opportunities with drug repurposing: finding strategies
to find alternative uses of therapeutics. Exp Opin Drug Disc 15(4):397–401. https://​doi.​org/​10.​1080/​
17460​441.​2020.​17047​29
6. Smolen JS, Landewé RB, Bijlsma JW, Burmester GR, Dougados M, Kerschbaumer A, McI-
nnes IB, Sepriano A, Van Vollenhoven RF, De Wit M, Aletaha D (2020) EULAR recommenda-
tions for the management of rheumatoid arthritis with synthetic and biological disease-modifying
antirheumatic drugs: 2019 update. Ann Rheum Dis 79(6):685–99. https://​doi.​org/​10.​1136/​annrh​
eumdis-​2019-​216655
7. Barcelo D (2020) An environmental and health perspective for COVID-19 outbreak: meteorology
and air quality influence, sewage epidemiology indicator, hospitals disinfection, drug therapies and
recommendations. J Environ Chem Eng 8(4):104006. https://​doi.​org/​10.​1016/j.​jece.​2020.​104006
8. Gossec L, Baraliakos X, Kerschbaumer A, de Wit M, McInnes I, Dougados M, Primdahl J, McG-
onagle DG, Aletaha D, Balanescu A, Balint P (2020) EULAR recommendations for the man-
agement of psoriatic arthritis with pharmacological therapies: 2019 update. Ann Rheum Dis
79(6):700–12. https://​doi.​org/​10.​1136/​annrh​eumdis-​2020-​217159
9. Pushpakom S, Iorio F, Eyers PA, Escott KJ, Hopper S, Wells A, Doig A, Guilliams T, Latimer J,
McNamee C, Norris A (2019) Drug repurposing: progress, challenges and recommendations. Nat
Rev Drug Discov 18(1):41–58. https://​doi.​org/​10.​1038/​nrd.​2018.​168
10. Réda C, Kaufmann E, Delahaye-Duriez A (2020) Machine learning applications in drug develop-
ment. Comput Struct Biotechnol J 18:241–52. https://​doi.​org/​10.​1016/j.​csbj.​2019.​12.​006
11. Paliwal S, Mishra AK, Mishra RK, Nawaz N, Senthilkumar M (2022) XGBRS framework inte-
grated with word2vec sentiment analysis for augmented drug recommendation. Comput Mater Con-
tin 72:5345–62. https://​doi.​org/​10.​32604/​cmc.​2022.​025858
12. Mao C, Yao L, Luo Y (2022) MedGCN: Medication recommendation and lab test imputation via graph
convolutional networks. J Biomed Inform 127:104000. https://​doi.​org/​10.​1016/j.​jbi.​2022.​104000
13. Tran TN, Felfernig A, Trattner C, Holzinger A (2021) Recommender systems in the healthcare
domain: state-of-the-art and research issues. J Intell Inform Syst 57:171–201. https://​doi.​org/​10.​
1007/​s10844-​020-​00633-6
14. Hossain MD, Azam MS, Ali MJ, Sabit H (2020) Drugs rating generation and recommendation
from sentiment analysis of drug reviews using machine learning. In: 2020 Emerging Technology
in Computing, Communication and Electronics (ETCCE), IEEE, p 1-6. https://​doi.​org/​10.​1109/​
ETCCE​51779.​2020.​93508​68.

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Multimedia Tools and Applications

15. Karthick S, Maniraj S (2019) Different medical image registration techniques: A comparative anal-
ysis. Curr Med Imaging 15(10):911–921
16. Sahoo AK, Pradhan C, Barik RK, Dubey H (2019) DeepReco: deep learning based health recom-
mender system using collaborative filtering. Computation 7(2):25. https://​doi.​org/​10.​3390/​compu​
tatio​n7020​025
17. Sae-Ang A, Chairat S, Tansuebchueasai N, Fumaneeshoat O, Ingviya T, Chaichulee S (2022) Drug
Recommendation from Diagnosis Codes: Classification vs. Collaborative Filtering Approaches.
International J Environ Res Public Health 20(1):309. https://​doi.​org/​10.​3390/​ijerp​h2001​0309
18. Abbas K, Afaq M, Ahmed Khan T, Song WC (2020) A blockchain and machine learning-based
drug supply chain management and recommendation system for smart pharmaceutical industry.
Electronics 9(5):852. https://​doi.​org/​10.​3390/​elect​ronic​s9050​852
19. Dongre S, Agrawal J (2023) Deep Learning-Based Drug Recommendation and ADR Detection
Healthcare Model on Social Media. IEEE Trans Comput Soc Syst. https://​doi.​org/​10.​1109/​TCSS.​
2022.​32317​01
20. Bhimavarapu U, Chintalapudi N, Battineni G (2022) A fair and safe usage drug recommendation
system in medical emergencies by a stacked ann. Algorithms 15(6):186. https://​doi.​org/​10.​3390/​
a1506​0186
21. Mai A, Voigt K, Schübel J, Gräßer F (2023) A drug recommender system for the treatment of
hypertension. BMC Med Inform Dec Mak 23(1):1–4. https://​doi.​org/​10.​1186/​s12911-​023-​02170-y
22. Kalakoti Y, Yadav S, Sundar D (2022) Deep neural network-assisted drug recommendation systems
for identifying potential drug-target interactions. ACS Omega 7(14):12138–46. https://​doi.​org/​10.​
1021/​acsom​ega.​2c004​24
23. Azuma I, Mizuno T, Kusuhara H (2023) NRBdMF: A recommendation algorithm for predicting drug
effects considering directionality. J Chem Inform Model. https://​doi.​org/​10.​1021/​acs.​jcim.​2c012​10
24. Sanjar K, Bekhzod O, Kim J, Paul A, Kim J (2020) Missing data imputation for geolocation-based
price prediction using KNN–MCF method. ISPRS Int J Geo-Inform 9(4):227. https://​doi.​org/​10.​
3390/​ijgi9​040227
25. Dehghani M, Yazdanparast Z (2023) Discovering the symptom patterns of COVID-19 from
recovered and deceased patients using Apriori association rule mining. Inform Med Unlocked
42:101351. https://​doi.​org/​10.​1016/j.​imu.​2023.​101351
26. Ye H, Cao B, Peng Z, Chen T, Wen Y, Liu J (2019) Web services classification based on wide &
Bi-LSTM model. IEEE Access 7:43697–706. https://​doi.​org/​10.​1109/​ACCESS.​2019.​29075​46
27. Dataset 1: URL: https://​archi​ve.​ics.​uci.​edu/​ml/​datas​ets/​Drug+​Review+​Datas​et+%​28Dru​gs.​com%​29#.
Accessed 1 July 2023
28. Vianny DMM, Vaddadi SA, Karthikeyan C, Shahid M, Dhanapal R, Ravichand M (2023) Drug-
based recommendation system based on deep learning approach for data optimization. Soft Comput
1–9. https://​doi.​org/​10.​1007/​s00500-​023-​08742-4

Publisher’s Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and
institutional affiliations.

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under
a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted
manuscript version of this article is solely governed by the terms of such publishing agreement and applicable
law.

13
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Terms and Conditions
Springer Nature journal content, brought to you courtesy of Springer Nature Customer Service Center
GmbH (“Springer Nature”).
Springer Nature supports a reasonable amount of sharing of research papers by authors, subscribers
and authorised users (“Users”), for small-scale personal, non-commercial use provided that all
copyright, trade and service marks and other proprietary notices are maintained. By accessing,
sharing, receiving or otherwise using the Springer Nature journal content you agree to these terms of
use (“Terms”). For these purposes, Springer Nature considers academic use (by researchers and
students) to be non-commercial.
These Terms are supplementary and will apply in addition to any applicable website terms and
conditions, a relevant site licence or a personal subscription. These Terms will prevail over any
conflict or ambiguity with regards to the relevant terms, a site licence or a personal subscription (to
the extent of the conflict or ambiguity only). For Creative Commons-licensed articles, the terms of
the Creative Commons license used will apply.
We collect and use personal data to provide access to the Springer Nature journal content. We may
also use these personal data internally within ResearchGate and Springer Nature and as agreed share
it, in an anonymised way, for purposes of tracking, analysis and reporting. We will not otherwise
disclose your personal data outside the ResearchGate or the Springer Nature group of companies
unless we have your permission as detailed in the Privacy Policy.
While Users may use the Springer Nature journal content for small scale, personal non-commercial
use, it is important to note that Users may not:

1. use such content for the purpose of providing other users with access on a regular or large scale
basis or as a means to circumvent access control;
2. use such content where to do so would be considered a criminal or statutory offence in any
jurisdiction, or gives rise to civil liability, or is otherwise unlawful;
3. falsely or misleadingly imply or suggest endorsement, approval , sponsorship, or association
unless explicitly agreed to by Springer Nature in writing;
4. use bots or other automated methods to access the content or redirect messages
5. override any security feature or exclusionary protocol; or
6. share the content in order to create substitute for Springer Nature products or services or a
systematic database of Springer Nature journal content.
In line with the restriction against commercial use, Springer Nature does not permit the creation of a
product or service that creates revenue, royalties, rent or income from our content or its inclusion as
part of a paid for service or for other commercial gain. Springer Nature journal content cannot be
used for inter-library loans and librarians may not upload Springer Nature journal content on a large
scale into their, or any other, institutional repository.
These terms of use are reviewed regularly and may be amended at any time. Springer Nature is not
obligated to publish any information or content on this website and may remove it or features or
functionality at our sole discretion, at any time with or without notice. Springer Nature may revoke
this licence to you at any time and remove access to any copies of the Springer Nature journal content
which have been saved.
To the fullest extent permitted by law, Springer Nature makes no warranties, representations or
guarantees to Users, either express or implied with respect to the Springer nature journal content and
all parties disclaim and waive any implied warranties or warranties imposed by law, including
merchantability or fitness for any particular purpose.
Please note that these rights do not automatically extend to content, data or other material published
by Springer Nature that may be licensed from third parties.
If you would like to use or distribute our Springer Nature journal content to a wider audience or on a
regular basis or in any other manner not expressly permitted by these Terms, please contact Springer
Nature at

[email protected]

You might also like