confusion {fdm2id} | R Documentation |
Confuion matrix
Description
Plot a confusion matrix.
Usage
confusion(predictions, gt, norm = TRUE, graph = TRUE)
Arguments
predictions |
The prediction. |
gt |
The ground truth. |
norm |
Whether or not the confusion matrix is normalized |
graph |
Whether or not a graphic is displayed. |
Value
The confusion matrix.
See Also
evaluation
, performance
, splitdata
Examples
require ("datasets")
data (iris)
d = splitdata (iris, 5)
model = NB (d$train.x, d$train.y)
pred = predict (model, d$test.x)
confusion (d$test.y, pred)
[Package fdm2id version 0.9.9 Index]