Description Usage Arguments Details Value References See Also Examples
A group of functions to plot precision-recall and ROC curves and to compute f-scores from the
data.frame returned by the validate
function.
1 2 3 4 5 6 7 |
table |
This is the data.frame returned by the |
beta |
Numeric used as the weight of the recall in the f-score formula - see details. The default value of this argument is 1, meaning precision as important as recall. |
device |
The device to be used. This parameter allows the user to plot precision-recall and receiver operating characteristic curves for various inference algorithms on the same plotting window - see examples. |
... |
arguments passed to |
A confusion matrix contains FP,TP,FN,FP values.
"true positive rate" tpr = TP/(TN+TP)
"false positive rate" fpr = FP/(FN+FP)
"precision" p = TP/(FP+TP)
"recall" r = TP/(TP+FN)
"f-beta-score" Fbeta = (1+beta) * p*r/(r + beta*p)
The function show.roc
(show.pr
) plots the ROC-curve (PR-curve) and returns the device associated with the plotting window.
The function auc.roc
(auc.pr
) computes the area under the ROC-curve (PR-curve) using the trapezoidal approximation.
The function pr
returns a data.frame where steps is the number of thresholds used
in the validation process. The first column contains precisions and the second recalls - see details.
The function rates
also returns a data.frame where the first column contains true
positive rates and the second column false positive rates - see details.
The function fscores
returns fscores according to the confusion matrices
contained in the 'table' argument - see details.
Patrick E. Meyer, Frederic Lafitte, and Gianluca Bontempi. minet: A R/Bioconductor Package for Inferring Large Transcriptional Networks Using Mutual Information. BMC Bioinformatics, Vol 9, 2008.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | data(syn.data)
data(syn.net)
# Inference
mr <- minet( syn.data, method="mrnet", estimator="spearman" )
ar <- minet( syn.data, method="aracne", estimator="spearman" )
clr<- minet( syn.data, method="clr", estimator="spearman" )
# Validation
mr.tbl <- validate(mr,syn.net)
ar.tbl <- validate(ar,syn.net)
clr.tbl<- validate(clr,syn.net)
# Plot PR-Curves
max(fscores(mr.tbl))
dev <- show.pr(mr.tbl, col="green", type="b")
dev <- show.pr(ar.tbl, device=dev, col="blue", type="b")
show.pr(clr.tbl, device=dev, col="red",type="b")
auc.pr(clr.tbl)
|
[1] 0.4367816
pdf
3
[1] 0.3316967
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.