evaluation.precision {fdm2id} | R Documentation |
Precision of classification predictions
Description
Evaluation predictions of a classification model according to precision. Works only for two classes problems.
Usage
evaluation.precision(predictions, gt, positive = levels(gt)[1], ...)
Arguments
predictions |
The predictions of a classification model ( |
gt |
The ground truth ( |
positive |
The label of the positive class. |
... |
Other parameters. |
Value
The evaluation of the predictions (numeric value).
See Also
evaluation.accuracy
, evaluation.fmeasure
, evaluation.fowlkesmallows
, evaluation.goodness
, evaluation.jaccard
, evaluation.kappa
,
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.precision (pred.nb, d$test.y)
[Package fdm2id version 0.9.9 Index]