Skip to main content
BJUI Compass logoLink to BJUI Compass
. 2026 Mar 6;7(3):e70176. doi: 10.1002/bco2.70176

Identifying recurrent stone formers with machine learning: A single‐centre observational study

Pedro Amado 1, Daniel G Fuster 2,3, Matteo Bargagli 2, Dominik Obrist 1, Fiona Burkhard 4, Beat Roth 5, Francesco Clavica 1,5,, Shaokai Zheng 1,6,7,
PMCID: PMC12966608  PMID: 41799328

Abstract

Objectives

Kidney stones affect 12% of the population over their lifetime. Recurrent kidney stones lead to repeated interventions and excessive healthcare costs. Despite progress in imaging and metabolic evaluations, models to accurately identify patients at high risk are missing. In this study, we investigate whether machine learning methods can facilitate early identification of recurrent kidney stone formers.

Patients and Methods

This observational study included data from the single‐centric Bern Kidney Stone Registry. Each participant had at least one stone episode. Different data imputation techniques, such as kernel density estimation (KDE) imputation, median imputation and k‐nearest neighbour (KNN) imputation, were evaluated in a logistic regression model. Feature selection with recursive feature elimination was applied. A fivefold cross‐validation was conducted using an 80/20 split. The classification criterion was recurrent kidney stone event.

Results

A total of 706 patients (median age, 47, 71.2% male) were included, and 563 (79.7%) had recurrent stone events. The median imputation yielded the best‐performing models. A mean receiver operating characteristic curve area under the curve (AUC) of 0.71 ± 0.03 was achieved on the held‐out test set. Estimated glomerular filtration rate (OR = 0.45, 95% CI: 0.42–0.49), age at first stone episode (OR = 0.50, 95% CI: 0.46–0.56), oxalate (OR = 1.83, 95% CI: 1.43–2.23) and pH (OR = 1.74, 95% CI: 1.47–1.89) were among the most descriptive features.

Conclusion

Routinely collected clinical and laboratory variables can be potentially exploited to identify recurrent stone formers, and our machine learning approach achieved better performance than previously reported work. With further validation on external datasets, our routine could support clinicians in designing dietary, medical or surveillance strategies, thereby reducing recurrence rates and improving long‐term outcomes for patients with stone‐forming conditions.

Keywords: classification, kidney stone, machine learning, recurrence

1. INTRODUCTION

Kidney stone disease is a prevalent condition, affecting roughly 12% of the population over a lifetime, with peak incidence in adults aged 20 to 49 years old. 1 The prevalence varies by geographic region, influenced by factors such as climate, diet and genetic predisposition. 2 Worldwide, the incidence and recurrence rates are increasing, 3 with recurrence being common in approximately 30–50% within 5–10 years and 75% within 20 years after the first stone event. 3 , 4 Recurrent stone formers face increased risks of pain, repeated surgeries and long‐term kidney damage, leading to substantial morbidity and healthcare costs. 5 , 6 , 7 Accurate identification of patients at high risk of recurrent stone events (RSEs) is therefore essential.

Younger age at first stone, being a male, a positive family history and a personal history of previous stones are all associated with increased risk of RSE. 2 , 8 , 9 , 10 Certain stone types, such as cystine and infection‐related struvite stones, are particularly prone to recur unless their cause is effectively treated. 8 , 11 Additionally, metabolic abnormalities like hypercalciuria, hypocitraturia and hyperoxaluria, 12 , 13 , 14 , 15 as well as comorbidities such as obesity, gout, bowel disease, diabetes and smoking 12 , 16 contribute significantly to future risk of RSE. Genetic polymorphisms 17 and diet seem to be important estimators too. 4 , 9 These factors are commonly assessed through patient history, stone analysis and metabolic evaluation, and they form the basis for clinical risk stratification.

Current clinical guidelines from the European Association of Urology 18 recommend identifying high‐risk stone formers to guide preventive interventions such as dietary modifications or pharmacological therapy. Dietary interventions are often enough for first‐time stone formers, while pharmacological treatments in addition to dietary interventions are more frequently started in patients with RSE. 9 Despite these guidelines, classifying recurrence remains challenging. 19 Most tools classify patients using broad categories and do not provide individualized risk stratification. The ROKS (Risk of Recurrence of Kidney Stone) score is one of the few established models, using basic demographic and clinical data to estimate 5‐ or 10‐year recurrence risk. 20 However, its predictive performance is moderate, 20 , 21 , 22 and it does not include important clinical variables such as 24‐h urine metabolic parameters, 20 which have been associated with recurrence risk. 15 , 23 , 24

Machine learning (ML) offers a promising alternative to traditional categorical risk‐scoring systems, as ML models can integrate a wide range of features, including demographics, stone history, laboratory data and comorbidities, and provide personalized suggestions. Early applications of ML in nephrolithiasis have shown encouraging results, with models using clinical and urine chemistry data achieving reasonable predictive accuracy on recurrent RSE. 24 , 25 , 26 , 27

