fMeasure: Individual and hierarchical F-measures

fMeasureR Documentation

Individual and hierarchical F-measures

Description

Set of functions to compute the individual and hierarchical F-score, precision, recall.

Usage

    fMeasures(target, predicted, cutoff = 0.5)
    fMeasuresByLevel(target, predicted, graphOnto, cutoff = 0.5)
    fHierarchicalMeasures(target, predicted, graphOnto, cutoff = 0.5)

Arguments

target

A binary matrix with ‘n’ proteins (rows) by ‘m’ Ontology node labels (columns) corresponding to the target of ontology terms where 0 stands for negative and 1 for positive.

predicted

A real matrix with ‘n’ proteins (rows) by ‘m’ Ontology node labels (columns) corresponding to the predicted terms.

graphOnto

A graphNEL graph with ‘m’ Ontology node labels.

cutoff

A real value to divide the predicted terms into positive and negative. The predicted values higher than the cutoff will be taken as positive.

Details

fMeasures computes the F-score, precision, recall, specificity and accuracy for each ontological term.

fMeasuresByLevel computes F-score, precision, recall, specificity and accuracy for all ontological terms belongs to graph. The levels are calculated as the maximum distance between two terms of the graph.

fHierarchicalMeasures computes the hierarchical F-score, precision, recall for the predicted terms of a set of proteins.

Value

fMeasures and fMeasuresByLevel returns a list of two elements where the first element is a named vector with six attributes while the second element is an array of 'm' ontological terms by six attributes. The 6 attributes are:

Prec:

Precision

Recall:

Recall

Specif:

Specificity

Fmeasure:

F-score

Acc:

Accuracy

nPositive:

Number of positive samples

fHierarchicalMeasures returns a list of five elements:

HP:

Hierarchical Precision

HR:

Hierarchical Recall

HF:

Hierarchical F-score

nSample:

Number of proteins evaluated

noEvalSample:

Named vector of proteins not evaluated

Author(s)

Flavio E. Spetale <spetale@cifasis-conicet.gov.ar>

References

Verspoor K, Cohn J, Mnizewski S, C J. A categorization approach to automated ontological function annotation. Protein Science. 2006;15:1544–1549.

Examples

data(CfData)

predGO <- matrix(runif(360, 0, 1),10,36, dimnames=list(rownames(
        CfData[["tableCfGO"]])[seq_len(10)], colnames(CfData[["tableCfGO"]])))

fMeasures(CfData[["tableCfGO"]][seq_len(10), ], predGO, cutoff = 0.5)

mygraphGO <- as(CfData[["graphCfGO"]], "graphNEL")

fHierarchicalMeasures(CfData[["tableCfGO"]][seq_len(10), ], predGO, mygraphGO,
cutoff = 0.5)

fspetale/fgga documentation built on Jan. 29, 2024, 6:53 p.m.