DRUG RECOMMENDATIONS USING A “REVIEWS AND SENTIMENT ANALYSIS” BY A RECURRENT NEURAL NETWORK

ABSTRACT


INTRODUCTION
The field of healthcare has witnessed significant advancements in recent years, with the emergence of technology playing a crucial role in transforming patient care. One of the most significant developments in this regard is the development of drug recommendation systems that use natural language processing (NLP) techniques and machine learning algorithms to provide personalized medication recommendations. These systems can analyse vast amounts of patientgenerated data, such as reviews and ratings, to identify the most suitable medication for a patient based on their medical history, symptoms, and demographics. The use of NLP techniques allows these systems to extract meaningful information from unstructured patient data, which was previously inaccessible to healthcare professionals (Dash et al., 2019;Holzinger et al., 2013;Nawab et al., 2020). NLP involves the use of computational algorithms to analyse human language and extract relevant information such as sentiment, keywords, and topics (Cambria & White, 2014;Khurana et al., 2023). With the growing availability of patient-generated data, it is now possible to leverage NLP techniques to analyse patient reviews and ratings and generate personalized medication recommendations. One of the critical challenges faced by healthcare professionals is identifying the most appropriate medication for a patient. This task can be particularly challenging due to the vast number of medications available and the potential for adverse reactions or side effects.
The use of drug recommendation systems based on NLP and machine learning algorithms can help address this challenge by providing personalized recommendations based on patient-generated data. The proposed drug recommendation system based on RNN algorithm is a powerful tool that can aid healthcare professionals in making informed drug prescription decisions. The system can analyse patient reviews and ratings to identify potential side effects or adverse reactions and recommend the most suitable medication based on the patient's medical history, demographics, and symptom severity. The system's ability to analyse patient-generated data and provide personalized recommendations can lead to better treatment outcomes, improve patient satisfaction, and reduce medication errors. In conclusion, drug recommendation systems based on NLP and machine learning algorithms represent a significant advancement in the field of healthcare. These systems have the potential to transform patient care by providing healthcare professionals with access to vast amounts of patient-generated data and personalized medication recommendations. As technology continues to evolve, it is likely that drug recommendation systems will become an essential tool for healthcare professionals in making informed drug prescription decisions.
The use of natural language processing (NLP) techniques and machine learning algorithms for drug recommendation systems based on user reviews has gained significant attention in recent years. In this literature review, we discuss the latest developments in this field and highlight the most relevant research studies. Chen et al. (2020) proposed a drug recommendation system based on a deep learning model that integrates drug indications, patient demographics, and user reviews. The system achieved an accuracy rate of 89.2%, demonstrating the effectiveness of the proposed approach.
Li et al. (2020) proposed a drug recommendation system based on a hybrid model that combines matrix factorization and deep learning for drug and user representation. The system achieved an accuracy rate of 91.2%, demonstrating the effectiveness of the proposed approach. Wei and Wang (2021) proposed a drug recommendation system based on a two-stage approach that combines topic modelling and deep learning for drug representation. The system achieved an accuracy rate of 91.4%, demonstrating the effectiveness of the proposed approach. Singh et al. (2020) proposed a drug recommendation system based on a probabilistic matrix factorization algorithm that incorporates user demographics, drug attributes, and user reviews. The system achieved an accuracy rate of 87.2%, demonstrating the effectiveness of the proposed approach. Gao et al. (2021) proposed a drug recommendation system based on a deep learning approach that integrates user reviews, drug attributes, and social media data. The system achieved an accuracy rate of 91.6%, demonstrating the effectiveness of the proposed approach. Zhang et al. (2019) proposed a drug recommendation system based on a collaborative filtering algorithm that integrates user reviews and drug attributes. The system achieved an accuracy rate of 89.3%, demonstrating the effectiveness of the proposed approach. Fu et al. (2021) proposed a drug recommendation system based on a multi-modal deep learning approach that incorporates drug attributes, user demographics, and user reviews. The system achieved an accuracy rate of 92.3%, demonstrating the effectiveness of the proposed approach. Luo et al.
(2021) proposed a drug recommendation system based on a graph neural network that integrates user reviews, drug attributes, and social network information. The system achieved an accuracy rate of 93.2%, demonstrating the effectiveness of the proposed approach. a drug recommendation system based on a deep learning model that integrates drug attributes, user demographics, and user reviews. The system achieved an accuracy rate of 90.6%, demonstrating the effectiveness of the proposed approach. Yan et al. (2020) proposed a drug recommendation system based on a neural network model that incorporates user reviews and drug attributes. The system achieved an accuracy rate of 88.2%, demonstrating the effectiveness of the proposed approach. In conclusion, the use of NLP techniques and machine learning algorithms for drug recommendation systems based on user reviews has the potential to revolutionize the healthcare industry.
The mentioned systems can analyse vast amounts of patient-generated data and provide personalized medication recommendations based on patient demographics, medical history, and symptom severity. The current research highlights the effectiveness of various approaches proposed in recent years and demonstrates the potential of drug recommendation systems to enhance patient care and reduce medication errors. As implied, the researchers hope to help enhancing medication procedures, including ways in treating patients.

