Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

evaluation.fmeasure

F-measure


Description

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

Usage

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

Arguments

predictions

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

targets

Actual targets of the dataset (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

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

Data Mining and R Programming for Beginners

v0.9.5
GPL-3
Authors
Alexandre Blansché [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.