Predicting Kidney Stones from Urinalysis: A Comparative Evaluation of an MLP-Based Deep Neural Network and Random Forest Classifier with SHAP Analysis and Statistical Validation
Keywords:
Kidney Stones, Deep Learning, Multilayer Perceptron, Random Forest, SHAP Analysis, Statistical Validation, Urinalysis, Robust ScalingAbstract
AbstractNephrolithiasis (kidney stone disease) presents a diagnostic challenge that requires accurate, non-invasive screening methods to reduce clinical burden. While urine chemistry offers vital physiological insights, capturing the non-linear interactions within these parameters remains difficult for traditional linear models. This study presents a comparative evaluation of a Deep Learning (DL) approach using a Multilayer Perceptron (MLP) against a robust Machine Learning (ML) baseline, the Random Forest classifier. Utilizing a public dataset from the Kaggle repository containing 79 patient records and six biochemical features (specific gravity, pH, osmolality, conductivity, urea, and calcium), we implemented a data science pipeline featuring robust scaling to mitigate outliers and stratified partitioning. To ensure the reliability and interpretability of our findings, we integrated McNemar’s statistical test for validation and SHAP (SHapley Additive exPlanations) for feature analysis. The results indicate that the MLP-based Deep Neural Network achieved a superior testing accuracy of 75.00% and an F1-score of 0.73, outperforming the Random Forest classifier, which attained an accuracy of 66.67%. SHAP analysis identified calcium concentration as the dominant predictor, validating the model against clinical pathophysiology. Although statistical testing (
p=1.000p=1.000) reflected the limitations of the small sample size, the deep learning model demonstrated a qualitative advantage in correctly classifying complex instances. These findings highlight the potential of interpretable and statistically validated deep neural architectures in enhancing the precision of non-invasive nephrolithiasis screening.
Keywords: Kidney Stones, Deep Learning, Multilayer Perceptron, Random Forest, SHAP Analysis, Statistical Validation, Urinalysis, Robust Scaling.






