evaluation.fmeasure: F-measure

evaluation.fmeasureR Documentation

F-measure

Description

Evaluation predictions of a classification model according to the F-measure index.

Usage

evaluation.fmeasure(predictions, gt, beta = 1, positive = levels(gt)[1], ...)

Arguments

predictions

The predictions of a classification model (factor or vector).

gt

The ground truth (factor or vector).

beta

The weight given to precision.

positive

The label of the positive class.

...

Other parameters.

Value

The evaluation of the predictions (numeric value).

See Also

evaluation.accuracy, evaluation.fowlkesmallows, evaluation.goodness, evaluation.jaccard, evaluation.kappa, evaluation.precision, evaluation.precision, evaluation.recall, evaluation

Examples

require (datasets)
data (iris)
d = iris
levels (d [, 5]) = c ("+", "+", "-") # Building a two classes dataset
d = splitdata (d, 5)
model.nb = NB (d$train.x, d$train.y)
pred.nb = predict (model.nb, d$test.x)
evaluation.fmeasure (pred.nb, d$test.y)

fdm2id documentation built on July 9, 2023, 6:05 p.m.