Last data update: 2014.03.03

R: Make ROC plots.
compareROCR Documentation

Make ROC plots.

Description

This rocStats wrapper superimposes ROC curves on a plot to analyse the output performance of a method-A, and optionally compare it with that of a method-B, based on some ground thruth labels.

Usage

  compareROC(output, groundTruthLabels, compareToRanking)

Arguments

output

(vector) The output of ranking scores returned by method-A for each data-point.

groundTruthLabels

(vector) A binary vector that contains the ground truth (e.g. which genes are members of the top-100 ground truth list).

compareToRanking

A matrix where each column is the output vector of ranking scores returned by another competing method.

Value

area

A scalar. The area under the ROC curve of method-A.

See Also

rocStats

Examples

  data(FragmentDellaGattaData) ## Load demo data.
  compareROC(output= rnorm(length(DGatta_labels_byTSNI))>0, groundTruthLabels=DGatta_labels_byTSNI)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(gprege)
Loading required package: gptk
Loading required package: Matrix
Loading required package: fields
Loading required package: spam
Loading required package: grid
Spam version 1.3-0 (2015-10-24) is loaded.
Type 'help( Spam)' or 'demo( spam)' for a short introduction 
and overview of this package.
Help for individual functions is also obtained by adding the
suffix '.spam' to the function name, e.g. 'help( chol.spam)'.

Attaching package: 'spam'

The following objects are masked from 'package:base':

    backsolve, forwardsolve

Loading required package: maps

 # maps v3.1: updated 'world': all lakes moved to separate new #
 # 'lakes' database. Type '?world' or 'news(package="maps")'.  #


> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/gprege/compareROC.Rd_%03d_medium.png", width=480, height=480)
> ### Name: compareROC
> ### Title: Make ROC plots.
> ### Aliases: compareROC
> 
> ### ** Examples
> 
>   data(FragmentDellaGattaData) ## Load demo data.
>   compareROC(output= rnorm(length(DGatta_labels_byTSNI))>0, groundTruthLabels=DGatta_labels_byTSNI)
[1] 0.5050895
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>