xPredictROCR: Function to assess the prediction performance via ROC and...

Description Usage Arguments Value Note See Also Examples

View source: R/xPredictROCR.r

Description

xPredictROCR is supposed to assess the prediction performance via Receiver Operating Characteristic (ROC) and Precision-Recall (PR) analysis. It requires three inputs: 1) Gold Standard Positive (GSP) targets; 2) Gold Standard Negative (GSN) targets; 3) prediction containing predicted targets and predictive scores.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
xPredictROCR(
prediction,
GSP,
GSN,
rescale = TRUE,
plot = c("none", "ROC", "PR"),
verbose = TRUE,
font.family = "sans",
signature = TRUE
)

Arguments

prediction

a data frame containing predictions along with predictive scores. It has two columns: 1st column for target, 2nd column for predictive scores (the higher the better). Alternatively, it can be an object of class "pNode" (or "sTarget" or "dTarget") from which a data frame is extracted

GSP

a vector containing Gold Standard Positives (GSP)

GSN

a vector containing Gold Standard Negatives (GSN)

rescale

logical to indicate whether to linearly rescale predictive scores for GSP/GSN targets to the range [0,1]. By default, it sets to TRUE

plot

the way to plot performance curve. It can be 'none' for no curve returned, 'ROC' for ROC curve, and 'PR' for PR curve.

verbose

logical to indicate whether the messages will be displayed in the screen. By default, it sets to TRUE for display

font.family

the font family for texts

signature

a logical to indicate whether the signature is assigned to the plot caption. By default, it sets TRUE showing which function is used to draw this graph

Value

If plot is 'none' (by default), an object of class "pPerf", a list with following components:

If plot is 'ROC' or 'PR', it will return a ggplot object after being appended with the same components as mentioned above. If no GSP and/or GSN is predicted, it will return NULL

Note

AUC: the area under ROC F-measure: the maximum of a harmonic mean between precision and recall along PR curve

See Also

xPredictROCR

Examples

1
2
3
4
5
RData.location <- "http://galahad.well.ox.ac.uk/bigdata"
## Not run: 
pPerf <- xPredictROCR(prediction, GSP, GSN)

## End(Not run)

Pi documentation built on Nov. 26, 2020, 2:01 a.m.