CalculateHUM_Plot: Plot 2D-ROC curve

View source: R/ROC_Plot.R

CalculateHUM_PlotR Documentation

Plot 2D-ROC curve

Description

This is the main function of the HUM package. It plots the 2D-ROC curve using the point coordinates, computed by the function CalculateHUM_ROC.Optionally visualizes the optimal threshold point, which gives the maximal accuracy of the classifier(feature) (see CalcROC).

Usage

CalculateHUM_Plot(sel,Sn,Sp,optSn,optSp,HUM,print.optim=TRUE)

Arguments

sel

a character value, which is the name of the selected feature.

Sn

a numeric vector of the x-coordinates of the ROC curve, which is the specificity values of the standard ROC analysis..

Sp

a numeric vector of the y-coordinates of the ROC curve, which is the sensitivity values of the standard ROC analysis..

optSn

the optimal specificity value for 2D-ROC construction

optSp

the optimal sensitivity value for 2D-ROC construction

HUM

a numeric vector of HUM values, calculated using function CalculateHUM_seq or CalculateHUM_Ex.

print.optim

a boolean parameter to plot the optimal threshold point on the graph. The default value is TRUE.

Details

This function's main job is to plot the 2D-ROC curve according to the given point coordinates.

Value

The function doesn't return any value.

Errors

If there exists NA values for specificity or sensitivity values, or HUM values the plotting fails and an error is triggered with message “Values are missing”.

References

Li, J. and Fine, J. P. (2008): ROC Analysis with Multiple Tests and Multiple Classes: methodology and its application in microarray studies.Biostatistics. 9 (3): 566-576.

See Also

CalculateHUM_seq, CalculateHUM_ROC

Examples

data(sim)
# Basic example
indexF=names(sim[,c(3),drop = FALSE])
indexClass=2
label=unique(sim[,indexClass])
indexLabel=label[1:2]
out=CalculateHUM_seq(sim,indexF,indexClass,indexLabel)
HUM<-out$HUM
seq<-out$seq
out=CalculateHUM_ROC(sim,indexF,indexClass,indexLabel,seq)
CalculateHUM_Plot(indexF,out$Sn,out$Sp,out$optSn,out$optSp,HUM)

HUM documentation built on June 21, 2022, 5:05 p.m.