In this study, we developed and validated an ML pipeline to classify RSE in adult patients. The goal was to distinguish between individuals with only one stone and those with RSE using routinely collected clinical and biochemical data. Following the TRIPOD+AI guideline, 28 multiple imputation strategies and feature selection techniques were evaluated using a fully nested cross‐validation scheme. The resulting classification model was designed to identify clinical and biochemical variables associated with RSE. This study offers insights into potential risk and protective factors, enhancing the understanding of RSE to inform targeted preventive strategies in clinical practice.

2. PATIENTS AND METHODS

2.1. Participants

This study used data from the Bern Kidney Stone Registry (BKSR), a retrospective registry established at the Division of Nephrology and Hypertension, Bern University Hospital, Switzerland. Data acquisition occurred between March 2004 and March 2020. The registry enrolled adults (≥18 years) with a history of at least one kidney stone event. Detailed inclusion criteria have been previously reported. 29 , 30 , 31 , 32 , 33 All participants received standard‐of‐care management according to clinical guidelines. The study was conducted in accordance with the Declaration of Helsinki, and ethical approval was granted by the Ethical Committee of the Canton of Bern (KEK‐Bern 95/06). All participants provided written informed consent.

2.2. Classification criterion

The classification criterion was RSE, defined as more than one documented kidney stone event. Classification was reviewed by nephrologists based on clinical history and medical records, with patients categorized as either recurrent (≥2 episodes) or first‐time (1 episode) stone formers.

2.3. Data processing

Candidate features for each subject were selected based on clinical relevance and availability at the time of enrolment. These included demographic variables (e.g., age and sex), clinical characteristics (e.g., body mass index [BMI]) and biochemical measurements obtained during the baseline metabolic evaluation, such as 24‐h urinary parameters. Features with more than 25% missing data were excluded for model development. Rates of missing data are summarized in the Supporting Information (Table S1).

2.4. Data imputation

Missing values were addressed using three imputation methods: Kernel density estimation (KDE) for continuous features and Bernoulli probability distribution for binary data, respectively; median imputation for continuous features and random sampling (50/50) for binary data; and k‐nearest neighbour (KNN) for both feature types (see Supporting Information). All imputation methods were applied in a leakage‐free manner, where imputation parameters were derived from the training set and applied independently to the corresponding left‐out validation set. After imputation, continuous features were standardized using z score normalization (between −1 and 1), and features with pairwise Pearson correlation above 0.9 (based on the training data) were removed to reduce multicollinearity.

2.5. Model development

A fivefold cross‐validation scheme was performed on the full dataset. Within each fold, all combinations of the three imputation methods and varying numbers of selected features (ranging from 5 to 24) were evaluated using logistic regression (scikit‐learn v 1.6.1). Feature selection began at five features, as fewer numbers of features showed poorer predictive performance in our preliminary studies. Feature selection was carried out using recursive feature elimination (RFE), as implemented in scikit‐learn (v 1.6.1), and logistic regression with balanced class weights was trained with a maximum of 3000 iterations. Classifier probabilities were generated, and the optimal binary decision threshold was determined by maximizing Youden's J statistics. The combination of the imputation method and the number of features that achieved the highest Youden's J in each training fold was selected as the best‐performing model for that fold. The full pipeline is shown in Figure 1.

FIGURE 1.

FIGURE 1

Flow chart of the modelling pipeline including imputation and feature selection, followed by performance evaluation.

2.6. Model validation

Using the five best models selected from each fold, performance was reported on both the training and the left‐out validation sets. Metrics included accuracy, recall, specificity, F1 score, balanced accuracy and receiver operating characteristic curve (ROC) area under the curve (AUC). To support model interpretability, odds ratios (ORs) were calculated for features consistently selected across all models. Features with OR > 1 are associated with an increased risk of RSE, whereas those with OR < 1 are considered protective.

2.7. Statistics

Results are reported in mean ± SD (standard deviation) or median (interquartile range, IQR) where appropriate. OR was reported with a 95% confidence interval (CI). Univariate comparisons were tested using the chi‐squared test for binary variables and the two‐sided Wilcoxon rank‐sum test (SciPy, 1.11.1) for continuous variables. p values smaller than 0.05 were regarded as significant.

A permutation test was performed on the best and worst performing cross‐validation models to assess whether the observed predictive performance was significantly better than expected by chance. Under the null hypothesis of no association between features and the classification criterion, the training labels were randomly permuted while preserving the validation set. For each permutation (n = 1000), the logistic regression model was retrained using the fixed parameters identified in the cross‐validation, and the ROC‐AUC was computed on the held‐out validation set. The p value was estimated as the proportion of permuted AUCs greater than or equal to the observed AUC. 34

3. RESULTS

3.1. Patients

The overall cohort included n = 706 patients with a median age of 47 years (IQR: 36–58), and 503/706 (71.2%) were male. Characteristics for patients with and without recurrence are summarized in Table 1.

TABLE 1.

Patient characteristics for the nonrecurrent and recurrent groups. p values between the two patient groups are reported. p values smaller than 0.05 are regarded as significant and highlighted in bold.

