| xPredictPR | R Documentation |
xPredictPR is supposed to assess the prediction performance via
Precision-Recall (PR) analysis. It requires two inputS: 1) Glod
Standard Positive (GSP) containing targets; 2) prediction containing
predicted targets and predictive scores.
xPredictPR(GSP, prediction, num.threshold = 100, bin = c("quantile",
"uniform"), recall.prediction = F, plot = F, verbose = T)
GSP |
a vector containing Glod Standard Positive (GSP) |
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) |
num.threshold |
an integer to specify how many PR points (as a function of the score threshold) will be calculated |
bin |
how to bin the scores. It can be "uniform" for binning scores with equal interval (ie with uniform distribution), and 'quantile' for binning scores with eual frequency (ie with equal number) |
recall.prediction |
logical to indicate whether the calculation of recall is based on preditable GSP. By default, it sets to FALSE |
plot |
logical to indicate whether to return an object of class "ggplot" for plotting PR curve. By default, it sets to FALSE. If TRUE, it will return a ggplot object after being appended with 'PR' |
verbose |
logical to indicate whether the messages will be displayed in the screen. By default, it sets to TRUE for display |
If plot is FALSE (by default), a data frame containing two columns: 1st column 'Precision' for precision, 2nd 'Recall' for recall. The row has the names corresponding to the score threshold. If plot is TRUE, it will return a ggplot object after being appended with 'PR' (a data frame containing two columns: 1st column 'Precision' for precision, 2nd 'Recall' for recall. The row has the names corresponding to the score threshold).
F-measure: the maximum of a harmonic mean between precision and recall along PR curve
## Not run: PR <- xPredictPR(GSP, prediction) ## End(Not run)