| confusion | R Documentation |
Plot a confusion matrix. Rows are the true labels and columns the predicted ones.
confusion(predictions, gt, norm = TRUE, graph = TRUE, ...)
predictions |
The prediction. This is the first argument, as for every other
evaluation function of the package ( |
gt |
The ground truth. |
norm |
Whether or not the confusion matrix is normalized |
graph |
Whether or not a graphic is displayed. |
... |
Other parameters, ignored. |
The confusion matrix.
evaluation, performance, splitdata
require ("datasets")
data (iris)
d = splitdata (iris, 5)
model = NB (d$train.x, d$train.y)
pred = predict (model, d$test.x)
confusion (pred, d$test.y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.