5.
| Algorithm 1 Leave-one-out cross test with XGBoost |
| 1: for i in test_patients_indexes do |
| 2: LeaveOneOutPatient= (X, y)[i] |
| 3: other-patients: (X, y)\LeaveOneOutPatient |
| 4: XGBoost.fit (other_patients, validation_split=0.2) |
| 5: for record in LeaveOneOutPatient do |
| 6: pred=XGBoost.predict (X[record]) |
| 7: pred=smooth(pred) |
| 8: Confusion_matrix (y[record], pred) |
| 9: end for |
| 10: end for |