Computes the ROC curves as x = false positive rate (FPR) and y = true positive rate (TPR)
FPR = False Positives / (False Positives + True Negatives) TPR = True Positives / (True Positives + False Negatives)
rocCurves(Z.test, Z.train, P, plot = TRUE, bins = 400, all = FALSE)
Z.test | the bipartite interaction matrix used for the test set |
---|---|
P | the posterior probability matrix output by |
plot | TRUE/FALSE to plot the ROC curve. |
bins | the number of bins that the interval (0,1) is divided into (default is 400) |
all | TRUE/FALSE to calculate the ROC curve based on the whole dataset, or only the held-out portion |
Z_est | the estimated bipartite interaction matrix used |
Returns: 'auc': the maximum AUC value 'threshold': the threshold where P > threshold has the maximum AUC value 'roc': a matrix containing the threthold, FPR, and TPR
# NOT RUN { # }