# A Fair and Safe Usage Drug Recommendation System in Medical Emergencies by a Stacked ANN
## 4 Results
### Fairness of Drug Side-Effects Predictions Using Deep Learning and Regression  
Drug features were extracted to predict drug side effects associated with drug names and clinical characteristics. A bilingual evaluation understudy metric was used to identify the associated drug side effects. The following drugs are tabulated along with their side effects in Table 2.  
The selection of an adequate threshold is crucial to fine-tune the medical recommendation process. It is recommended that the parameter range is defined as (0,1), where 0 indicates complete fairness and 1 indicates no fairness. An assessment of the average error for the recommendations is necessary for a better scale of accuracy. We chose 0.4 as the threshold value for the optimal selection, and 0.5 as the default parameter value. Table 3 summarizes the proposed drug recommender system with different hidden layers.  
Figure 2: Prediction score.  
The stacked ANN was implemented for a drug recommendation system with varying hidden layers, and the error rate was compared as the number of hidden layers was increased. A minimum error rate was observed when three hidden layers were used. To evaluate the proposed models, the Relu activation function and Adam optimizer with 150 epochs and 32 batch sizes were used. Table 4 presents a comparison of the performance estimates for the different models. The performance metrics were applied to evaluate the drug recommendation performance. We observed that the proposed model performed better than other traditional ML algorithms in terms of accuracy, precision, sensitivity, and specificity.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Drug Id** & **Drug Name** & **Side Effects** & **Disease** \\ \hline DB00608 & chloroquine & Headache, nausea, loss of appetite, diarrhea, stomach pain, rash, itching & Susceptible infections, SARS-CoV-2 \\ \hline DB01601 & Lopinavir & Weakness, diarrhea, heartburn, weight loss, headache, staying asleep, muscle pain & Human immune deficiency virus, SARS-CoV-2 \\ \hline DB00503 & Ritonavir & Drowsiness, diarrhea, gas, heartburn, headache, numbness, burning, muscle and joint pain & Human immune deficiency virus \\ \hline DB12598 & Nafamostat & Lung swelling & SARS-CoV-2 pneumonia \\ \hline DB13729 & Camostat & Abnormal liver, rash, nausea, diarrhea, increased potassium levels in the blood, itching, jaundice, low blood platelets, and gas & Kidney injury, SARS-CoV-2 \\ \hline DB00927 & Famotidine & Difficulty breathing, feeling sad, racing heartbeat & Ulcers \\ \hline DB13609 & Umifenovir & Allergic reactions & Influenza and respiratory virus \\ \hline DB00507 & Nitazoxanide & Stomach pain, headache, upset stomach, vomiting. Infections, anaerobic bacteria, viruses \\ \hline DB00602 & Ivvermectin & Fever, itching, joint pain, rapid heartbeat, headache, swelling of eyes, diarrhea, dizziness, loss of appetite, and sleepiness & SARS-CoV-2 \\ \hline DB06273 & Toclizumab & Respiratory infections, rashes, dizziness, sore throat & SARS-CoV-2 \\ \hline DB11767 & sarilumab & Sore throat, cold scores, itching & Rheumatid-rheumatoid arthritis \\ \hline DB00112 & Bevacizumab & Body aches, cracks in skin, difficulty breathing & Cancer, SARS-CoV-2 \\ \hline DB00176 & Fluvoxamine & Headache, dry mouth, feeling nervous, and trouble sleeping & Obsessive-compulsive disorder, SARS-CoV-2 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Predicted drugs for specific diseases with the side effects.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Hidden Layers** & **MAPE** & **RMSE** \\ \hline
1 & 0.0284 & 0.0018 \\ \hline
2 & 0.0256 & 0.0014 \\ \hline
3 & 0.0251 & 0.0010 \\ \hline
4 & 0.0324 & 0.0017 \\ \hline
5 & 0.0328 & 0.0019 \\ \hline
6 & 0.0330 & 0.0020 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Performance of the stacked ANN with different hidden layers for the drug recommendation system.