Description Usage Arguments Value Note See Also Examples
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.
1 2 3 4 5 6 7 8 9 10 |
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 |
If plot is 'none' (by default), an object of class "pPerf", a list with following components:
PRS
: a data frame with 3 columns ('Precision', 'Recall'
and 'Specificity')
AUROC
: a scalar value for ROC AUC
Fmax
: a scalar value for maximum F-measure
ROC_perf
: a ROCR performance-class object for ROC curve
PR_perf
: a ROCR performance-class object for PR curve
Pred_obj
: a ROCR prediction-class object (potentially used
for calculating other performance measures)
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
AUC: the area under ROC F-measure: the maximum of a harmonic mean between precision and recall along PR curve
1 2 3 4 5 | RData.location <- "http://galahad.well.ox.ac.uk/bigdata"
## Not run:
pPerf <- xPredictROCR(prediction, GSP, GSN)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.