Peritonitis is a serious complication frequently experienced by patients undergoing Continuous Ambulatory Peritoneal Dialysis (CAPD) and may worsen patient outcomes if not detected early. This study aims to develop a machine learning model to predict peritonitis risk using the Random Forest algorithm and to interpret prediction results using Explainable Artificial Intelligence (XAI). The study utilized a secondary dataset obtained from Kaggle consisting of 20,538 clinical records that were transformed to represent CAPD-related clinical parameters. The research stages included data preprocessing, feature selection using SelectKBest (f_classif), dataset splitting into training and testing sets, model development using Random Forest, and performance evaluation using accuracy, precision, recall, F1-score, and Area Under Curve (AUC). Model interpretability was analyzed using SHAP to identify feature contributions. The experimental results demonstrate that the proposed model achieved an accuracy of 98.70%, precision of 98.22%, recall of 99.24%, F1-score of 98.73%, and AUC of 1.00. The findings indicate that Random Forest provides highly reliable predictive performance and interpretable insights into clinical features influencing peritonitis risk. The developed model has potential to support clinical decision-making systems for early detection of peritonitis risk in CAPD patients.
Copyrights © 2026