Treatment management for opioid poisoning is critical and, at the same time, requires specialized knowledge and skills. This study was designed to develop and evaluate machine learning algorithms for predicting the maintenance dose and duration of hospital stay in opioid poisoning, in order to facilitate appropriate clinical decision-making. This study used artificial intelligence technology to predict the maintenance dose and duration of administration by selecting clinical and paraclinical features that were selected by Pearson correlation (filter method) (Stage 1) and then the (wrapper method) Recursive Feature Elimination Cross-Validated (RFECV) (Stage2). The duration of administration was divided into two categories: A (which includes a duration of less than or equal to 24 hours of infusion) and B (more than 24 hours of naloxone infusion). XGBoost was found to be the superior model.the most important features for classifying patients for the duration of treatment were bicarbonate, respiration rate, physical sign, The partial pressure of carbon dioxide (PCO2), diastolic blood pressure, pulse rate, naloxone bolus dose, Blood Creatinine(Cr), Body temperature (T)...
- dependencies:
The Anaconda Distribution, commonly known as Anaconda, is one of the most renowned Python distribution platforms. It is a popular tool for data science and machine learning developers. This is because it offers a collection of over 800 packages installed and curated to work correctly out of the box.The Anaconda distribution is also free and very user-friendly. It comes with a command-line interface for terminal nerds and the Anaconda navigator, allowing you to manage environments and packages with a GUI interface. While installing packages in requirements.txt using Conda through the following command:Install the dependencies:
conda install --yes --file requirements.txt
- Clone the repository:
git clone https://github.com/SAMashiyane/Naloxone.git
- Change to the project directory:
cd src
- Setting up programming environment to run the project:
- If using an installed conda package manager, i.e. either Anaconda or Miniconda, create the conda environment following the steps mentioned below:
conda create --name <environment-name> python=3.9.x
conda activate <environment-name>
- naloxlib libraries was created specifically for this project. importing naloxalib .
import naloxlib
from naloxlib.classifier import * # ---> for use classification stage
- build_naloxone_model for classification
build_naloxone_model(data=data_selection,session_id=123,train_size = 0.7)
- Comparing All Models
Classifier_comparison_naloxone()
- for use Id_Model or Id_plot :
help(Id_index)
output: Model name:
Name_Model | Id_Model |
---|---|
LogisticRegressionClassifier | LogReg |
KNeighborsClassifie | KNN |
GaussianNBClassifie | GNB |
DecisionTreeClassifier | DT |
SVM - Linear Kernel | SVM |
Gaussian Process Classifier | GauProC |
MLP Classifier | MLP |
Ridge Classifier | RIG |
Random Forest Classifier | RanForest |
Ada Boost Classifier | AdaBo |
Gradient Boosting Classifier | GraBoC |
Linear Discriminant Analysis | LDisAn |
Extra Trees Classifier | EXTre |
Extreme Gradient Boosting | xgboost |
Light Gradient Boosting Machine | lightgbm |
CatBoost Classifier | catboost |
Dummy Classifier | Dummy |
Calibrated Classifier CV | CalibratedCV |
Plot_machine : this function power from Yellowbrick
Id_plot | Name Plot |
---|---|
"auc" | "AUC" |
"confusion_matrix" | "Confusion Matrix" |
"pr" | "Precision Recall" |
"error" | "Prediction Error" |
"class_report" | "Class Report" |
"learning" | "Learning Curve" |
"feature" | "Feature Importance" |
"feature_all" | "Feature Importance (All)" |
"rfe" | "Feature Selection" |
- Make Models
NameML = make_machine_learning_model('Id_Model')
- Prediction on Test Sample(test_dataset)
predict_model(NameML);
- Machine learning plot
plot_machine(NameML, plot = 'Id_plot')
Mohtarami, S.A., Mostafazadeh, B., Shadnia, S. et al.
Prediction of naloxone dose in opioids toxicity based on machine learning techniques (artificial intelligence).
DARU J Pharm Sci (2024).
https://doi.org/10.1007/s40199-024-00518-x
Project is distributed under MIT License