Category Variable Nonrecurrent Recurrent p value
Demographics Age, year, median (IQR) 38 (27–53) 48 (39–59) <0.001
Sex (n, %) 0.032
Female 52, 36.4% 151, 26.8%
Male 91, 63.6% 412, 73.2%
Clinical examination Body mass index, kg/m2, median (IQR) 25.6 (21.3–8.7) 26.4 (23.8–29.7) 0.007
Systolic blood pressure, mmHg, median (IQR) 126.0 (117–0‐139.4) 133.0 (123.0–146.0) 0.004
Diastolic blood pressure, mmHg median (IQR) 81.2 (74.0–92.0) 86.0 (78.0–95.0) 0.005
Medical history Diabetes (n, %) 1.000
Yes 4, 2.8% 15, 2.7%
No 139, 97.2% 547, 97.3%
Hypertension (n, %) 0.232
Yes 43, 30.9% 192, 36.9%
No 96, 69.1% 329, 63.1%
Family history stones (n, %) 0.989
Yes 56, 42.4% 232, 43.0%
No 76, 57.6% 308, 57.0%
Stone history Age 1st stone, year, median (IQR) 36 (25–51) 34 (25–45) 0.102
Stone risk ratios Supersaturation calcium oxalate, median (IQR) 6.0 (3.6–10.1) 6.8 (4.0–11.0) 0.145
Supersaturation brushite, median (IQR) 1.0 (0.4–2.9) 1.2 (0.4–3.4) 0.500
Supersaturation uric acid, median (IQR) 3.0 (0.9–6.2) 2.7 (0.6–7.1) 0.246
Urine titratable acidity, median (IQR) 20.2 (10.5–30.6) 19.2 (9.9–28.2) 0.178
Laboratory urine 24 h Total urine volume, litres, median (IQR) 1.9 (1.4–2.5) 2.0 (1.5–2.6) 0.116
Urine pH, median (IQR) 5.8 (5.3–6.5) 5.9 (5.4–6.6) 0.124
Components, mmol, median (IQR)
Sodium 171.0 (139.2–233.5) 179.5 (139.5–231.0) 0.524
Potassium 62.0 (49.5–79.2) 61.5 (48.5–78.8) 0.712
Uric acid 7.9 (5.9–10.0) 8.2 (6.2–10.1) 0.381
Creatinine 13.0 (10.5–16) 13.4 (10.4–16.3) 0.575
Calcium 5.4 (3.8–7.3) 5.6 (3.6–8.4) 0.297
Magnesium 3.1 (3.1–5.1) 4.0 (3.0–5.2) 0.731
Chloride 155.2 (124.5–233.1) 168.2 (126.6–216.0) 0.661
Citrate 2.7 (1.8–3.5) 2.6 (1.7–3.6) 0.794
Inorganic phosphate 29.5 (22.5–35.4) 28.3 (22.1–36.3) 0.963
Oxalate 0.4 (0.2–0.5) 0.4 (0.4–0.6) 0.013
Sulfate 20.0 (16.2–26.4) 20.9 () 0.917
eGFR, median (IQR) 100.3 (86.6–117.6) 95.3 (79.1–108.3) <0.001
Stone composition Total proportion of calcium oxalate stones (%) 100 (75–100) 95 (65–100) 0.495
Proportion of calcium oxalate monohydrate 70 (10–80) 70 (10–80) 0.720
Proportion of calcium oxalate dihydrate 20 (5–30) 20 (0–30) 0.492
Total proportion of calcium phosphate stones (%) 0 (0–10) 0 (0–10) 0.799
Proportion of uric acid 0 (0–0) 0 (0–0) 0.689
Proportion of struvite 0 (0–0) 0 (0–0) 0.939
Proportion of cystine 0 (0–0) 0 (0–0) 0.896
Total proportion of other stone groups (%) 0 (0–0) 0 (0–0) 0.966

Univariate analysis comparing both patient groups, performed on all 35 features, showed that RSE was associated with higher age (p < 0.001), higher systolic and diastolic blood pressure (p < 0.01) and a higher BMI (p < 0.01). Urinary biochemical profiles and stone composition variables were largely similar between the two groups, except for urinary oxalate (p < 0.05) and estimated glomerular filtration rate (eGFR) (p < 0.001). Patients with recurrence had higher urinary oxalate excretion and lower eGFR compared with those without recurrence. No significant differences were observed regarding diabetes, hypertension or family history of stones.

Moreover, 24‐h urine chemistry was used to calculate the relative supersaturation of uric acid, calcium oxalate and brushite, providing an estimate of the risk of crystal formation. However, no statistically significant difference was observed between the recurrence and nonrecurrence groups. These metrics are obtained by comparing the ionic activity product of each salt to its thermodynamic solubility product. 35 , 36 Required inputs include urinary pH, volume, calcium, oxalate, uric acid, citrate and other electrolytes.

3.2. Imputation methods

A total of 35 features were included, and 11 of them had more than 25% missing data. Twenty‐four features were considered for subsequent analysis. Further details are reported in the Supporting Information (Table S1).

