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

confusion

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

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)

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.