Predicting Prescription Toxicity with Deep Learning RNN, RF, XGboost, and Voting Classifiers
Keywords:
Prescription Toxicity, Recurrent Neural Network (RNN), Random Forest (RF), XGBoost, Voting Classifier, Deep Learning, Ensemble Learning, Clinical Decision Support.Abstract
Prescription toxicity remains a significant clinical challenge, often leading to severe health complications if not identified early. Traditional toxicity prediction methods are limited by delayed detection and lack of adaptability to patient-specific data patterns. This study aims to develop a hybrid ensemble framework that integrates a Recurrent Neural Network (RNN), Random Forest (RF), and XGBoost under a Voting Classifier architecture to predict prescription toxicity effectively. The model was trained and validated using the Prescription Toxicity Adverse Events Dataset comprising 15,000 records, with extensive preprocessing including normalization, SMOTE-Tomek resampling, and feature engineering. Sequential data were modeled through an RNN, while tabular data were processed with RF and XGBoost, with final decisions aggregated via soft voting. Experimental evaluation achieved an accuracy of 91.8%, a precision of 89.6%, a recall of 87.7%, and an F1-score of 88.6%, with a ROC-AUC of 93.2%, outperforming individual models significantly (p < 0.05). Additionally, inference latency was reduced to 22 milliseconds per sample, demonstrating suitability for real-time clinical deployment. The findings validate that integrating heterogeneous models enhances prediction robustness, addresses class imbalance, and ensures adaptability across diverse prescription histories. This research establishes a scalable and clinically relevant framework for early prescription toxicity detection, paving the way for safer drug administration practices and offering strong foundations for future integration with electronic health records and explainable AI techniques
