Learn R Programming

fdm2id (version 0.9.5)

evaluation.fowlkesmallows: Fowlkes<U+2013>Mallows index

Description

Evaluation predictions of a classification model according to the Fowlkes<U+2013>Mallows index.

Usage

evaluation.fowlkesmallows(
  predictions,
  targets,
  positive = levels(targets)[1],
  ...
)

Arguments

predictions

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

targets

Actual targets of the dataset (factor or vector).

positive

The label of the positive class.

...

Other parameters.

Value

The evaluation of the predictions (numeric value).

See Also

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

Examples

Run this code
# NOT RUN {
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.fowlkesmallows (pred.nb, d$test.y)
# }

Run the code above in your browser using DataLab