 recurrence of c. difficile was defined as confirmed presence of c. difficile toxin via polymerase chain reaction ( pcr ) after complete resolution of diarrhea for a minimum of 2 weeks and a maximum of 6 months and the completion of antibiotic therapy ( 5 , 7 ) .
rf is a statistical model used for classification and regression which works by using input variables to create an output of regression trees .
the mode class of all of the classes of the individual trees is then chosen as the output and is used to determine the variables of interest .
regression trees are binary trees with nodes that correspond to different values in the input variables .
the rf algorithm searches for a value that best separates all instances within that node based on the outcome of interest .
if the instance chosen is not able to be separated further , then it is called a terminal node .
the variables used in this study were selected after an extensive review of literature and only the most common comorbidities found in patients with cdi and re - infection were included . among the numerous existing variables , 25 of the most strongly associated variables have been selected .
variables which were not found to be significant have not been included in order to optimize the rf algorithm .
explanatory variables used in this study a retrospective chart review was performed on patients diagnosed with cdi based on international classification of disease ( icd-9 ) codes .
the selection of the study population , selection criteria , and sampling were all performed subject to the approval of the institutional review board ( irb ) .
patients diagnosed with cdi via pcr between february 2009 and june 2013 . 
 patients with recurrence within 2 weeks or after 6 months of initial cdipatients with documented  non - compliance to prescribed medical therapy 
  patients with recurrence within 2 weeks or after 6 months of initial cdi patients with documented  non - compliance to prescribed medical therapy using these criteria , data of 200 randomized patients diagnosed with cdi were collected .