When evaluating the different imputation methods, the KDE method preserved the original distribution across all features. In contrast, the KNN method maintained similarity for simpler features but introduced moderate shifts in more complex or skewed features. The median method consistently altered feature distributions by introducing a peak at the median value, reducing overall variability. Examples for each method are given in the Supporting Information (Figure S1).

During model development, combinations of the three imputation methods and varying numbers of selected features were evaluated. Figure 2 summarizes the performance of each configuration across all fivefold cross‐validation. In four out of fivefolds, median imputation obtained the highest Youden's J index, with optimal feature counts ranging from 12 to 18. In the remaining fold, KNN imputation achieved the best performance with nine selected features.

FIGURE 2.

FIGURE 2

Imputation method and feature selection. Each panel shows the mean Youden's J for the three selected imputation methods (KDE, Median, and KNN) and for feature count varying from five to 25 features.

3.3. Model specification and performance

The model's performance on the fivefold cross‐validation is shown in Figure 3A. For the training and testing data, the mean AUC was 0.74 ± 0.01 and 0.71 ± 0.02, the F1 score was 0.77 ± 0.01 and 0.71 ± 0.10, the balanced accuracy was 0.74 ± 0.01 and 0.70 ± 0.02, the accuracy was 0.68 ± 0.01 and 0.62 ± 0.10, the recall was 0.67 ± 0.02 and 0.58 ± 0.16, the precision was 0.90 ± 0.01 and 0.92 ± 0.03 and the specificity was 0.71 ± 0.04 and 0.79 ± 0.14.

FIGURE 3.

FIGURE 3

Performance metrics and ROC curve. (A) Train (dark blue) and test (light blue) performance metrics. (B) Mean and 95% confidence interval for ROC across the fivefolds on the validation set. (C) Permutation test for the best performing model out of the fivefolds.

The best‐performing model across the five cross‐validation folds achieved an AUC of 0.75 (Figure 3B). For the permutation test, the best‐performing fold (AUC = 0.749, median imputation method) had a mean AUC of 0.511 ± 0.083 (Figure 3C). The corresponding p value of 0.002 indicates that the observed predictive performance would be highly unlikely if there were no association between the features and the classification criterion. For the worst‐performing fold (AUC = 0.680, KNN imputation), the mean AUC was 0.505 ± 0.095 (Figure S2), with a p value of 0.025, still supporting a performance significantly above chance.

The summary of the most influential features selected by the models is presented in Figure 4. Only features selected by at least four out of the fivefold models were included. Notably, a higher urine pH (OR = 1.74, 95% CI: 1.47–1.89), elevated calcium (OR = 1.73, 95% CI: 1.65–1.91) and oxalate (OR = 1.83, 95% CI: 1.43–2.23) concentrations and increased supersaturation of uric acid (OR = 1.59, 95% CI: 1.30–1.89) were consistently associated with a greater risk of RSE. Other risk factors with OR > 1 include male sex (OR = 1.49, 95% CI: 1.34–1.58) and higher BMI (OR = 1.42, 95% CI: 1.30–1.50), both of which appear to increase the likelihood of recurrent stone events.

FIGURE 4.

FIGURE 4

Summary of key features. Odds ratios with confidence intervals from the final logistic regression model.

Features associated with a reduced risk of recurrence included higher urinary potassium (OR = 0.80, 95% CI: 0.74–0.89) and supersaturation of brushite (RSRBr, OR = 0.72, 95% CI: 0.64–0.77). The most protective features identified were eGFR (OR = 0.72, 95% CI: 0.64–0.77) and age at first stone episode (OR = 0.50, 95% CI: 0.46–0.56).

4. DISCUSSION

In this study, we developed and validated a fully nested ML pipeline to classify patients with RSE versus those who had experienced only a single documented episode, based on routinely available demographic and 24‐h urine laboratory data. The classifier achieved strong performance, with a mean ROC‐AUC of 0.71 ± 0.03. Statistical analysis between the different available features was also evaluated. All variables that showed statistically significant differences between recurrent and nonrecurrent groups in the univariate analysis (p < 0.05) in Table 1, such as BMI, sex, eGFR and oxalate, were also selected by the classification model. Interestingly, some variables that did not show significant differences in univariate statistical tests still emerged as important features in the logistic regression model. This highlights the added value of multivariable modelling in uncovering complex relationships that may not be evident through univariate analysis.

Our findings complement and extend prior work using applied statistical and ML methods to estimate RSE. For example, the ROKS nomogram developed by Rule et al., 20 achieved a C‐index of approximately 0.67 in internal validation and an AUC of 0.66 in external surgical cohorts, using 11 features. More recent ML approaches, 24 , 25 incorporating 24‐h urine data and electronic health records, reported AUC between 0.60 and 0.65. While these studies demonstrate the feasibility of ML in this domain, their improvements over traditional models were modest. In contrast, our classification model demonstrated good performance between the target groups. This suggests that careful integration of clinical and biochemical features, combined with ML models, could substantially improve the success rate of identifying patients with RSE. If trained and validated on a larger external dataset, the pipeline presented in this study may facilitate a more accurate risk stratification tool for clinical practice.

