Machine Learning Models for Predicting Postoperative Complications and Hospitalization After Percutaneous Nephrolithotomy
Abstract
1. Introduction
2. Materials and Methods
2.1. Database
2.2. Exclusion Criteria
2.3. Predictors
2.4. Variables of Interest
2.5. Exploratory Data Analysis
2.6. Missing Data Treatment
2.7. Treatment of Numerical Variables
2.8. Treatment of Categorical Variables
2.9. Data Splitting
2.10. Model Development and Evaluation
2.11. Threshold Optimization
2.12. Explainability
3. Results
3.1. Exploratory Data Analysis Results
3.2. Hospitalization Need Predictive Model
3.3. Hemorrhagic Complications Predictive Model
3.4. Infectious Complications Predictive Model
3.5. Explainability of the Models
4. Discussion
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
PCNL | Percutaneous Nephrolithotomy |
ESWL | Extracorporeal Shock Wave Lithotripsy |
RIRS | Retrograde Intrarenal Surgery |
AUA | American Urological Association |
AI | Artificial Intelligence |
ML | Machine Learning |
BMI | Body Mass Index |
ASA | American Society of Anesthesiologists |
UH | Hounsfield Units |
EDA | Exploratory Data Analysis |
AUC | Area Under the Curve |
PPV | Positive Predictive Value |
NPV | Negative Predictive Value |
References
- Liangos, O.; Jaber, B.L. Kidney Stones. In Humana Press eBooks; Humana Press: Totowa, NJ, USA, 2008; pp. 513–527. [Google Scholar] [CrossRef]
- Sánchez-Martín, F.; Rodríguez, F.M.; Fernández, S.E.; Tomás, J.S.; Barón, F.R.; Martínez-Rodríguez, R.; Mavrich, H.V. Incidencia y prevalencia de la urolitiasis en España: Revisión de los datos originales disponibles hasta la actualidad. Actas Urológicas Españolas 2007, 31, 511–520. [Google Scholar] [CrossRef] [PubMed]
- Del Pilar Alcoba García, M.; Serrano, G.B.; Jiménez, J.T.; López, R.G.; Ruíz, L.C.; Enguita, C.G. Is extracorporeal shock wave lithotripsy a treatment option for renal colic? Arch. Españoles De Urol. 2023, 76, 175. [Google Scholar] [CrossRef] [PubMed]
- Zong, D.; Shao, P. Flexible Ureteroscopic Holmium Laser Lithotripsy vs Percutaneous Nephrolithotomy for Renal Stones. Int. J. Pharmacol. 2024, 20, 593–601. [Google Scholar] [CrossRef]
- Ghani, K.R.; Andonian, S.; Bultitude, M.; Desai, M.; Giusti, G.; Okhunov, Z.; Preminger, G.M.; De La Rosette, J. Percutaneous nephrolithotomy: Update, trends, and future directions. Eur. Urol. 2016, 70, 382–396. [Google Scholar] [CrossRef] [PubMed]
- Baltar, C.F.; Corral, M.E.M.; Fentes, D.P. Predicting and Avoiding complications in percutaneous nephrolithotomy in the Era of Personalized Medicine: A scoping review. J. Pers. Med. 2024, 14, 962. [Google Scholar] [CrossRef] [PubMed]
- Ghaderzadeh, M.; Shalchian, A.; Irajian, G.; Sadeghsalehi, H.; Bialvaei, A.Z.; Sabet, B. Artificial Intelligence in Drug Discovery and Development Against Antimicrobial Resistance: A Narrative review. Iran. J. Med. Microbiol. 2024, 18, 135–147. [Google Scholar] [CrossRef]
- Geraghty, R.M.; Thakur, A.; Howles, S.; Finch, W.; Fowler, S.; Rogers, A.; Sriprasad, S.; Smith, D.; Dickinson, A.; Gall, Z.; et al. Use of Temporally Validated Machine Learning Models To Predict Outcomes of Percutaneous Nephrolithotomy Using Data from the British Association of Urological Surgeons Percutaneous Nephrolithotomy Audit. Eur. Urol. Focus 2024, 10, 290–297. [Google Scholar] [CrossRef] [PubMed]
- Yang, Y.; Cao, Z.; Wang, W.; Yang, C.; Wang, K.; Qiu, X. Application of Machine-learning models in Predicting Transfusion Among Complex Renal Stones Patients Receiving Percutaneous Nephrolithotomy: A Retrospective Study. Res. Sq. 2022. [Google Scholar] [CrossRef]
Variable | Mean ± SD | p-Value | ||
---|---|---|---|---|
Hospitalization Need | Hemorrhagic Complications | Infectious Complications | ||
BMI Largest diameter | 27.6 ± 5.8 | 0.218 | 0.374 | 0.119 |
25 ± 13.3 | <0.001 | 0.131 | <0.001 | |
Smallest diameter | 15.2 ± 9.3 | 0.136 | 0.603 | 0.027 |
UH Distance Sheath caliber | 1010.7 ± 347 | 0.448 | 0.299 | 0.009 |
28.4 ± 36.9 | 0.073 | 0.329 | 0.398 | |
25.3 ± 3.8 | 0.03 | 0.065 | 0.080 | |
Duration Age | 107.9 ± 38.9 | 0.055 | 0.001 | 0.721 |
54.5 ± 15.4 | 0.824 | 0.882 | 0.816 |
Variable | Frequency per Possible Value | p-Value | ||
---|---|---|---|---|
Hospitalization Need | Hemorrhagic Complications | Infectious Complications | ||
Gender Diabetes | Male: 48.1% Female: 51.9% | 0.040 | 0.127 | <0.001 |
No: 84.3% Type 1: 3.9% Type 2:11.8% | 0.191 | 0.075 | 0.955 | |
ASA | ASA I: 22.8% ASA II: 60.7% ASA III: 14.5% ASA IV: 2% | 0.041 | 0.172 | <0.001 |
Culture result Microorganism Treatment type | Negative: 65.3% Positive: 33.7% Contaminated: 1.1% | <0.001 | 0.478 | <0.001 |
Negative: 66.1% Urease negative: 20.4% Urease positive: 13.4% | <0.001 | 0.427 | <0.001 | |
Primary: 77.2% Post-ESWL: 8.4% Post-URS: 5.8% Post-NLP: 8.7% | 0.32 | 0.334 | 0.371 | |
Side Guy score | Right: 47.9% Left: 51.4% Bilateral: 0.4% Transplant: 0.2% | 0.221 | 0.547 | 0.169 |
I: 24.5% II: 31.9% III: 25.9% IV: 17.7% | <0.001 | 0.086 | <0.001 | |
Position | Prone: 1.2% Supine: 98.8% | 0.864 | 0.653 | 0.706 |
Access Catheterization | Fluoroscopy: 2.7% Ultrasound: 1% Both: 96.3% | 0.033 | 0.858 | 0.009 |
No: 11.3% Yes: 88.7% | 0.855 | 0.257 | 0.269 | |
Contrast | No: 12.4% Yes: 87.6% | 0.53 | 0.388 | 0.945 |
Dilatation method | Amplatz: 7.7% Dilation balloon: 44.6% Both: 44.4% Metallic: 3.3% | 0.279 | 0.120 | 0.766 |
Multi-trajectory | No: 93.9% Yes: 6.1% | 0.867 | 0.339 | 0.583 |
Localization ease | Easy: 43.4% Medium: 41.9% Difficult: 14.7% | <0.001 | 0.007 | 0.244 |
Tubeless | No: 60.9% Yes: 39.1% | <0.001 | <0.001 | 0.001 |
Procalcitonin | Normal range: 88.8% Out of normal range: 11.2% | <0.001 | <0.001 | <0.001 |
Leukocytes | Normal range: 85.3% Out of normal range: 14.7% | <0.001 | 0.081 | <0.001 |
%Neutrophils | Normal range: 51.2% Out of normal range: 48.8% | <0.001 | 0.018 | <0.001 |
Location | Pelvis: 26.2% Superior calyx: 3% Middle calyx: 0.6% Inferior calyx: 9.4% Pseudocoraliform: 11.5% Coraliform: 26.3% Renal and ureteral: 2.9% Calyceal diverticulum: 0.9% Pelvis + upper calyceal group: 12% Multiple calyces: 3.6% Proximal ureter: 0.9% Distal ureter: 0.7% Pelvis + lower calyceal group: 2.1% | 0.063 | 0.549 | <0.001 |
Fragmentation source | Lithoclast: 59.5% Ultrasound: 0.3% Lithoclast + ultrasound: 0.6% Holmium laser: 16.8% Basket: 2.8% Forceps: 4.9% Lithoclast + laser: 14.5% Irrigation: 0.5% | <0.001 | 0.016 | 0.003 |
Drains | No: 0.9% Nephrostomy: 17.8% Double-J stent: 36.9% Double-J stent + nephrostomy: 42.6% 24 h Ureteral catheter: 1% 24 h Ureteral catheter + nephrostomy: 0.9% | <0.001 | <0.001 | 0.002 |
Model Type | Subset | AUC | Accuracy | Sensitivity | Specificity |
---|---|---|---|---|---|
Logistic Regression | Train | 0.786 | 0.723 | 0.694 | 0.733 |
Validation | 0.684 | 0.656 | 0.5 | 0.721 | |
Test | 0.682 | 0.718 | 0.619 | 0.75 | |
Decision Tree | Train | 0.718 | 0.797 | 0.306 | 0.956 |
Validation | 0.675 | 0.75 | 0.286 | 0.941 | |
Test | 0.593 | 0.729 | 0.19 | 0.906 | |
Random Forest | Train | 0.781 | 0.710 | 0.647 | 0.731 |
Validation | 0.726 | 0.708 | 0.607 | 0.75 | |
Test | 0.736 | 0.741 | 0.619 | 0.781 | |
Extreme Gradient Boosting | Train | 0.771 | 0.788 | 0.218 | 0.973 |
Validation | 0.734 | 0.708 | 0.071 | 0.971 | |
Test | 0.657 | 0.753 | 0.095 | 0.969 |
Metric | Validation Set | Test Set |
---|---|---|
Sensitivity | 0.964 | 0.905 |
Specificity | 0.162 | 0.141 |
PPV | 0.321 | 0.257 |
NPV | 0.917 | 0.818 |
Model Type | Subset | AUC | Accuracy | Sensitivity | Specificity |
---|---|---|---|---|---|
Logistic Regression | Train | 0.797 | 0.862 | 0.179 | 0.956 |
Validation | 0.705 | 0.857 | 0.1 | 0.959 | |
Test | 0.644 | 0.859 | 0.091 | 0.973 | |
Decision Tree | Train | 0.812 | 0.877 | 0.262 | 0.961 |
Validation | 0.726 | 0.833 | 0.2 | 0.919 | |
Test | 0.542 | 0.859 | 0.091 | 0.973 | |
Random Forest | Train | 0.866 | 0.888 | 0.107 | 0.995 |
Validation | 0.716 | 0.893 | 0.1 | 1.00 | |
Test | 0.633 | 0.882 | 0.091 | 1.00 | |
Extreme Gradient Boosting | Train | 0.972 | 0.912 | 0.94 | 0.909 |
Validation | 0.708 | 0.774 | 0.3 | 0.838 | |
Test | 0.671 | 0.824 | 0.273 | 0.905 |
Model Type | Subset | AUC | Accuracy | Sensitivity | Specificity |
---|---|---|---|---|---|
Logistic Regression | Train | 0.778 | 0.856 | 0.00 | 1.00 |
Validation | 0.684 | 0.854 | 0.00 | 1.00 | |
Test | 0.763 | 0.855 | 0.00 | 1.00 | |
Decision Tree | Train | 0.899 | 0.855 | 0.646 | 0.89 |
Validation | 0.727 | 0.833 | 0.5 | 0.89 | |
Test | 0.656 | 0.795 | 0.25 | 0.887 | |
Random Forest | Train | 0.91 | 0.887 | 0.646 | 0.927 |
Validation | 0.799 | 0.885 | 0.286 | 0.988 | |
Test | 0.735 | 0.843 | 0.333 | 0.93 | |
Extreme Gradient Boosting | Train | 0.976 | 0.917 | 0.939 | 0.913 |
Validation | 0.716 | 0.885 | 0.571 | 0.939 | |
Test | 0.658 | 0.795 | 0.417 | 0.859 |
Metric | Validation Set | Test Set |
---|---|---|
Sensitivity | 0.927 | 1.00 |
Specificity | 0.122 | 0.07 |
PPV | 0.153 | 0.154 |
NPV | 0.909 | 1.00 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Shalabayeva, L.; Bahílo Mateu, P.; Romeu Ferras, M.; Díaz-Carnicero, J.; Budía, A.; Vivas-Consuelo, D. Machine Learning Models for Predicting Postoperative Complications and Hospitalization After Percutaneous Nephrolithotomy. Algorithms 2025, 18, 558. https://doi.org/10.3390/a18090558
Shalabayeva L, Bahílo Mateu P, Romeu Ferras M, Díaz-Carnicero J, Budía A, Vivas-Consuelo D. Machine Learning Models for Predicting Postoperative Complications and Hospitalization After Percutaneous Nephrolithotomy. Algorithms. 2025; 18(9):558. https://doi.org/10.3390/a18090558
Chicago/Turabian StyleShalabayeva, Laura, Pilar Bahílo Mateu, Marc Romeu Ferras, Javier Díaz-Carnicero, Alberto Budía, and David Vivas-Consuelo. 2025. "Machine Learning Models for Predicting Postoperative Complications and Hospitalization After Percutaneous Nephrolithotomy" Algorithms 18, no. 9: 558. https://doi.org/10.3390/a18090558
APA StyleShalabayeva, L., Bahílo Mateu, P., Romeu Ferras, M., Díaz-Carnicero, J., Budía, A., & Vivas-Consuelo, D. (2025). Machine Learning Models for Predicting Postoperative Complications and Hospitalization After Percutaneous Nephrolithotomy. Algorithms, 18(9), 558. https://doi.org/10.3390/a18090558