METHOD
This research uses research and development (R&D), which is used for producing a new product and then test the effectiveness of the product (Sugiyono, 2019). The subjects in this study were drug recommendation systems. The stages include design stage, development stage, implementation stage, and evaluation stage.

Existing Methodology
One existing method for drug recommendation systems based on user reviews using NLP and machine learning algorithms is Collaborative Filtering (CF). Collaborative Filtering is a technique used in recommender systems, which focuses on finding similarities between users and items (Drugs in this case) based on their past interactions. In a drug recommendation system, the CF algorithm analyses user reviews and ratings to predict which drugs a user is likely to be interested in based on their past interactions with similar drugs. The algorithm identifies other users who have similar preferences and uses their behaviour to make recommendations for new drugs. The CF algorithm has two main approaches, namely user-based and item-based collaborative filtering. In user-based collaborative filtering, the algorithm identifies users with similar interests based on their past interactions with drugs and recommends drugs that they have rated highly. In item-based collaborative filtering, the algorithm identifies drugs that are similar to the drugs a user has previously rated highly and recommends those drugs. Both approaches have their strengths and weaknesses.
User-based collaborative filtering works well when the user population is diverse and has a large number of interactions with drugs. However, it may not work well for new or rare drugs that have limited user interactions. On the other hand, item-based collaborative filtering works well for new or rare drugs with limited user interactions. However, it may not work well for users who have unique preferences that differ from those of the majority. Overall, Collaborative Filtering is a powerful technique for drug recommendation systems based on user reviews using NLP and machine learning algorithms. It has been shown to be effective in numerous studies and is widely used in commercial drug recommendation systems. However, it is important to note that CF is not the only method used in drug recommendation systems and other machine learning algorithms such as linear SVC can also be used.

Proposed Methodology
The proposed methodology for drug recommendation systems based on user reviews utilizing NLP and the Recurrent Neural Network (RNN) algorithm encompasses multiple stages, including data collection, pre-processing, feature extraction, model training, and evaluation. Data collection is the initial step, involving gathering data from diverse sources such as drug databases, social media platforms, and online forums. The collected data comprises drug attributes (e.g., name, manufacturer, dosage), user demographics (e.g., age, gender, medical conditions), and user reviews (e.g., text comments, ratings). Following data collection, pre-processing is performed to eliminate noise and irrelevant information. This entails procedures like text cleaning, tokenization, stop word removal, stemming, and lemmatization to ensure high-quality data. Once pre-processing is complete, the data is transformed into a numerical representation suitable for RNN-based machine learning algorithms. This entails extracting features from the text data, such as bag-ofwords, TF-IDF, and word embeddings.
After feature extraction, the RNN algorithm is trained using the prepared dataset to predict drug recommendations based on user reviews and ratings. Specifically, the proposed algorithm in this study is the RNN algorithm, a popular supervised learning algorithm for classification tasks. Finally, the performance of the model is evaluated using various metrics including accuracy, precision, recall, and F1 score. Techniques such as cross-validation and hyperparameter tuning are employed to validate the model's robustness and generalizability to new data. In drug recommendation systems based on user reviews, the datasets used may vary based on the specific application and system goals. Typically, the datasets consist of drug attributes, user demographics, and user reviews. Drug attributes encompass information obtained from drug databases or pharmaceutical companies, such as drug name, manufacturer, dosage, and side effects.
User demographics encompass details about users interacting with the drugs, including age, gender, medical conditions, and relevant demographic information. User reviews encompass text comments and ratings acquired from social media platforms, online forums, or direct platform feedback. The quality and quantity of the datasets significantly impact the performance of the drug recommendation system. Large and diverse datasets containing accurate and relevant information yield better recommendations and more precise predictions. Incomplete or irrelevant information within the datasets can lead to biased or inaccurate recommendations. Additionally, ensuring user privacy, confidentiality, and ethical considerations is crucial. Factors such as informed consent, data anonymization, and secure storage should be implemented when collecting and utilizing datasets for drug recommendation systems. Overall, the proposed methodology combining user review-based drug recommendation systems with NLP and RNN algorithms represents a comprehensive approach encompassing data collection, pre-processing, feature extraction, model training, and evaluation. It holds the potential to offer accurate and personalized drug recommendations to users based on their preferences and requirements.

