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)

Arguments

Z.test

the bipartite interaction matrix used for the test set

P

the posterior probability matrix output by sample_parameter

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

Value

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

Examples

# NOT RUN {
# }