evaluatePrediction | R Documentation |
This function can evaluate prediction based on reference labels and predicted results.
evaluatePrediction(reference, prediction, positive.class = NULL)
reference |
a factor/character string of classes to be used as the true results. |
prediction |
a factor/character string of predicted classes. |
positive.class |
|
reference
and prediction
should have exactly the same classes.
More information please refer to confusionMatrix
.
A dataframe that reports TP, TN, FP, FN, Sensitivity, Specificity, Accuracy, F-Measure (F1-Score), MCC (Matthews Correlation Coefficient), Cohen's Kappa, etc.
Kuhn M. Building predictive models in R using the caret package. Journal of statistical software. 2008; 28(5):1-26.
confusionMatrix
# Following codes only show how to use this function
# and cannot reflect the genuine performance of tools or classifiers.
data(demoPositiveSeq)
seqRNA <- demoPositiveSeq$RNA.positive
seqPro <- demoPositiveSeq$Pro.positive
# Predicting ncRNA-protein pairs using RPISeq (web-based):
Res_RPISeq <- run_RPISeq(seqRNA = seqRNA, seqPro = seqPro,
parallel.cores = 2) # Network is required.
# Evaluating the result:
perf_RPISeq <- evaluatePrediction(reference = rep("Non.Interact", 20),
prediction = Res_RPISeq$RPISeq_Web_RF_pred,
positive.class = "Non.Interact")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.