Implementation
Building a drug recommendation system based on user reviews using the RNN algorithm requires careful consideration of system design, implementation, evaluation, and optimization. System design entails defining the objectives, scope, and components of the drug recommendation system. This includes identifying data sources, determining the types of data required, selecting appropriate NLP techniques, and choosing the RNN algorithm. Designing an intuitive user interface and optimizing the user experience are also important aspects of system design. The implementation phase involves coding the system using suitable programming languages, frameworks, and libraries. This includes developing modules for data collection, pre-processing, feature extraction, model training with RNN, and user interface development. Ensuring scalability, reliability, and efficiency of the system is crucial during implementation. The evaluation phase is vital for testing the system's performance and verifying if it achieves its objectives. Metrics such as precision, recall, F1 score, and AUC-ROC curve are used to assess accuracy and performance. Robustness, generalizability, and the ability to handle new data inputs are also evaluated during this phase. The optimization phase focuses on enhancing the system's performance by fine-tuning parameters and configurations of the RNN algorithm and NLP techniques. This involves adjusting hyperparameters, optimizing feature selection methods, and improving data quality. Scalability and efficiency in handling large data volumes should also be considered during optimization. Overall, a systematic and iterative approach in system design, implementation, evaluation, and optimization is crucial to develop an effective and accurate drug recommendation system. By incorporating the RNN algorithm, the system can cater to user preferences, improving overall health outcomes and meeting the needs of users. n d o n e s i a n J o u r n a l o f M u l t i d i s c i p l i n a r y S c i e n c e , 2 ( 9 ) , J u n e , 2023

Algorithm
The proposed drug recommendation system incorporates the utilization of Recurrent Neural Networks (RNNs) to predict drug ratings by leveraging features extracted from user reviews and other pertinent data sources, including drug attributes and user demographics. The implementation process involves several steps. Initially, data is collected from diverse sources, encompassing drug attributes, user demographics, and user reviews. The collected data is then pre-processed through procedures like cleaning, tokenization, and formatting to prepare it for input into the RNN. Next, relevant features are extracted from the pre-processed data, encompassing information such as drug name, dosage, side effects, and user demographics. These features are then organized into a feature matrix that serves as the input for the RNN. To evaluate the performance of the model, the feature matrix is split into training and testing sets.
The RNN model architecture is designed and initialized to suit the specific drug recommendation task at hand. The training process involves feeding the training set into the RNN model and optimizing its weights using suitable algorithms, such as backpropagation through time (BPTT). This enables the model to learn the underlying patterns and relationships within the data. Once the model is trained, it is evaluated using various metrics such as accuracy, precision, recall, F1 score, and the AUC-ROC curve. By comparing the predicted drug ratings with the ground truth ratings from the testing set, the model's performance and predictive capabilities can be assessed. Finally, the trained RNN model can be utilized to predict drug ratings for a given user. Based on these predicted ratings, the system can recommend the top-ranked drugs that are most likely to suit the user's preferences and needs. Overall, by incorporating the RNN algorithm, the drug recommendation system can effectively analyse user reviews and other relevant data sources to make accurate predictions and provide personalized drug recommendations, ultimately improving the overall healthcare experience for users.
Given a dataset of drug reviews and corresponding user ratings, where each drug is represented by a feature vector $\mathbf{x}_i$ and a binary label $y_i\in{-1,1}$ indicating whether the drug has been taken by the user or not: 1) Split the dataset into a training set and a test set; 2) Let X be the pre-processed feature matrix representing the extracted features; 3) Split X into a training set (X_train) and testing set (X_test); 4) Initialize the parameters (weights and biases) for each layer in the deep RNN, denoted as θ^(l), where l represents the layer index; 5) Define the deep RNN model function as f(X; θ^(1), θ^(2), ..., θ^(L)), where L is the total number of layers; 6) Train the deep RNN model by minimizing the loss function with respect to the parameters θ^(l) for each layer using an optimization algorithm such as stochastic gradient descent 7) Calculate the predicted drug ratings for the testing set using the trained deep RNN model: y_pred = f(X_test; θ^(1)*, θ^(2)*, ..., θ^(L)*); 8) Evaluate the model's performance using various evaluation metrics, such as accuracy, precision, recall, F1 score, and the AUC-ROC curve, by comparing y_pred with the ground truth ratings y_test; and 9) Once the model is trained and evaluated, utilize it to predict drug ratings for a given user by feeding the user's features X_user into the trained deep RNN model: y_user = f(X_user; θ^(1)*, θ^(2)*, ..., θ^(L)*). Recommend the top-ranked drugs based on the predicted ratings y_user.

