Multilabel.F.measure: Multilabel F-measure

Description Usage Arguments Details Value Examples

Description

Method for computing Precision, Recall, Specificity, Accuracy and F-measure for multiclass and multilabel classification.

Usage

1
2
3
4
5
F.measure.multilabel(target, predicted, b.per.example = FALSE)

## S4 method for signature 'matrix,matrix'
F.measure.multilabel(target, predicted,
  b.per.example = FALSE)

Arguments

target

matrix with the target multilabel: rows correspond to examples and columns to classes. target[i,j]=1 if example i belongs to class j, target[i,j]=0 otherwise.

predicted

a numeric matrix with discrete predicted values: rows correspond to examples and columns to classes. predicted[i,j]=1 if example i is predicted belonging to class j, target[i,j]=0 otherwise.

b.per.example

boolean.

  • TRUE: results are returned for each example;

  • FALSE: only the average results are returned;

Details

Names of rows and columns of target and predicted matrix must be provided in the same order, otherwise a stop message is returned.

Value

Two different outputs respect to the input parameter b.per.example:

Examples

1
2
3
4
5
6
7
8
9
data(labels);
data(scores);
data(graph);
root <- root.node(g);
L <- L[,-which(colnames(L)==root)];
S <- S[,-which(colnames(S)==root)];
S[S>0.7] <- 1;
S[S<0.7] <- 0;
FMM <- F.measure.multilabel(L,S);

gecko515/HEMDAG documentation built on Oct. 18, 2019, 6:34 a.m.