Handling missing data is critical in developing classification models, particularly in medicine, where missingness can vary substantially. Among the three tested imputation strategies (KDE, KNN, median), median imputation was most often selected across cross‐validation folds, indicating the most consistent performance in our setting. This is likely due to the lower variance in the data, which makes it well‐suited to our dataset, given its relatively low levels of missing data (<6.5%). The KNN method, though less frequently chosen, still showed competitive performance by leveraging similarities between patients, consistent with reports that multivariate approaches can improve classification in structured clinical data. 37 , 38 , 39 , 40 By contrast, the KDE method performed worse for the classification task explored in this study. This may be because it samples from the overall distribution of a variable, maintaining the variability of the original data. While this makes KDE more faithful to the underlying data distribution, the variances are substantially larger in the imputed data compared with the other two methods. As such, the KDE method might offer better descriptive values in generative models intended for a larger cohort, subject to further examination.

One of the main advantages of using logistic regression in clinical classification is its interpretability, since it can quantify how individual features influence the odds of outcomes such as RSE. In our model, several features demonstrated strong and clinically meaningful associations. The degree of variability in these estimates reflects the stability of each feature's influence across different models. Although the optimal number of features varied slightly across models, a core subset of features was repeatedly selected, and models with more than 10 features consistently demonstrated strong discriminative ability. Features count below nine, however, were associated with reduced performance.

The eGFR was the strongest protective factor in our model. Higher eGFR values, associated with better kidney function, were linked to a lower risk of recurrence. This supports the idea that healthy kidneys are more effective at clearing stone‐forming substances, thereby reducing the likelihood of new stones. 41 Age at first stone episode was also a protective factor, showing its inverse correlation with RSE. Younger age at first presentation often indicates a more aggressive disease, which is associated with a higher lifetime recurrence risk. 42 Potassium levels also showed protective effects, aligning with established evidence that hypokalaemia is associated with a higher risk of kidney stones. 43 This is explained by the role of potassium in maintaining urinary citrate levels, a key inhibitor of calcium stone formation. 43

Conversely, several features were associated with increased recurrence risk. BMI was positively associated with recurrence, reinforcing the well‐established connection between obesity and stone formation. 44 Male sex is also classified as a risk factor for recurrence odds, reflecting patterns possibly related to dietary, hormonal or urinary compositional differences. 45 Urinary markers in our data reflected known risk factors for stone formation, especially calcium oxalate stones, which were the most common type in our cohort. Higher urinary calcium was linked to increased recurrence risk, consistent with the role of excess calcium in crystal formation. 8 Urinary pH also played a role. Low pH can lead to uric acid stones, while high pH can favour calcium phosphate stones, suggesting that both very low and very high pH levels may increase risk, depending on the stone type. 46 Although pH mainly affects other stone types, our data suggest that higher urinary pH may also increase the risk of calcium oxalate stone recurrence, possibly due to mixed stone formation or metabolic factors like low citrate or high urinary calcium. Moreover, urinary oxalate showed the strongest association with RSE overall. Since oxalate binds easily with calcium to form calcium oxalate, which is the main stone type in our patients, even small increases in oxalate levels can raise the risk, especially when urine volume is low or when inhibitors like citrate are reduced.

Interestingly, the relative supersaturation values also emerged as key features. Typically, these metrics are not used for classifying recurrence risk directly, but rather to assess stone‐forming potential based on a 24‐h urine laboratory test. 35 , 47 Clinically, they guide preventive strategies by quantifying the thermodynamic likelihood of crystal formation, informing dietary and pharmacologic interventions. Their importance in our model suggests that the effects that lead to stone formation help classify RSE. This supports the clinical value of relative supersaturation indices for both treatment decisions and classification.

Overall, these findings corroborate established mechanisms of stone formation while providing information on the critical features that lead to RSE. Importantly, many of the identified risk factors can be adjusted through dietary, pharmacological or lifestyle interventions, which can be used as prevention strategies.

Several limitations of our study should be noted. First, the dataset was derived from a cross‐sectional cohort where recurrence was defined independently of prior or subsequent treatment. As such, the present analysis cannot assess the impact of treatment on recurrence risk. Future longitudinal studies are therefore needed to determine whether these predictors can identify patients who remain at elevated risk of recurrence despite treatment. Furthermore, we acknowledge that the study was conducted using data from a single centre and without external validation, which may limit generalizability. While nested cross‐validation provides an unbiased internal estimation of model performance, future work should focus on multicentre external validation and prospective data collection, including information on time to recurrence and number of recurrence events, to further refine risk assessment and clinical applicability. Nonetheless, given the strong performance achieved by using data from a single centre and only routinely available variables, our approach presents itself as a viable candidate for further development to help personalize preventive strategies for stone formers with a high risk of RSE, who would otherwise be missed.