the prevalence of cdr within the randomly selected sample size was 15% ( 30 patients ) .
rf statistical analysis and randomization was performed using the spm salford predictive modeler version 6.0 ( salford system , san diego , ca ) . the predictive model was designed by professors leo breiman and adele cutler of the university of california , los angeles .
our sample population was randomly separated into two distinct groups , a training group and a validation group .
the training group was used essentially to create our  learning algorithm , which comprised 2,000 regression trees .
each tree comprised binary nodes or branches , which contribute their results to the variables of interest .
at each node , a variable is tested ( e.g. , 80 mg ppi ) . at that node
, the data entered will either fall into a branch of cdr or no recurrence . through the 2,000 regression trees
the cumulative predictions created in the 2,000 trees will create the probability of the patient having a recurrence of an initial cdi .
the training and testing groups , although broken into two groups , still allow for all patients in the sample selection to be run through the predictive model .
as opposed to amalakuhan 's study , which used a 75% training group to 25% validation group distribution split ( 8 , 9 ) , we used an experimental 70%:30% distributional split .
this allowed an additional 10 patients to our validation group , presumptively strengthening the end result and the predictive probability of our model . within both the training and validation groups , the predicted probability of determining the patients who had cdr was almost completely equal .
the rf model using the indices as set above was run 500 times , and for each of these 500 runs , the accuracy of the predictive model was assessed by calculating the sensitivity , specificity , area under the curve ( auc ) for receiver operating characteristic , and precision ( fig .
 recurrence of c. difficile was defined as confirmed presence of c. difficile toxin via polymerase chain reaction ( pcr ) after complete resolution of diarrhea for a minimum of 2 weeks and a maximum of 6 months and the completion of antibiotic therapy ( 5 , 7 ) .
rf is a statistical model used for classification and regression which works by using input variables to create an output of regression trees .
the mode class of all of the classes of the individual trees is then chosen as the output and is used to determine the variables of interest .
regression trees are binary trees with nodes that correspond to different values in the input variables .
the rf algorithm searches for a value that best separates all instances within that node based on the outcome of interest .
if the instance chosen is not able to be separated further , then it is called a terminal node .
the variables used in this study were selected after an extensive review of literature and only the most common comorbidities found in patients with cdi and re - infection were included . among the numerous existing variables , 25 of the most strongly associated variables have been selected .
variables which were not found to be significant have not been included in order to optimize the rf algorithm .
a retrospective chart review was performed on patients diagnosed with cdi based on international classification of disease ( icd-9 ) codes .
the selection of the study population , selection criteria , and sampling were all performed subject to the approval of the institutional review board ( irb ) .

 patients with recurrence within 2 weeks or after 6 months of initial cdipatients with documented  non - compliance to prescribed medical therapy 
  patients with recurrence within 2 weeks or after 6 months of initial cdi patients with documented  non - compliance to prescribed medical therapy
the prevalence of cdr within the randomly selected sample size was 15% ( 30 patients ) .
rf statistical analysis and randomization was performed using the spm salford predictive modeler version 6.0 ( salford system , san diego , ca ) . the predictive model was designed by professors leo breiman and adele cutler of the university of california , los angeles .
our sample population was randomly separated into two distinct groups , a training group and a validation group .
the training group was used essentially to create our  learning algorithm , which comprised 2,000 regression trees . each tree comprised binary nodes or branches , which contribute their results to the variables of interest . at each node ,
a variable is tested ( e.g. , 80 mg ppi ) . at that node ,
the data entered will either fall into a branch of cdr or no recurrence . through the 2,000 regression trees
the cumulative predictions created in the 2,000 trees will create the probability of the patient having a recurrence of an initial cdi .
the training and testing groups , although broken into two groups , still allow for all patients in the sample selection to be run through the predictive model .
as opposed to amalakuhan 's study , which used a 75% training group to 25% validation group distribution split ( 8 , 9 ) , we used an experimental 70%:30% distributional split .
this allowed an additional 10 patients to our validation group , presumptively strengthening the end result and the predictive probability of our model . within both the training and validation groups , the predicted probability of determining the patients who had cdr was almost completely equal .
the rf model using the indices as set above was run 500 times , and for each of these 500 runs , the accuracy of the predictive model was assessed by calculating the sensitivity , specificity , area under the curve ( auc ) for receiver operating characteristic , and precision ( fig .
our population consisted of 198 patients from two sister hospitals in a community setting with a documented cdi . of those patients , 30 had cdr , giving us a recurrence rate of approximately 15% .
the mean age of the patients in the recurrence group was 70.8 ( sd 17 ) , while the mean age of the population without recurrence was 68.7 ( sd 17.7 ) .
the majority of the population was caucasian ( 88.4% ) with the remainder of the population being either african american ( 6.6% ) or other races ( 5.0% ) ( table 2 ) . demographic and risk factor table our final model based on 500 runs of the rf produced the following results : sensitivity , 83.3% ; specificity , 63.1% ; overall correct predicted percentage , 66.1% ; and auc , 82.6%
cdi is a growing concern in the health care system , and it represents one of the most difficult challenges faced by clinicians . throughout the 1990s and 2000s ,
the number of c. difficile - related hospital stays per 100,000 population has been steadily increasing , peaking at 114.6 in 2008 from a low of 33.2 in 1993 ( 10 ) . the major problem associated with c. difficile infection is the high rate of recurrence of 20 to 35% . if a recurrence has occurred , the chances of a second recurrence further increases to 4565% ( 11 , 12 )
. cdr increases mortality and morbidity , length of hospital stay , health care costs , and utilization of other health care resources .
it also puts additional burden on the patient 's quality of life and their families .
previous studies have also documented that cdr resulted in 265 additional days of vancomycin use and 19.7 days of metronidazole use ( 13 ) .
although some studies have looked at the causes , there is little consensus on causes of cdr .
previous studies have identified the following associated risk factors : age , horn 's index , proton pump inhibitor use , antibiotic use , alteration of colonic microflora , initial disease severity , and hospital exposure ( 1418 ) . for this study
, we created an rf predictive model using multiple well - known risk factors associated with cdi identified in previous studies .
after 500 runs of the tree - based algorithm , the rf model performed extremely well in classifying predictors of cdr versus non - recurrent cases .
the overall accuracy of our rf model was 66.1% with a sensitivity and specificity of 83.3 and 63.1% , respectively .
the area under the receiver operating curve was 82.6% , which is comparable to other strong models .
our study expanded on their work by using a larger amount of patients that were followed for a longer period of time of 3 years .
in addition , specific important co - variables such as ppi 's chemotherapy , corticosteroids , and antibiotic use were used in our study ( 19 ) .
the rf has already been used successfully in other studies in determining predictors in various chronic and acute conditions .
( 6 ) previously demonstrated that the rf was excellent at predicting factors associated with readmissions for copd exacerbation .
a well - documented study by adrienne chu demonstrated that the rf machine learning algorithm outperformed six other prediction models in determining the cause of gastrointestinal bleeding ( 20 ) .
the models that were outperformed included well - known algorithms such as the support vector machine , boosting , artificial neural network , linear discriminant analysis , and logistic regression .
one of the major strengths of our study was that it contained a large number of patients who were followed for several years ( 20092013 ) .
we also used a large number of significant variables in this study to create the prediction model .
one of the major limitations of our study was that the majority of our sample population was caucasian .
the recurrent nature of infection is worrisome since repeated use of antibiotics against the same strain of bacteria may lead to resistance mechanisms . in this study
, we used the rf machine learning algorithm to create a strong prediction model with high sensitivity to predict cdr . in the evolving field of medical informatics ,
the use of such learning algorithm models can be used in risk factor stratification for hospitalized patients .
if patients at risk for cdr could be accurately identified , specific management strategies could be developed resulting in better management , decreased morbidity and mortality , better health care resource utilization , and decreased length of hospital stay .
we believe that the advantages offered by the rf makes it the ideal tool for this task .
 background 
 clostridium difficile infection ( cdi ) is a growing problem in the community and hospital setting . 
 its incidence has been on the rise over the past two decades , and it is quickly becoming a major concern for the health care system . 
 high rate of recurrence is one of the major hurdles in the successful treatment of c. difficile infection . 
 there have been few studies that have looked at patterns of recurrence . 
 the studies currently available have shown a number of risk factors associated with c. difficile recurrence ( cdr ) ; however , there is little consensus on the impact of most of the identified risk factors.methodsour study was a retrospective chart review of 198 patients diagnosed with cdi via polymerase chain reaction ( pcr ) from january 2009 to jun 2013 . in our study , we decided to use a machine learning algorithm called the random forest ( rf ) to analyze all of the factors proposed to be associated with cdr . 
 this model is capable of making predictions based on a large number of variables , and has outperformed numerous other models and statistical methods.resultswe came up with a model that was able to accurately predict the cdr with a sensitivity of 83.3% , specificity of 63.1% , and area under curve of 82.6% . like other similar studies that have used the rf model 
 , we also had very impressive results.conclusionswe hope that in the future , machine learning algorithms , such as the rf , will see a wider application . 
Methodology
Definitions
Variables
Sample selection
Inclusion criteria
Exclusion criteria
Sample size
Data analysis
Results
Discussion
Conclusion
Conflicts of interest and funding