Algorithm 5: Algorithm for the k-fold cross validation |
Input: , class labels |
Step1: Initialize |
Step2: Split into k-folds |
Step3: In iteration, the fold is used for testing and the rest are used for training |
Step4: |
Step5: Repeat steps 3–4 while |
Step6: Evaluate model on test score |