% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/huge.roc.R
\name{huge.roc}
\alias{huge.roc}
\title{Draw ROC Curve for a graph path}
\usage{
huge.roc(path, theta, verbose = TRUE)
}
\arguments{
\item{path}{A graph path.}

\item{theta}{The true graph structure, containing at least one edge and one absent off-diagonal edge.}

\item{verbose}{If \code{verbose = FALSE}, tracing information printing is disabled. The default value is \code{TRUE}.}
}
\value{
An object with S3 class "roc" is returned:
  \item{F1}{
    The F1 scores along the graph path.
  }
\item{tp}{
  The true positive rates along the graph path
}
\item{fp}{
  The false positive rates along the graph paths
}
\item{AUC}{
  Area under the ROC curve
}
}
\description{
Draws ROC curve for a graph path according to the true graph structure.
}
\details{
To avoid the horizontal oscillation, false positive rates is automatically sorted in the ascent order and true positive rates also follow the same order.
}
\note{
ROC/AUC is undefined when \code{theta} contains only edges or only non-edges, so those one-class truth matrices are rejected. For a lasso regression, the number of nonzero coefficients is at most \code{n-1}. If \code{d>>n}, even when regularization parameter is very small, the estimated graph may still be sparse. In this case, the AUC may not be a good choice to evaluate the performance.
}
\examples{
#generate data
L = huge.generator(d = 200, graph = "cluster", prob = 0.3)
out1 = huge(L$data)

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

#Maximum F1 score
max(Z1$F1)
}
\seealso{
\code{\link{huge}} and \code{\link{huge-package}}.
}
