vis.res: Visualize Results

Description Usage Arguments Details Value References See Also Examples

Description

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.

Usage

1
2
3
4
5
6
7

Arguments

table

This is the data.frame returned by the validate function where columns contain TP,FP,TN,FN values (confusion matrix) as well as the threshold value used - see validate.

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 plot

Details

A confusion matrix contains FP,TP,FN,FP values.

Value

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.

References

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.

See Also

validate, plot

Examples

 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)

Example output

[1] 0.4367816
pdf 
  3 
[1] 0.3316967

minet documentation built on Nov. 8, 2020, 6 p.m.

Related to vis.res in minet...