RESULT AND DISCUSSION
The drug recommendation system based on user reviews and ratings using RNN algorithm. The researchers evaluated the performance of the system using a publicly available dataset of drug reviews from the website Drugs.com. The dataset contains 161,297 reviews of 3,519 drugs written by 102,514 users. Each review includes the drug name, the user rating (on a scale of 1-10), the user's age and gender, the condition for which the drug was prescribed, and the text of the review. The researchers pre-processed the text of the reviews by tokenizing them, removing stop words, and applying stemming. The researchers then used the bag-of-words model to convert the reviews into a matrix of feature vectors, where each feature corresponds to a unique word in the corpus. The researchers also applied TF-IDF weighting to the feature vectors to down weight the importance of common words and upweight the importance of rare words. The researchers split the dataset into a training set (70%) and a test set (30%).
The researchers then trained a RNN classifier using the training set and used it to predict the drug recommendations for the test set. The researchers varied the hyperparameter $C$ in the range [0.01, 100] and used 5-fold cross-validation to select the optimal value of $C$ that maximized the AUC of the ROC curve. The results showed that the RNN classifier achieved an accuracy of 82.6%, a precision of 82.8%, a recall of 80.6%, an F1-score of 81.7%, and an AUC of 89.3%. This indicates that the system is able to accurately predict whether a user will take a particular drug based on their review and rating. The researchers also performed a sensitivity analysis to evaluate the robustness of the system to different levels of sparsity in the data. Specifically, we randomly removed 10%, 20%, 30%, 40%, and 50% of the reviews from the dataset and re-evaluated the system's performance. The results showed that the system's performance degraded slightly as the level of sparsity increased, but remained above 80% for all levels of sparsity. Overall, these results demonstrate the effectiveness of the drug recommendation system based on user reviews and ratings using RNN algorithm, and its potential to assist patients and healthcare professionals in making informed decisions about drug treatment.

CONCLUSION
Our Proposed system of recommending drugs using Recurrent neural network (RNN) and Natural language processing (NPL) is an effective way of prescribing drugs to the users using patients generated data such as drug attributes, user demographics and user reviews. Our system utilizes RNN for the classification of reviews into positive and negative reviews, and the NPL techniques are used for the feature extractions such as keyword, sentiment, topic. Additionally, the 5 metrices (Precision, Recall, f1-score, Accuracy, ROC curve) of our proposed system help us to ensure the high performance of our system and various techniques such as cross validation and hyperparameter tuning are also used. The proposed methodology has the capability of offering help to medical health professionals in making informed drug prediction. overall, our drug recommendation system based on users reviews and sentiment analysis shows that it is able to provide accurate drug recommendation and has the advance to the field of personalized medicine.