Learn R Programming

flare (version 1.7.0.1)

sugm.roc: Draw ROC Curve for an object with S3 class "sugm"

Description

Draws ROC curve for a graph path according to the true graph structure.

Usage

sugm.roc(path, theta, verbose = TRUE)

Arguments

path

A graph path.

theta

The true graph structure.

verbose

If verbose = FALSE, tracing information printing is disabled. The default value is TRUE.

Value

An object with S3 class "roc" is returned:

F1

The F1 scores along the graph path.

tp

The true positive rates along the graph path

fp

The false positive rates along the graph paths

AUC

Area under the ROC curve

Details

To avoid the horizontal oscillation, false positive rates is automatically sorted in the ascent oder and true positive rates also follow the same order.

See Also

sugm and flare-package

Examples

Run this code
# NOT RUN {
## load package required
library(flare)

#generate data
L = sugm.generator(d = 30, graph = "random", prob = 0.1)
out1 = sugm(L$data, lambda=10^(seq(log10(.4), log10(0.03), length.out=20)))

#draw ROC curve
Z1 = sugm.roc(out1$path,L$theta)

#Maximum F1 score
max(Z1$F1)
# }

Run the code above in your browser using DataLab