Furthermore, although the model achieved a high AUC, suggesting good overall performance, its lower recall compared with the AUC indicates that some recurrent cases were not identified. Clinically, this means the tool may underestimate recurrence risk in certain patients. Future work should aim to improve sensitivity while maintaining discrimination. Moreover, our sample size was relatively small (n = 706), with an even smaller number of nonrecurrent cases (n = 143). Recurrence was not stratified by time to recurrence, which limited the temporal interpretation of the data. In contrast, other studies, such as Doyle et al., 25 used symptom‐based definitions, and the ROKS nomogram stratified recurrence risk at multiple time points.

AUTHOR CONTRIBUTIONS

Pedro Amado and Shaokai Zheng contributed to the conception and design of the study, performed the data analysis and wrote the early drafts of the manuscript. Francesco Clavica acquired funding for this study. Daniel G. Fuster and Beat Roth collected the data. Matteo Bargagli and Pedro Amado contributed to data curation. All authors provided critical reviews of the manuscript.

CONFLICT OF INTEREST STATEMENT

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Supporting information

Table S1. Patient characteristics and missing data. Summary of patient information for the full dataset, including the percentage of missing values for each variable.

Figure S1. Distribution of imputed data across methods. Distributions of age of 1st stone, RSRCaOx, and hypertension before and after imputation using KDE, median, and KNN methods. Plots illustrate how each method affects data distribution.

Figure S2. Permutation test for the worst performing model out of the 5 folds.

BCO2-7-e70176-s001.docx (295.3KB, docx)

ACKNOWLEDGEMENTS

FC acknowledges financial support from the Swiss National Science Foundation (SNSF) through grants IZCOZ0_182966 and 205320_204965. DF acknowledges support from SNSF grants 320030‐227578, 33IC30_166785, and 33IC30_229750. DF also acknowledges the support from the Center for AI in Medicine (CAIM) Research Grant from the University of Bern. Open access publishing facilitated by Universitat Bern, as part of the Wiley ‐ Universitat Bern agreement via the Consortium Of Swiss Academic Libraries.

Contributor Information

Francesco Clavica, Email: francesco.clavica@unibe.ch.

Shaokai Zheng, Email: shaokai.zheng@outlook.com.

DATA AVAILABILITY STATEMENT

The data that support the findings of this study are available from the corresponding author upon reasonable request.

