plotRoc.curves: Plots the ROC curve for two-class problem

Description Usage Arguments Details Value References See Also Examples

Description

This function plots the ROC curve for the two-class problem.

Usage

1
2
3
plotRoc.curves(dattable,file.name=NULL,colours=NULL,ltys=NULL,
 add.legend=F,curve.names=NULL,include.auc=F,xaxis="",yaxis="",
 line.width=2,headline="",ispercent=F)

Arguments

dattable

a dataset, a matrix of feature values for several cases, the last column is for the class labels. Class labels could be numerical or character values.

file.name

the file name to save the plot.

colours

the color values for each plot if more than one feature or one color value in the case of one feature.

ltys

the line type values for each plot if more than one feature or one line type in the case of one feature.

add.legend

logical value; if TRUE the legend will be plotted at the bottom righ.

curve.names

a character value or vector in the case of more than one feature with curve names to be used in the legend.

include.auc

logical value; if TRUE the AUC value will be included in the legend .

xaxis

character value with the name of X axis.

yaxis

character value with the name of Y axis.

line.width

a positive number for line width.

headline

the character value with the name of the plot.

ispercent

logical value; if TRUE the true positive and false positive values of the plot are in the percents.

Details

This function's main job is to plot the ROC curve for one or more features with the possibility to include the AUC values in the legend.

Data can be provided in matrix form, where the rows correspond to cases with feature values and class label. The columns contain the values of individual features and the last column must contain class labels with two class labels.

Value

The data can be provided with reasonable number of missing values that must be at first preprocessed with one of the imputing methods in the function input_miss.

References

David J. Hand and Robert J. Till (2001). A Simple Generalisation of the Area Under the ROC Curve for Multiple Class Classification Problems. Machine Learning 45(2), p. 171–186.

See Also

compute.aucs, pauclog, pauc, compute.auc.permutation, input_miss

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# example for dataset without missing values
data(leukemia72_2)

# class label must be factor
leukemia72_2[,ncol(leukemia72_2)]<-as.factor(leukemia72_2[,ncol(leukemia72_2)])

add.legend<-TRUE
include.auc<-TRUE

attrs.no=c(1,2)
xdata=leukemia72_2[,c(attrs.no,ncol(leukemia72_2))]
plotRoc.curves(dattable=xdata,add.legend=add.legend,include.auc=include.auc)

Example output

Loading required package: gtools
Loading required package: Rcpp
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 

Biocomb documentation built on May 1, 2019, 9:38 p.m.