<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.3 20210610//EN" "https://jats.nlm.nih.gov/publishing/1.3/JATS-journalpublishing1-3.dtd"><article xml:lang="en" xmlns:ali="http://www.niso.org/schemas/ali/1.0/" article-type="research-article" dtd-version="1.3" xmlns:xlink="http://www.w3.org/1999/xlink"><front><journal-meta><journal-id journal-id-type="issn">2607-9917</journal-id><journal-title-group><journal-title>Bulletin de la Dialyse à Domicile</journal-title><abbrev-journal-title>Bull Dial Domic</abbrev-journal-title></journal-title-group><issn pub-type="epub">2607-9917</issn><publisher><publisher-name>RDPLF</publisher-name><publisher-loc>France</publisher-loc></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.25796/bdd.v9i3.87120</article-id><article-categories><subj-group><subject>Artificial intelligence</subject><subj-group><subject>peritoneal dialysis</subject></subj-group></subj-group></article-categories><title-group><article-title>Predicting the Need for Hemodialysis in Peritoneal Dialysis Patients with at Least One Episode of Peritonitis Using Artificial Intelligence</article-title></title-group><contrib-group><contrib contrib-type="author"><contrib-id contrib-id-type="orcid">https://orcid.org/0009-0008-5143-7882</contrib-id><name><surname>Watson</surname><given-names>Alexander</given-names></name><address><country>France</country></address><xref rid="AFF-1" ref-type="aff"></xref></contrib><contrib contrib-type="author"><contrib-id contrib-id-type="orcid">https://orcid.org/0009-0005-7138-136X</contrib-id><name><surname>Lozano</surname><given-names>Rémy</given-names></name><address><country>France</country></address></contrib><contrib contrib-type="author"><contrib-id contrib-id-type="orcid">https://orcid.org/0009-0005-0507-7204</contrib-id><name><surname>Toussaint</surname><given-names>Yannick</given-names></name><address><country>France</country></address></contrib></contrib-group><contrib-group><contrib contrib-type="editor"><name><surname>Verger</surname><given-names>Christian</given-names></name><address><country>France</country></address><xref ref-type="aff" rid="EDITOR-AFF-1"></xref></contrib></contrib-group><aff id="AFF-1"><institution-wrap><institution>Mines Nancy</institution><institution-id institution-id-type="ror">https://ror.org/02rzzjk74</institution-id></institution-wrap><country country="FR">France</country></aff><aff id="EDITOR-AFF-1"><institution-wrap><institution>RDPLF</institution><institution-id institution-id-type="ror">https://ror.org/01vrww868</institution-id></institution-wrap><country country="fr">France</country></aff><pub-date iso-8601-date="2026-9-14" publication-format="electronic" date-type="pub"><day>14</day><month>9</month><year>2026</year></pub-date><pub-date date-type="collection" iso-8601-date="2026-9-14" publication-format="electronic"><day>14</day><month>9</month><year>2026</year></pub-date><volume>9</volume><issue>3</issue><issue-title>Home Dialysis Bulletin (BDD)</issue-title><fpage>115</fpage><lpage>126</lpage><history><date date-type="received" iso-8601-date="2026-8-7"><day>7</day><month>8</month><year>2026</year></date><date date-type="rev-recd" iso-8601-date="2026-8-18"><day>18</day><month>8</month><year>2026</year></date><date date-type="accepted" iso-8601-date="2026-8-30"><day>30</day><month>8</month><year>2026</year></date></history><permissions><copyright-statement>Copyright (c) 2026 Alexander Watson, Rémy Lozano, Yannick Toussaint</copyright-statement><copyright-year>2026</copyright-year><copyright-holder>Alexander Watson, Rémy Lozano, Yannick Toussaint</copyright-holder><license license-type="open-access" xlink:href="https://creativecommons.org/licenses/by/4.0/"><ali:license_ref xmlns:ali="http://www.niso.org/schemas/ali/1.0/">https://creativecommons.org/licenses/by/4.0/</ali:license_ref><license-p>This work is licensed under a Creative Commons Attribution 4.0 International License.</license-p></license></permissions><self-uri xlink:title="Predicting the Need for Hemodialysis in Peritoneal Dialysis Patients with at Least One Episode of Peritonitis Using Artificial Intelligence" xlink:href="https://bdd.rdplf.org/index.php/bdd/article/view/87120">Predicting the Need for Hemodialysis in Peritoneal Dialysis Patients with at Least One Episode of Peritonitis Using Artificial Intelligence</self-uri><abstract><p>Transfer to hemodialysis is a major cause of permanent discontinuation of peritoneal dialysis (PD) treatment. Peritoneal infection is a common cause of discontinuation of peritoneal dialysis and permanent transfer to hemodialysis (HD). Accurately predicting the approximate date of transfer allows for the preparation of a vascular access under optimal conditions. Accurately predicting the date of transfer is therefore of clinical importance. The goal of this study is to develop an artificial intelligence model that predicts, based on a patient’s history of peritoneal infection, whether the patient should be transferred to hemodialysis.</p><p>Our approach is based on a neural network learning method, specifically a Long Short-Term Memory (LSTM) recurrent neural network (RNN); the training set, representing 80% of the dataset—that is, 9,934 patient sequences—was used to optimize the model’s parameters. The test set (10%, or 1,242 sequences) was kept strictly separate from the other sets and reserved exclusively for the final evaluation of the model’s performance.</p><p>The monitoring of patients’ conditions over time was based on peritoneal infections. Recurrent neural networks are particularly well-suited to this type of prediction based on time-series data. This study highlighted the predictive performance of such a model on this type of data. Introducing a bias into the training process helped limit false-negative predictions.</p><p>Our data, drawn from the French-Language Peritoneal Dialysis Registry (RDPLF) database, included 15,800 patients who had experienced at least one episode of peritonitis, with the aim of predicting the likelihood of transfer to hemodialysis following this complication. With our model, the false-negative rate—the proportion of patients who were transferred to HD within 6 months even though the model did not predict it—was 5.3%.</p></abstract><kwd-group><kwd>artificial intelligence</kwd><kwd>neural network</kwd><kwd>peritonitis</kwd><kwd>peritoneal dialysis</kwd><kwd>transfer to hemodialysis</kwd></kwd-group><custom-meta-group><custom-meta><meta-name>File created by JATS Editor</meta-name><meta-value><ext-link ext-link-type="uri" xlink:href="https://jatseditor.com" xlink:title="JATS Editor">JATS Editor</ext-link></meta-value></custom-meta><custom-meta><meta-name>issue-created-year</meta-name><meta-value>2026</meta-value></custom-meta></custom-meta-group></article-meta></front><body><sec><title>Introduction</title><p>According to the RDPLF, 36% of the causes of permanent discontinuation of peritoneal dialysis treatment are related to a switch to hemodialysis. However, only 8% of patients in France have an arteriovenous fistula (AVF)<xref rid="BIBR-1" ref-type="bibr"><sup>1</sup></xref> . This necessitates the initial use of a central catheter in the majority of cases due to the lack of a pre-existing vascular access<xref ref-type="bibr" rid="BIBR-2"><sup>2</sup></xref> . This method significantly increases the risk of infection and the subsequent risk of vascular access loss<xref ref-type="bibr" rid="BIBR-3"><sup>3</sup></xref> .</p><p>Reliably predicting the date of transition to hemodialysis is of clinical importance: it would allow for the patient’s transfer to hemodialysis to be planned well in advance, providing sufficient time to create a functional arteriovenous fistula. The maturation time for an AVF is usually 3 weeks; however, in practice, the time required for preliminary examinations, the surgeon’s availability, and operating room scheduling necessitate planning well in advance. According to nephrologists, the ability to predict the transition to hemodialysis 3 months in advance would provide the best chance of starting hemodialysis using a functional AVF and would therefore avoid the need for a central catheter.</p><p>A preventive approach consisting of routinely creating an arteriovenous fistula for all patients upon admission to peritoneal dialysis (PD) might seem like a simple solution to this problem. However, this option is not clinically desirable for two reasons. First, an arteriovenous fistula may have a limited lifespan and become nonfunctional after a few years, even without having been used. Second, although they remain rare, infectious or hemodynamic complications are always possible.</p><p>In France, the occurrence of one or more episodes of peritonitis accounts for 14% of transfers to hemodialysis<xref ref-type="bibr" rid="BIBR-1"><sup>1</sup></xref> , often in emergency situations. An initial attempt to predict the transition to hemodialysis using a Random Forest model was unsuccessful, so it became necessary to employ more sophisticated techniques. Deep learning techniques using neural networks have proven effective in predicting complications for patients on PD; in particular, recurrent neural networks (RNNs) are used for time-series forecasting<xref ref-type="bibr" rid="BIBR-4"><sup>4</sup></xref><xref ref-type="bibr" rid="BIBR-5"><sup>5</sup></xref><xref ref-type="bibr" rid="BIBR-6"><sup>6</sup></xref> . Our objective was therefore to train an RNN using data from patients on PD who had experienced at least one episode of peritonitis, and to evaluate its performance in predicting the risk of transfer to hemodialysis following peritonitis.</p></sec><sec><title>Materials and Methods</title><p>The data were extracted from the RDPLF database from centers in metropolitan France after being fully anonymized using a randomly generated hash key. All work was performed in Python using the following libraries: <italic>pandas</italic>, <italic>scikit-learn</italic>, <italic>TensorFlow/Keras</italic>, <italic>Matplotlib</italic>, and <italic>seaborn</italic>.</p><p>We used two tables from the RDPLF dataset: the “<italic>patient</italic>” table contained 40,952 patients, and the “<italic>peritonitis</italic>” table represented a subset of the “<italic>patient</italic>” table and included 15,800 patients with between 1 and 20 episodes of peritonitis.</p><p>After excluding missing data, the following variables, recorded for each time point, were included: the patient’s dialysis center, sex, nephrology group, reason for treatment, previous treatment, previous type of PD, type of PD 90 days prior, transplant list status, peritonitis pathogen class, cause of peritonitis, treatment system and type, the number of support devices the patient uses, the patient’s total number of peritonitis episodes (at each time point), the Charlson score at initiation of PD, height, weight, the number of metabolic conditions, the number of treatment sessions, the age at the start of PD, and the patient’s age at each time point.</p><p>Several variables were then added to the dataset. We therefore constructed the following variables: PD Duration, the length of time a patient has been on PD; Delta Days, indicating the number of days that have elapsed since the last episode of peritonitis; and 6-Month Infection Density, giving the number of episodes of peritonitis for the patient during the last 6 months on peritoneal dialysis.</p><p>We then constructed time series for each patient in the database. Since the patients’ time series were not directly available in the database, they were constructed using the dates of the episodes of peritonitis as temporal markers. At the initial time point, all variables from the patient table were populated and retained at every point in the time series, as these variables are static by nature. Age is the only exception: it was recalculated at each point in the sequence by calculating the difference between the date of the corresponding peritonitis episode and the patient’s date of birth. The variables that change over time are therefore primarily those from the peritonitis table, which means that the model bases its decisions largely on characteristics specific to the patients’ peritonitis episodes. Since the number of peritonitis episodes varies from one patient to another, the sequences have varying lengths. As the maximum observed length was 20 episodes, this value was adopted as the fixed length for all sequences. <italic>Post-padding</italic> was applied to sequences of shorter length. The <italic>post-padding</italic> technique pads sequences shorter than 20 with zero values at the end of the sequence; these values are excluded from the calculation during the training phase using the masking index reserved for this purpose. The added values do not affect the error calculation during training, but they allow sequences of different lengths to be treated the same way by the model.</p><p>The categorical variables in the dataset required specific encoding. Since recurrent neural networks cannot directly process categorical variables, a vector representation of these variables was implemented. This step applies to all categorical variables in the training dataset, such as the <italic>PreTypDP</italic> variable, which encodes the type of peritoneal dialysis initially performed (mixed PD (Association of APD+CAPD), CAPD, daily APD, IDP). An independent categorical encoding (<italic>label encoding</italic>) was first applied to each categorical variable, assigning a unique integer to each of its categories <italic>(</italic><xref ref-type="table" rid="table-u7dshp">Table I</xref><italic>)</italic>, with an offset of 1 in order to reserve the index 0 for <italic>padding</italic>, which is used to align sequences of variable length. The index of each variable value was then converted into a vector representation. The Word2Vec algorithm, in its Skip-gram configuration, was thus trained exclusively on sequences derived from the training data to avoid any information leakage. The Skip-gram model thus learns, for each token (index), to predict the tokens present in a 5-token context window (using 5 neighboring tokens), thereby capturing the co-occurrence relationships between different variable values within patients’ clinical trajectories. Each categorical value is thus represented by a dense vector of dimension 50 <italic>(</italic><xref ref-type="table" rid="table-kochkm">Table II</xref><italic>)</italic>. This dimension was chosen to allow for a sufficiently differentiated representation of the categories present in the data without making them too large during model training. Once initialized, the vector representations of the categorical variable values are fed as a weight matrix into the input layer of the neural network (<italic>embedding</italic>). These weights evolve during model training to adjust the representation of the categories (<italic>fine-tuning</italic>).</p><table-wrap id="table-u7dshp" ignoredToc=""><label>Table I.</label><caption><p>Example of categorical encoding for the PreTypDP variable</p></caption><table frame="box" rules="all"><thead><tr><th scope="col" align="left" colspan="1" valign="top"><bold>Value</bold></th><th scope="col" align="left" colspan="1" valign="top"><bold>Token (Index)</bold></th></tr></thead><tr><td align="left" colspan="1" valign="top"><bold>No data (padding/mask)</bold></td><td valign="top" align="left" colspan="1">0</td></tr><tr><td valign="top" align="left" colspan="1"><bold>Mixed PD (CC &amp; CA)</bold></td><td valign="top" align="left" colspan="1">1</td></tr><tr><td align="left" colspan="1" valign="top"><bold>Daily APD</bold></td><td align="left" colspan="1" valign="top">2</td></tr><tr><td colspan="1" valign="top" align="left"><bold>CAPD</bold></td><td valign="top" align="left" colspan="1">3</td></tr><tr><td valign="top" align="left" colspan="1"><bold>DPI</bold></td><td valign="top" align="left" colspan="1">4</td></tr></table></table-wrap><table-wrap id="table-kochkm" ignoredToc=""><label>Table II.</label><caption><p>Dimensions by value for PreTypDP</p></caption><table frame="box" rules="all"><thead><tr><th scope="col" valign="top" align="left" colspan="1"><bold>Values</bold></th><th scope="col" align="center" colspan="1" valign="top"><bold>Dim 1</bold></th><th scope="col" align="center" colspan="1" valign="top"><bold>Dim 2</bold></th><th scope="col" align="center" colspan="1" valign="top"><bold>Dim 3</bold></th><th scope="col" valign="top" align="center" colspan="1"><bold>Dim 4</bold></th><th scope="col" colspan="1" valign="top" align="center"><bold>…</bold></th><th scope="col" valign="top" align="center" colspan="1"><bold>Dim 50</bold></th></tr></thead><tr><td valign="top" align="left" colspan="1"><bold>Mixed PD (CAPD &amp; APD)</bold></td><td valign="top" align="center" colspan="1">-0.0593</td><td valign="top" align="center" colspan="1">0.0272</td><td align="center" colspan="1" valign="top">0.0170</td><td align="center" colspan="1" valign="top">0.0284</td><td align="center" colspan="1" valign="top">…</td><td align="center" colspan="1" valign="top">0.0082</td></tr><tr><td align="left" colspan="1" valign="top"><bold>Daily APD</bold></td><td valign="top" align="center" colspan="1">-0.0425</td><td align="center" colspan="1" valign="top">0.0217</td><td valign="top" align="center" colspan="1">-0.0088</td><td valign="top" align="center" colspan="1">0.0080</td><td valign="top" align="center" colspan="1">…</td><td valign="top" align="center" colspan="1">0.0034</td></tr><tr><td align="left" colspan="1" valign="top"><bold>CAPD</bold></td><td colspan="1" valign="top" align="center">0.0046</td><td valign="top" align="center" colspan="1">-0.0024</td><td valign="top" align="center" colspan="1">0.0120</td><td colspan="1" valign="top" align="center">0.0182</td><td valign="top" align="center" colspan="1">…</td><td valign="top" align="center" colspan="1">0.0103</td></tr><tr><td valign="top" align="left" colspan="1"><bold>IAPD</bold></td><td valign="top" align="center" colspan="1">0.0156</td><td valign="top" align="center" colspan="1">-0.0190</td><td align="center" colspan="1" valign="top">-0.0004</td><td align="center" colspan="1" valign="top">0.0069</td><td align="center" colspan="1" valign="top">…</td><td align="center" colspan="1" valign="top">-0.0190</td></tr></table><table-wrap-foot><p>CAPD: continuous ambulatory peritoneal dialysis; APD: automated peritoneal dialysis; IPD: intermittent automated peritoneal dialysis; PreTypDP: initial PD type (CAPD, APD or mixed); mixed PD (CC and CA): a combination of CAPD and APD CAPD: continuous ambulatory peritoneal dialysis; APD: automated peritoneal dialysis; IPD: intermittent automated peritoneal dialysis; PreTypDP: initial PD type (CAPD, APD or mixed); mixed PD (CC and CA): a combination of CAPD and APD</p></table-wrap-foot></table-wrap><p>A binary target variable was introduced to supervise the model’s training. At each point in the sequence—that is, for each episode of peritonitis—this variable indicates whether the patient underwent hemodialysis within 6 months of the episode in question. It takes the value 1 if the patient underwent HD within this time window and 0 otherwise. Thus, a positive prediction made during a peritonitis episode allows, in the best-case scenario, for the transition to HD to be anticipated up to 6 months in advance, providing sufficient time to plan for fistula creation.</p><p>For our model architecture, we selected an LSTM-type RNN (<xref rid="BIBR-4" ref-type="bibr"><sup>4</sup></xref><xref ref-type="bibr" rid="BIBR-7"><sup>7</sup></xref> ). This model relies on two distinct input streams <italic>(</italic><xref ref-type="fig" rid="figure-1">Figure 1</xref><italic>)</italic>: previously standardized numerical variables and categorical variables in the form of 50-dimensional vectors. These two streams are concatenated at each time step to form a state vector, which serves as the input to the recurrent layer. The sequence is then processed by the LSTM layer, which produces a hidden state at each time step and thus preserves all intermediate temporal information. To limit overfitting, we applied L2 regularization to this layer—which introduces the sum of the squares of the weights as a penalty term—and <italic>dropout</italic>, which randomly freezes a fixed proportion of the input weights at each time step. The LSTM layer is followed by a dense layer with a hyperbolic tangent activation function <italic>(</italic><xref rid="figure-1" ref-type="fig">Figure 1</xref><italic>)</italic>. <italic>Dropout</italic> and an L2 regularization factor are again applied to this dense layer <italic>(</italic><xref ref-type="fig" rid="figure-1">Figure 1</xref><italic>)</italic>. The output layer is a fully connected layer followed by a sigmoid activation function to obtain an output probability of transitioning to HD at each time step of the input sequence <italic>(</italic><xref ref-type="fig" rid="figure-1">Figure 1</xref><italic>)</italic>. Thus, each prediction incorporates all available information up to the current time step, including the hidden states propagated by the LSTM layer from previous time steps.</p><fig id="figure-1" ignoredToc=""><label>Figure 1</label><caption><p>Figure 1. Model architecture</p></caption><graphic mime-subtype="png" mimetype="image" xlink:href="http://bdd.rdplf.org/index.php/bdd/article/download/87120/78249/185256"><alt-text>Image</alt-text></graphic></fig><p>Before training the model, we partitioned the dataset into three distinct patient sets while maintaining the same proportion of patients transferred to HD in each set. The training set, representing 80% of the dataset used—or 9,934 patient sequences—was used to optimize the model parameters. The validation set (10%, or 1,242 patient sequences) was used to monitor the progress of the training. The test set (10%, or 1,242 patient sequences) was kept strictly separate from the other two sets and reserved exclusively for the final evaluation of the model’s performance. Finally, the partition was constructed to ensure sufficient representation of patients who underwent hemodialysis within each of the three sets.</p><p>The model was then trained using this partition of the dataset. The number of epochs—once the entire training set had been processed—was set to 50. During each epoch, the model’s weights were optimized using the Adam stochastic gradient descent algorithm. The gradient was calculated using a loss function that measured the difference between the model’s predictions on the training set and the true values in that set. We selected weighted binary cross-entropy (WBCE) as the loss function<xref ref-type="bibr" rid="BIBR-8"><sup>8</sup></xref><xref ref-type="bibr" rid="BIBR-9"><sup>9</sup></xref> . It is based on the standard binary cross-entropy (BCE) but addresses the imbalance in the predicted categories, since the transition to HD is associated with only a single point in the sequence for the majority of patients. It also penalizes errors in predicting the transition to HD more heavily.</p><p>BCE =-<italic>p</italic><sub>1</sub> × log(<italic>p</italic><sub>1</sub>) - <italic>p</italic><sub>0</sub> × log(<italic>p</italic><sub>0</sub> )</p><p>WBCE = BCE × [ <italic>y</italic><sub>true</sub> × 3.88 + (1-<italic>y</italic><sub>true</sub>) ]</p><p>Where p<sub>1</sub> represents the probability of transition to HD,<italic>p</italic><sub>0</sub> = 1 - <italic>p</italic><sub>1</sub> et <italic>y</italic><sub>true</sub> , and y<sub>true</sub> represents the actual value of the target variable. The term 3.88 is the ratio of the number of negative examples to the number of positive examples in the training set.</p><p>During training, the evaluation metric was the area under the ROC curve (AUC, Area Under the Curve)<xref ref-type="bibr" rid="BIBR-10"><sup>10</sup></xref> , which reflects the model’s discriminative power—that is, its ability to distinguish between the two classes. We also added an early stopping mechanism that prematurely terminated training after five epochs without any improvement in the AUC. The model’s performance was also evaluated graphically through its calibration.</p><p>The choice of hyperparameters <italic>(</italic><xref ref-type="table" rid="table-eouorq">Table III</xref><italic>)</italic> was made empirically. We trained the model multiple times with different hyperparameter values, averaging the results across five training runs to ensure reliability. The dropout values represent the proportion of weights frozen in the corresponding layer of the model <italic>(</italic><xref ref-type="table" rid="table-eouorq">Table III</xref><italic>, </italic><xref ref-type="fig" rid="figure-1">Figure 1</xref><italic>)</italic>. The regularization factors apply to the LSTM layer and to the dense layer following the LSTM.</p><table-wrap id="table-eouorq" ignoredToc=""><label>Table III.</label><caption><p>Selected hyperparameter values for model training</p></caption><table frame="box" rules="all"><thead><tr><th scope="col" align="left" colspan="1" valign="top"><bold>Hyperparameters</bold></th><th scope="col" colspan="1" valign="top" align="center"><bold>Selected value</bold></th></tr></thead><tr><td align="left" colspan="1" valign="top"><bold>LSTM dropout</bold></td><td align="center" colspan="1" valign="top">0.1</td></tr><tr><td valign="top" align="left" colspan="1"><bold>LSTM L2 regularization factor</bold></td><td valign="top" align="center" colspan="1">0.001</td></tr><tr><td align="left" colspan="1" valign="top"><bold>L2 regularization factor for the dense layer</bold></td><td valign="top" align="center" colspan="1">0.001</td></tr><tr><td valign="top" align="left" colspan="1"><bold>Dropout after the dense layer</bold></td><td align="center" colspan="1" valign="top">0.1</td></tr><tr><td valign="top" align="left" colspan="1"><bold>Adam optimizer learning rate</bold></td><td align="center" colspan="1" valign="top">0.001</td></tr></table></table-wrap></sec><sec><title>Results</title><p>Training was performed over five successive independent iterations. The final predictions on the test set were obtained by calculating the arithmetic mean of the model’s output probabilities.</p><p>For each patient, the model returned a sequence of probabilities of transition to HD following each episode of peritoneal infection. We also evaluated the model’s predictions using different decision thresholds for transition to HD <italic>(</italic><xref ref-type="table" rid="table-xhgeb5">Table IV</xref><italic>)</italic>. Thus, any predicted probability above the threshold was counted as a transition to HD.</p><table-wrap id="table-xhgeb5" ignoredToc=""><label>Table IV. </label><caption><p>Results obtained for the different criteria based on the chosen loss function and thre</p></caption><table frame="box" rules="all"><thead><tr><th scope="col" valign="top" align="left" colspan="1"><bold><italic>Loss</italic></bold><bold> Function</bold></th><th scope="col" align="center" colspan="1" valign="top"><bold>WBCE</bold></th><th scope="col" valign="top" align="center" colspan="1"><bold>WBCE</bold></th><th scope="col" align="center" colspan="1" valign="top"><bold>BCE</bold></th><th scope="col" valign="top" align="center" colspan="1"><bold>BCE</bold></th></tr></thead><tr><td valign="top" align="left" colspan="1"><bold>Decision Threshold</bold></td><td valign="top" align="center" colspan="1"><bold>0.5</bold></td><td valign="top" align="center" colspan="1"><bold>Youden (0.35)</bold></td><td valign="top" align="center" colspan="1"><bold>0.5</bold></td><td valign="top" align="center" colspan="1"><bold>Youden (0.35)</bold></td></tr><tr><td valign="top" align="left" colspan="1"><bold>Criteria</bold></td><td colspan="1" valign="top" align="center"></td><td colspan="1" valign="top" align="center"></td><td valign="top" align="center" colspan="1"></td><td valign="top" align="center" colspan="1"></td></tr><tr><td valign="top" align="left" colspan="1"><bold>AUC</bold></td><td align="center" colspan="1" valign="top">0.946</td><td valign="top" align="center" colspan="1">0.946</td><td align="center" colspan="1" valign="top">0.949</td><td align="center" colspan="1" valign="top">0.949</td></tr><tr><td valign="top" align="left" colspan="1"><bold>Sensitivity</bold></td><td valign="top" align="center" colspan="1">0.881</td><td align="center" colspan="1" valign="top">0.947</td><td align="center" colspan="1" valign="top">0.637</td><td valign="top" align="center" colspan="1">0.910</td></tr><tr><td align="left" colspan="1" valign="top"><bold>Specificity</bold></td><td valign="top" align="center" colspan="1">0.842</td><td valign="top" align="center" colspan="1">0.802</td><td valign="top" align="center" colspan="1">0.956</td><td valign="top" align="center" colspan="1">0.856</td></tr></table><table-wrap-foot><p>WBCE: Weighted Binary Cross-Entropy; BCE: Binary cross-entropy; AUC: Area Under the Curve, area under the ROC curve; Youden: optimal decision threshold as defined by Youden</p></table-wrap-foot></table-wrap><p>The Youden index is a metric derived from the ROC curve <italic>(</italic><italic><xref ref-type="fig" rid="figure-2">Figure 2</xref></italic><italic> and </italic><italic><xref ref-type="fig" rid="figure-3">Figure 3</xref></italic><italic>)</italic> used to determine the optimal decision threshold for a binary classification model <xref ref-type="bibr" rid="BIBR-11"><sup>11</sup></xref> . It is defined as the sum of sensitivity and specificity, minus 1: <bold><italic>J</italic></bold><bold>=</bold><bold><italic>sensitivity</italic></bold><bold>+</bold><bold><italic>specificity</italic></bold><bold>- 1</bold>, which is equivalent to maximizing the difference between the true positive rate and the false positive rate. It ranges from 0 to 1: a value of 0 indicates performance equivalent to a random classifier, while a value of 1 corresponds to perfect classification. The optimal threshold is the one that maximizes this index on the ROC curve, thus offering the best trade-off between sensitivity and specificity.</p><p>The ROC (<italic>Receiver Operating Characteristic</italic>) curve <italic>(</italic><italic><xref ref-type="fig" rid="figure-2">Figure 2</xref></italic><italic> and </italic><italic><xref ref-type="fig" rid="figure-3">Figure 3</xref></italic><italic>)</italic> is constructed by plotting, for each possible decision threshold, the true positive rate (sensitivity) on the y-axis against the false positive rate (1 - <italic>specificity</italic>) on the x-axis. The thresholds tested correspond to the set of probabilities of requiring hemodialysis returned by the model. A diagonal line with the equation <bold><italic>y</italic></bold><bold> = </bold><bold><italic>x</italic></bold>, passing through the origin, is drawn to represent the performance of a random classifier, for which the true positive rate is equal to the false positive rate regardless of the threshold considered. An ROC curve lying below this diagonal would indicate performance worse than random, as the model would then produce more false positives than true positives for the thresholds in question. The goal is therefore to obtain a ROC curve as far as possible from this diagonal, toward the upper-left corner of the graph.</p><fig id="figure-2" ignoredToc=""><label>Figure 2</label><caption><p>ROC curve for the model using ECBP</p></caption><p>The point on the curve above indicates the true positive and false positive rates</p><p>for the optimal Youden threshold.</p><graphic mime-subtype="png" mimetype="image" xlink:href="http://bdd.rdplf.org/index.php/bdd/article/download/87120/78249/185257"><alt-text>Image</alt-text></graphic></fig><fig ignoredToc="" id="figure-3"><label>Figure 3</label><caption><p>ROC curve for the model with ECB</p></caption><graphic mime-subtype="png" mimetype="image" xlink:href="http://bdd.rdplf.org/index.php/bdd/article/download/87120/78249/185258"><alt-text>Image</alt-text></graphic></fig><p>The calibration curve <italic>(</italic><italic><xref ref-type="fig" rid="figure-4">Figure 4</xref></italic><italic> and </italic><italic><xref ref-type="fig" rid="figure-5">Figure 5</xref></italic><italic>)</italic> is a graphical representation that allows us to compare the probabilities predicted by the model with the actual observed frequencies of hemodialysis in the test set. The predictions are divided into five quantiles, and for each quantile, the average predicted probability is plotted against the corresponding observed frequency. The diagonal line <bold><italic>y</italic></bold><bold> = </bold><bold><italic>x</italic></bold> represents perfect calibration, where the predicted probabilities coincide exactly with the observed frequencies. A deviation toward the lower right of the graph indicates that the model overestimates the risk of starting hemodialysis, while a deviation toward the upper left indicates an underestimation of this risk.</p><fig id="figure-4" ignoredToc=""><label>Figure 4</label><caption><p>Calibration curve for the model with ECB</p></caption><graphic mime-subtype="png" mimetype="image" xlink:href="http://bdd.rdplf.org/index.php/bdd/article/download/87120/78249/185259"><alt-text>Image</alt-text></graphic></fig><fig id="figure-5" ignoredToc=""><label>Figure 5</label><caption><p>Calibration curve for the model using ECBP</p></caption><graphic xlink:href="http://bdd.rdplf.org/index.php/bdd/article/download/87120/78249/185260" mime-subtype="png" mimetype="image"><alt-text>Image</alt-text></graphic></fig></sec><sec><title>Discussion</title><p>The onset of peritonitis during peritoneal dialysis carries a significant risk of transfer to hemodialysis, but this risk depends on both patient characteristics and the nature of the infection. This study demonstrated that, after training a neural network, it is possible to predict the need for transfer to hemodialysis following a peritoneal infection with sufficient reliability to make its clinical application feasible and to aid in medical decision-making.</p><p>One of the priorities during model training was to limit any risk of overfitting, which would impair the model’s ability to generalize its predictions. We therefore used <italic>dropout and early stopping</italic> techniques to improve generalization and L2 regularization to limit the model’s sensitivity to noise <italic>(</italic><xref ref-type="table" rid="table-eouorq">Table III</xref><italic>)</italic>.</p><p>The choice of the WBCE loss function is justified by the desire to reduce the number of false negatives at the expense of a higher number of false positives. According to <italic>Table IV</italic>, sensitivity increases when WBCE is used instead of BCE, regardless of the threshold chosen. In contrast to sensitivity, specificity decreases when WBCE is used <italic>(</italic><xref ref-type="table" rid="table-xhgeb5">Table IV</xref><italic>)</italic>.</p><p>During training, the selected decision threshold was the Youden optimal threshold when it was less than 0.5 and 0.5 otherwise. Using a threshold below 0.5 amounts to considering that a moderate predicted probability is sufficient to trigger a prediction of transition to HD, thereby making the model more sensitive to small variations in probability. This choice is consistent with the previously stated objective of minimizing false negatives: by lowering the decision threshold, the model prioritizes the detection of positive cases, again at the expense of a higher false-positive rate (a false-positive rate of 15.8% with a threshold of 0.5 versus 19.8% with the Youden threshold, for WBCE; <xref ref-type="table" rid="table-xhgeb5">Table IV</xref>).</p><p>The performance of a binary classification model can be evaluated along two complementary dimensions: discrimination and calibration<xref ref-type="bibr" rid="BIBR-12"><sup>12</sup></xref><xref rid="BIBR-13" ref-type="bibr"><sup>13</sup></xref> .</p><p>The AUC is a model selection criterion<xref ref-type="bibr" rid="BIBR-7"><sup>7</sup></xref><xref ref-type="bibr" rid="BIBR-14"><sup>14</sup></xref> . The higher the AUC, the further the ROC curve <italic>(Figure 2 and Figure 3)</italic> deviates from the diagonal line of chance, indicating better discriminative performance of the model. Formally, the AUC can be interpreted as the probability that the predicted score for a positive example is higher than that predicted for a negative example<xref ref-type="bibr" rid="BIBR-15"><sup>15</sup></xref> . Discrimination measures the model’s ability to effectively distinguish between the two classes. In our case, the AUC reaches 0.946 and 0.949 (depending on the configuration; <italic>Table IV</italic>), values close to 1, indicating excellent discriminatory power.</p><p>Calibration, on the other hand, assesses the alignment between the probabilities predicted by the model and the frequencies observed in the actual data<xref ref-type="bibr" rid="BIBR-16"><sup>16</sup></xref> . The curve associated with the BCE configuration <italic>(</italic><italic><xref ref-type="fig" rid="figure-4">Figure 4</xref></italic><italic>)</italic> shifts toward the upper left, indicating that the model underestimates the risk of transition to HD, which results in a high false-negative rate. Conversely, the curve associated with the WBCE configuration <italic>(</italic><italic><xref ref-type="fig" rid="figure-5">Figure 5</xref></italic><italic>)</italic> shifts toward the lower right, reflecting an overestimation of risk, which manifests as a higher false-positive rate. This deviation indicates that the model overestimates the probabilities of transition to HD compared to actual observations. In other words, the model tends to be overly confident in its positive predictions<xref rid="BIBR-17" ref-type="bibr"><sup>17</sup></xref> , or to favor false-positive errors (patients incorrectly classified as requiring HD) over false-negative errors (patients requiring hemodialysis but not identified). However, this bias helps minimize the false-negative rate (11.9% with WBCE versus 36.3%, when the decision threshold is set at 0.5; <italic>Table IV</italic>), a priority in our clinical context, where failing to identify patients requiring hemodialysis is more critical than erroneously including patients who do not require it.</p><p>Limitations of this model become apparent through the partitioning of the data. In particular, patients are randomly assigned—regardless of their center of origin—across the three datasets used. This means that the model can learn the specific practices of each center regarding PD treatment and the transition of patients to HD. This was a deliberate choice, as the predictions also adapt to the standard practices of the various centers.</p></sec><sec><title>Conclusion</title><p>Artificial intelligence and machine learning techniques have proven effective in predicting the transition to hemodialysis (HD) for patients on peritoneal dialysis following one or more episodes of peritonitis. The model’s training strategy aimed to minimize the false-negative rate. Nevertheless, a balance had to be struck between a confident prediction by the model and an accurate representation of reality through that prediction.</p><p>This approach paves the way for the development of an application—to be tested through external validation—to determine whether it can reduce the rate of unscheduled transfers and the risk of having use a central catheter.</p><p>Authors’ Contributions</p><p>All authors contributed to the study design.</p><p>AW: writing, model development, analysis of results. RL: writing, model development, analysis of results. YT: advice on model development, analysis of results, and writing.</p><p>Ethical Considerations and Patient Consent</p><p>This study was conducted in accordance with the ethical principles of the Declaration of Helsinki. Informed consent was not required for this study because it involved retrospective data from a registry for which patients had previously provided authorization for inclusion; patient and institutional data were fully anonymized and analyzed retrospectively. Patient and center identifiers were anonymized in advance using a randomly generated hash key.</p><p>Funding</p><p>No specific funding was received for this work.</p><p>Acknowledgments</p><p>The authors thank Dr. Christian Verger (RDPLF) and Dr. Jacques Chanliau (RDPLF) for their assistance throughout this study, and Dr. Emmanuel Fabre for the anonymized export of data from the RDPLF database.</p><p>Conflicts of Interest</p><p>The authors declare that they have no conflicts of interest related to this work.</p><p>Data availability</p><p>The datasets generated and analyzed in this study are available from the authors and the RDPLF upon reasonable request.</p><p>Statement on Artificial Intelligence</p><p>The authors declare that this manuscript is the result of their own original work. No artificial intelligence tools or applications were used other than those designed by the authors themselves—which were the subject of this study—for data analysis and the generation of results.</p><sec><title>ORCID iDs</title><p>Alexander Watson: <ext-link xlink:title="0009 0008 5143 7882" ext-link-type="uri" xlink:href="https://orcid.org/0009-0008-5143-7882">0009 0008 5143 7882</ext-link></p><p>Rémy Lozano: <ext-link ext-link-type="uri" xlink:href="https://orcid.org/0009-0005-7138-136X" xlink:title="0009 0005 7138 136X">0009 0005 7138 136X</ext-link></p><p>Yannick Toussaint: <ext-link ext-link-type="uri" xlink:href="https://orcid.org/0009-0005-0507-7204" xlink:title="0009 0005 0507 7204">0009 0005 0507 7204</ext-link></p></sec></sec></body><back><ref-list><title>References</title><ref id="BIBR-1"><element-citation publication-type="journal"><article-title>Synthetic 2018 data report of the French Language Peritoneal Dialysis and Home Hemodialysis Registry (RDPLF</article-title><source>Bull Dial Domic Internet</source><volume>10</volume><issue>doi</issue><person-group person-group-type="author"><name><surname>Verger</surname><given-names>C.</given-names></name><name><surname>Fabre</surname><given-names>E.</given-names></name><name><surname>Veniez</surname><given-names>G.</given-names></name><name><surname>Padernoz</surname><given-names>M.C.</given-names></name></person-group><year>2019</year><pub-id pub-id-type="doi">10.25796/bdd.v2i1.19093</pub-id></element-citation></ref><ref id="BIBR-2"><element-citation publication-type="journal"><article-title>Back-up arteriovenous fistula in peritoneal dialysis patients: a retrospective cohort study of long-term meaningful outcomes</article-title><source>Intern Med J</source><person-group person-group-type="author"><name><surname>HI</surname><given-names>Cheikh Hassan</given-names></name><name><surname>KM</surname><given-names>Murali</given-names></name><name><surname>JHC</surname><given-names>Chen</given-names></name><name><surname>J</surname><given-names>Mullan</given-names></name></person-group><year>2026</year><month>05</month><day>23</day><comment>doi:</comment><pub-id pub-id-type="doi">10.1111/imj.70493</pub-id></element-citation></ref><ref id="BIBR-3"><element-citation publication-type="journal"><article-title>Value-Based Model for Vascular Access Management in the End-Stage Kidney Disease Population</article-title><source>Semin Dial</source><volume>Jan;39(1–2):15–25</volume><person-group person-group-type="author"><name><surname>Raskin</surname><given-names>D.</given-names></name><name><surname>Vachharajani</surname><given-names>T.J.</given-names></name><name><surname>Partovi</surname><given-names>S.</given-names></name><name><surname>Khan</surname><given-names>A.</given-names></name><name><surname>Lyden</surname><given-names>S.P.</given-names></name><name><surname>Kirksey</surname><given-names>L.</given-names></name></person-group><year>2026</year><pub-id pub-id-type="doi">10.1111/sdi.70024</pub-id></element-citation></ref><ref id="BIBR-4"><element-citation publication-type="journal"><article-title>Predicting Peritoneal Dialysis Failure Within the Next Three Months Based on Deep Learning and Important Features Analysis</article-title><source>Information</source><volume>5;15(12):776</volume><person-group person-group-type="author"><name><surname>Hsu</surname><given-names>F.Y.</given-names></name><name><surname>Hwang</surname><given-names>R.H.</given-names></name><name><surname>Tsai</surname><given-names>M.H.</given-names></name><name><surname>Wang</surname><given-names>J.T.</given-names></name></person-group><year>2024</year><pub-id pub-id-type="doi">10.3390/info15120776</pub-id></element-citation></ref><ref id="BIBR-5"><element-citation publication-type="journal"><article-title>Predicting technique survival in peritoneal dialysis patients: comparing artificial neural networks and logistic regression</article-title><source>Nephrol Dial Transplant</source><volume>3;23(9):2972–81</volume><person-group person-group-type="author"><name><surname>Tangri</surname><given-names>N.</given-names></name><name><surname>Ansell</surname><given-names>D.</given-names></name><name><surname>Naimark</surname><given-names>D.</given-names></name></person-group><year>2008</year><pub-id pub-id-type="doi">10.1093/ndt/gfn187</pub-id></element-citation></ref><ref id="BIBR-6"><element-citation publication-type="journal"><article-title>Artificial intelligence in peritoneal dialysis: general overview</article-title><source>Ren Fail</source><volume>31;44(1):682–7</volume><person-group person-group-type="author"><name><surname>Bai</surname><given-names>Q.</given-names></name><name><surname>Tang</surname><given-names>W.</given-names></name></person-group><year>2022</year><pub-id pub-id-type="doi">10.1080/0886022X.2022.2064304</pub-id></element-citation></ref><ref id="BIBR-7"><element-citation publication-type="journal"><article-title>Assessment of a Deep Learning Model to Predict Hepatocellular Carcinoma in Patients With Hepatitis C Cirrhosis</article-title><source>JAMA Netw Open</source><volume>1;3(9):e2015626</volume><person-group person-group-type="author"><name><surname>Ioannou</surname><given-names>G.N.</given-names></name><name><surname>Tang</surname><given-names>W.</given-names></name><name><surname>Beste</surname><given-names>L.A.</given-names></name><name><surname>Tincopa</surname><given-names>M.A.</given-names></name><name><surname>Su</surname><given-names>G.L.</given-names></name><name><surname>Van</surname><given-names>T.</given-names></name><etal/></person-group><year>2020</year><pub-id pub-id-type="doi">10.1001/jamanetworkopen.2020.15626</pub-id></element-citation></ref><ref id="BIBR-8"><element-citation publication-type="journal"><article-title>Loss Weightings for Improving Imbalanced Brain Structure Segmentation Using Fully Convolutional Networks</article-title><source>Healthcare</source><person-group person-group-type="author"><name><surname>Sugino</surname><given-names>T.</given-names></name><name><surname>Kawase</surname><given-names>T.</given-names></name><name><surname>Onogi</surname><given-names>S.</given-names></name><name><surname>Kin</surname><given-names>T.</given-names></name><name><surname>Saito</surname><given-names>N.</given-names></name><name><surname>Nakajima</surname><given-names>Y.</given-names></name></person-group><year>2021</year><month>07</month><day>26</day><pub-id pub-id-type="doi">10.3390/healthcare9080938</pub-id></element-citation></ref><ref id="BIBR-9"><element-citation publication-type="journal"><article-title>Unified Focal loss: Generalising Dice and cross entropy-based losses to handle class imbalanced medical image segmentation</article-title><source>Comput Med Imaging Graph</source><person-group person-group-type="author"><name><surname>Yeung</surname><given-names>M.</given-names></name><name><surname>Sala</surname><given-names>E.</given-names></name><name><surname>Schönlieb</surname><given-names>C.B.</given-names></name><name><surname>Rundo</surname><given-names>L.</given-names></name></person-group><year>2022</year><comment>doi:</comment><pub-id pub-id-type="doi">10.1016/j.compmedimag.2021.102026</pub-id></element-citation></ref><ref id="BIBR-10"><element-citation publication-type="journal"><article-title>Weighing features of lung and heart regions for thoracic disease classification</article-title><source>BMC Med Imaging</source><volume>Dec;21(1):99</volume><person-group person-group-type="author"><name><surname>Fang</surname><given-names>J.</given-names></name><name><surname>Xu</surname><given-names>Y.</given-names></name><name><surname>Zhao</surname><given-names>Y.</given-names></name><name><surname>Yan</surname><given-names>Y.</given-names></name><name><surname>Liu</surname><given-names>J.</given-names></name><name><surname>Liu</surname><given-names>J.</given-names></name></person-group><year>2021</year><pub-id pub-id-type="doi">10.1186/s12880-021-00627-y</pub-id></element-citation></ref><ref id="BIBR-11"><element-citation publication-type="journal"><article-title>Youden Index and Optimal Cut-Point Estimated from Observations Affected by a Lower Limit of Detection</article-title><source>Biom J</source><person-group person-group-type="author"><name><surname>Ruopp</surname><given-names>M.D.</given-names></name><name><surname>Perkins</surname><given-names>N.J.</given-names></name><name><surname>Whitcomb</surname><given-names>B.W.</given-names></name><name><surname>Schisterman</surname><given-names>E.F.</given-names></name></person-group><year>2008</year><month>06</month><day>03</day><comment>doi:</comment><pub-id pub-id-type="doi">10.1002/bimj.200710415</pub-id></element-citation></ref><ref id="BIBR-12"><element-citation publication-type="journal"><article-title>Assessing the Performance of Prediction Models: A Framework for Traditional and Novel Measures</article-title><source>Epidemiology</source><volume>Jan;21(1):128–38</volume><person-group person-group-type="author"><name><surname>Steyerberg</surname><given-names>E.W.</given-names></name><name><surname>Vickers</surname><given-names>A.J.</given-names></name><name><surname>Cook</surname><given-names>N.R.</given-names></name><name><surname>Gerds</surname><given-names>T.</given-names></name><name><surname>Gonen</surname><given-names>M.</given-names></name><name><surname>Obuchowski</surname><given-names>N.</given-names></name><etal/></person-group><year>2010</year><pub-id pub-id-type="doi">10.1097/EDE.0b013e3181c30fb2</pub-id></element-citation></ref><ref id="BIBR-13"><element-citation publication-type="journal"><article-title>Graphical assessment of internal and external calibration of logistic regression models by using loess smoothers</article-title><source>Stat Med</source><volume>10;33(3):517–35</volume><person-group person-group-type="author"><name><surname>Austin</surname><given-names>P.C.</given-names></name><name><surname>Steyerberg</surname><given-names>E.W.</given-names></name></person-group><year>2014</year><pub-id pub-id-type="doi">10.1002/sim.5941</pub-id></element-citation></ref><ref id="BIBR-14"><element-citation publication-type="journal"><article-title>Performance metric curve analysis framework to assess impact of the decision variable threshold, disease prevalence, and dataset variability in two-class classification</article-title><source>J Med Imaging</source><person-group person-group-type="author"><name><surname>Whitney</surname><given-names>H.M.</given-names></name><name><surname>Drukker</surname><given-names>K.</given-names></name><name><surname>Giger</surname><given-names>M.L.</given-names></name></person-group><year>2022</year><month>05</month><day>31</day><comment>doi:</comment><pub-id pub-id-type="doi">10.1117/1.JMI.9.3.035502</pub-id></element-citation></ref><ref id="BIBR-15"><element-citation publication-type="book"><article-title>Area under the ROC Curve has the most consistent evaluation for binary classification</article-title><source>PLOS ONE</source><person-group person-group-type="author"><name><surname>Li</surname><given-names>J.</given-names></name></person-group><person-group person-group-type="editor"><name><surname>Qin</surname><given-names>H.</given-names></name></person-group><year>2024</year><month>12</month><day>23</day><pub-id pub-id-type="doi">10.1371/journal.pone.0316019</pub-id></element-citation></ref><ref id="BIBR-16"><element-citation publication-type="journal"><article-title>Achieving well-informed decision-making in drug discovery: a comprehensive calibration study using neural network-based structure-activity models</article-title><source>J Cheminformatics</source><volume>5;17(1):29</volume><person-group person-group-type="author"><name><surname>Friesacher</surname><given-names>H.R.</given-names></name><name><surname>Engkvist</surname><given-names>O.</given-names></name><name><surname>Mervin</surname><given-names>L.</given-names></name><name><surname>Moreau</surname><given-names>Y.</given-names></name><name><surname>Arany</surname><given-names>A.</given-names></name></person-group><year>2025</year><pub-id pub-id-type="doi">10.1186/s13321-025-00964-y</pub-id></element-citation></ref><ref id="BIBR-17"><element-citation publication-type="journal"><article-title>Layer Embedding Analysis in Convolutional Neural Networks for Improved Probability Calibration and Classification</article-title><source>IEEE Trans Med Imaging</source><issue>v;39(11):3331–42</issue><person-group person-group-type="author"><name><surname>Zhang</surname><given-names>F.</given-names></name><name><surname>Dvornek</surname><given-names>N.</given-names></name><name><surname>Yang</surname><given-names>J.</given-names></name><name><surname>Chapiro</surname><given-names>J.</given-names></name><name><surname>Duncan</surname><given-names>J.</given-names></name></person-group><year>2020</year><pub-id pub-id-type="doi">10.1109/TMI.2020.2990625</pub-id></element-citation></ref></ref-list></back></article>