REFERENCES

  • 1. Alelign T, Petros B. Kidney stone disease: an update on current concepts. Adv Urol. 2018;2018:3068365. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2. Romero V, Akpinar H, Assimos DG. Kidney stones: a global picture of prevalence, incidence, and associated risk factors. Rev Urol. 2010. Spring;12:e86–e96. [PMC free article] [PubMed] [Google Scholar]
  • 3. Thongprayoon C, Krambeck AE, Rule AD. Determining the true burden of kidney stone disease. Nat Rev Nephrol. 2020;16:736–746. [DOI] [PubMed] [Google Scholar]
  • 4. Chewcharat A, Thongprayoon C, Vaughan LE, Mehta RA, Schulte PJ, O'Connor HM, et al. Dietary risk factors for incident and recurrent symptomatic kidney stones. Mayo Clin Proc. 2022;97:1437–1448. [DOI] [PubMed] [Google Scholar]
  • 5. Zeng J, Wang S, Zhong L, Huang Z, Zeng Y, Zheng D, et al. A retrospective study of kidney stone recurrence in adults. J Clin Med Res. 2019;11(3):208–212. 10.14740/jocmr3753 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6. Khan SR, Pearle MS, Robertson WG, Gambaro G, Canales BK, Doizi S, et al. Kidney stones. Nat Rev Dis Primers. 2016;2:16008. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7. Dhondup T, Kittanamongkolchai W, Vaughan LE, Mehta RA, Chhina JK, Enders FT, et al. Risk of ESRD and mortality in kidney and bladder stone formers. Am J Kidney Dis. 2018;72(6):790–797. 10.1053/j.ajkd.2018.06.012 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8. Wang K, Ge J, Han W, et al. Risk factors for kidney stone disease recurrence: a comprehensive meta‐analysis. BMC Urol. 2022;22:62. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9. Ferraro PM, Curhan GC, D'Addessi A, Gambaro G. Risk of recurrence of idiopathic calcium kidney stones: analysis of data from the literature. J Nephrol. 2017;30:227–233. [DOI] [PubMed] [Google Scholar]
  • 10. Ito K, Takahashi T, Somiya S, Kanno T, Higashi Y, Yamada H. Predictors of repeat surgery and stone‐related events after flexible ureteroscopy for renal stones. Urology. 2021;154:96–102. [DOI] [PubMed] [Google Scholar]
  • 11. Flannigan R, Choy WH, Chew B, Lange D. Renal struvite stones—pathogenesis, microbiology, and management strategies. Nat Rev Urol. 2014;11(6):333–341. 10.1038/nrurol.2014.99 [DOI] [PubMed] [Google Scholar]
  • 12. Fink HA, Wilt TJ, Eidman KE, Garimella PS, MacDonald R, Rutks IR, et al. Medical management to prevent recurrent nephrolithiasis in adults: a systematic review for an American College of Physicians clinical guideline. Ann Intern Med. 2013;158:535–543. [DOI] [PubMed] [Google Scholar]
  • 13. Strohmaier WL, Seilnacht J, Schubert G. Urinary stone formers with hypocitraturia and ‘normal’ urinary pH are at high risk for recurrence. Urol Int. 2012;88(3):294–297. 10.1159/000335441 [DOI] [PubMed] [Google Scholar]
  • 14. Jacob DE, Grohe B, Geßner M, Beck BB, Hoppe B. Kidney stones in primary hyperoxaluria: new lessons learnt. PLoS ONE. 2013;8(8):e70617. 10.1371/journal.pone.0070617 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15. Ferraro PM, Ticinesi A, Meschi T, Rodgers A, Di Maio F, Fulignati P, et al. Short‐term changes in urinary relative supersaturation predict recurrence of kidney stones: a tool to guide preventive measures in urolithiasis. J Urol. 2018;200:1082–1087. [DOI] [PubMed] [Google Scholar]
  • 16. Baowaidan F, Zugail AS, Lyoubi Y, Culty T, Lebdai S, Brassart E, et al. Incidence and risk factors for urolithiasis recurrence after endourological management of kidney stones: a retrospective single‐centre study. Prog Urol. 2022;32:601–607. [DOI] [PubMed] [Google Scholar]
  • 17. Atmoko W, Raharja PAR, Birowo P, Hamid ARAH, Taher A, Rasyid N. Genetic polymorphisms as prognostic factors for recurrent kidney stones: a systematic review and meta‐analysis. PLoS ONE. 2021;16(5):e0251235. 10.1371/journal.pone.0251235 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18. Skolarikos A, Straub M, Knoll T, Sarica K, Seitz C, Petřík A, et al. Metabolic evaluation and recurrence prevention for urinary stone patients: EAU guidelines. Eur Urol. 2015;67:750–763. [DOI] [PubMed] [Google Scholar]
  • 19. D'Costa MR, Haley WE, Mara KC, Enders FT, Vrtiska TJ, Pais VM, et al. Symptomatic and radiographic manifestations of kidney stone recurrence and their prediction by risk factors: a prospective cohort study. J Am Soc Nephrol. 2019;30(7):1251–1260. 10.1681/ASN.2018121241 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20. Rule AD, Lieske JC, Li X, Melton LJ III, Krambeck AE, Bergstralh EJ. The ROKS nomogram for predicting a second symptomatic stone episode. J Am Soc Nephrol. 2014;25(12):2878–2886. 10.1681/ASN.2013091011 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21. Iremashvili V, Li S, Penniston KL, Best SL, Hedican SP, Nakada SY. External validation of the recurrence of kidney stone nomogram in a surgical cohort. J Endourol. 2019;33:475–479. [DOI] [PubMed] [Google Scholar]
  • 22. Kavoussi NL, Da Silva A, Floyd C, McCoy A, Koyama T, Hsi RS. Feasibility of stone recurrence risk stratification using the recurrence of kidney stone (ROKS) nomogram. Urolithiasis. 2023;51(1):73. 10.1007/s00240-023-01446-2 [DOI] [PubMed] [Google Scholar]
  • 23. Gadzhiev N, Gelig V, Rodionov G, Gauhar V, Zeng G. Metabolic differences in 24‐hour urine parameters between calcium oxalate monohydrate and dihydrate kidney stones: a clinical study. Diagnostics. 2025;15(8):994. 10.3390/diagnostics15080994 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24. Shee K, Liu AW, Chan C, Yang H, Sui W, Desai M, et al. A novel machine‐learning algorithm to predict stone recurrence with 24‐hour urine data. J Endourol. 2024;38:809–816. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25. Doyle P, Gong W, Hsi R, Kavoussi N. Machine learning models to predict kidney stone recurrence using 24 hour urine testing and electronic health record‐derived features. Res Sq. 2023; 1:13 (pre‐print). [Google Scholar]
  • 26. Shee K, Chan C, Liu A, Yang H, Sui W, Ho S, et al. A novel machine‐learning algorithm to predict stone recurrence with 24‐hour urine data. J Urol. 2023;209(Supplement 4):809–816. 10.1097/JU.0000000000003327.05 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27. Li P, Li Y, Yang B, Zhang X, Li J. Machine learning algorithms in predicting the recurrence of renal stones using clinical data. Urolithiasis. 2023;52:12. [DOI] [PubMed] [Google Scholar]
  • 28. Collins GS, Moons KGM, Dhiman P, Riley RD, Beam AL, Van Calster B, et al. TRIPOD+AI statement: updated guidance for reporting clinical prediction models that use regression or machine learning methods. BMJ. 2024;385:e078378. 10.1136/bmj-2023-078378 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29. Anderegg MA, Olinger EG, Bargagli M, Geraghty R, Taylor L, Nater A, et al. Prevalence and characteristics of genetic disease in adult kidney stone formers. Nephrol Dial Transpl. 2024;39(9):1426–1441. 10.1093/ndt/gfae074 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30. Fuster DG, Morard GA, Schneider L, Mattmann C, Lüthi D, Vogt B, et al. Association of urinary sex steroid hormones with urinary calcium, oxalate and citrate excretion in kidney stone formers. Nephrol Dial Transpl. 2022;37(2):335–348. 10.1093/ndt/gfaa360 [DOI] [PubMed] [Google Scholar]
  • 31. Dhayat NA, Schneider L, Popp AW, Lüthi D, Mattmann C, Vogt B, et al. Predictors of bone mineral density in kidney stone formers. Kidney Int Rep. 2022;7:558–567. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 32. Dhayat NA, Lüthi D, Schneider L, Mattmann C, Vogt B, Fuster DG. Distinct phenotype of kidney stone formers with renal phosphate leak. Nephrol Dial Transpl. 2019;34(1):129–137. 10.1093/ndt/gfy170 [DOI] [PubMed] [Google Scholar]
  • 33. Dhayat NA, Schaller A, Albano G, Poindexter J, Griffith C, Pasch A, et al. The vacuolar H+‐ATPase B1 subunit polymorphism p.E161K associates with impaired urinary acidification in recurrent stone formers. J Am Soc Nephrol. 2016;27(5):1544–1554. 10.1681/ASN.2015040367 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 34. Knijnenburg TA, Wessels LF, Reinders MJ, Shmulevich I. Fewer permutations, more accurate p‐values. Bioinformatics. 2009;25:i161–i168. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35. Werness PG, Brown CM, Smith LH, Finlayson B. EQUIL2: a BASIC computer program for the calculation of urinary saturation. J Urol. 1985;134(6):1242–1244. 10.1016/S0022-5347(17)47703-2 [DOI] [PubMed] [Google Scholar]
  • 36. Marangella M, Petrarulo M, Vitale C, Daniele P, Sammartano S. LITHORISK.COM: the novel version of a software for calculating and visualizing the risk of renal stone. Urolithiasis. 2021. Jun;49(3):211–217. 10.1007/s00240-020-01228-0 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37. Beretta L, Santaniello A. Nearest neighbor imputation algorithms: a critical evaluation. BMC Med Inform Decis Mak. 2016;16:74. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 38. Alnowaiser K. Improving healthcare prediction of diabetic patients using KNN imputed features and tri‐ensemble model. IEEE Access. 2024;12:16783–16793. 10.1109/ACCESS.2024.3359760 [DOI] [Google Scholar]
  • 39. Jadhav A, Dhanya P, Ramanathan K. Comparison of performance of data imputation methods for numeric dataset. Appl Artif Intell. 2019;33:913–933. [Google Scholar]
  • 40. Hu L‐Y, Huang M‐W, Ke S‐W, Tsai C‐F. The distance function effect on k‐nearest neighbor classification for medical datasets. SpringerPlus. 2016;5:1304. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 41. Rule AD, Bergstralh EJ, Melton LJ 3rd, Li X, Weaver AL, Lieske JC. Kidney stones and the risk fo chronic kidney disease. Clin J Am Soc Nephrol. 2009;4(4):804–811. 10.2215/CJN.05811108 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 42. Li Y, Bayne D, Wiener S, Ahn J, Stoller M, Chi T. Stone formation in patients less than 20 years of age is associated with higher rates of stone recurrence: results from the Registry for Stones of the Kidney and Ureter (ReSKU). J Pediatr Urol. 2020;16:373.e1–373.e6. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 43. Peerapen P, Thongboonkerd V. Kidney stone prevention. Adv Nutr. 2023;14(3):555–569. 10.1016/j.advnut.2023.03.002 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 44. Semins MJ, Shore AD, Makary MA, Magnuson T, Johns R, Matlaga BR. The association of increasing body mass index and kidney stone disease. J Urol. 2010;183(2):571–575. 10.1016/j.juro.2009.09.085 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 45. Ferraro PM, Taylor EN, Curhan GC. Factors associated with sex differences in the risk of kidney stones. Nephrol Dial Transplant. 2023;38:177–183. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 46. Wagner CA, Mohebbi N. Urinary pH and stone formation. J Nephrol. 2010;23(Suppl 16):S165–S169. 10.1093/joneph/23.S16.S165 [DOI] [PubMed] [Google Scholar]
  • 47. Worcester EM, Coe FL. Clinical practice. Calcium kidney stones. N Engl J Med. 2010;363:954–963. [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Table S1. Patient characteristics and missing data. Summary of patient information for the full dataset, including the percentage of missing values for each variable.

Figure S1. Distribution of imputed data across methods. Distributions of age of 1st stone, RSRCaOx, and hypertension before and after imputation using KDE, median, and KNN methods. Plots illustrate how each method affects data distribution.

Figure S2. Permutation test for the worst performing model out of the 5 folds.

BCO2-7-e70176-s001.docx (295.3KB, docx)

Data Availability Statement

The data that support the findings of this study are available from the corresponding author upon reasonable request.


Articles from BJUI Compass are provided here courtesy of Wiley

RESOURCES