I am doing K-fold cross validation and I want to plot an averaged ROC curve in MATLAB. However currently I can only plot K ROC curves in one plot but without knowing the algorithm of averaged ROC curve.
Say I have K lists of $\hat{p}$ and Y(only 0 or 1), or correspondingly I have K lists of FPR and TPR. What should be averaged? Thanks.