linesROC: Add an ROC curve to an existing plot.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/linesROC.R

Description

A simple function to produce an ROC curve from a known edge matrix and a posterior edge probability matrix.

Usage

1
linesROC(trueMatrix, pep, col = "red", lty = 1, lwd = 1)

Arguments

trueMatrix

The 'true' edge matrix.

pep

A matrix of posterior edge probabilities.

col

A colour (passed to segments).

lty

A line type (passed to segments).

lwd

A line width (passed to segments).

Details

The area of the ROC curve is also sent to the console.

Value

The area of the ROC curve.

Author(s)

Simon Spencer

See Also

interventionalDBN-package

Examples

1
2
3
4
5
trueMatrix<-matrix(rbinom(225,1,0.5),15,15)
pep<-matrix(runif(225,0.2,1)*trueMatrix+runif(225,0,0.5)*(1-trueMatrix),15,15)
plot(0:1, 0:1, t="l", col="grey", xlab="False positive rate",
  ylab="False negative rate", main="An ROC curve.")
linesROC(trueMatrix,pep)

interventionalDBN documentation built on May 30, 2017, 8:24 a.m.