confusion

0th

Percentile

Confusion Matrices

Compute the confusion matrix between two factors, or for an fda or mda object.

Keywords
category
Usage
# S3 method for default
confusion(object, true, …)
# S3 method for fda
confusion(object, data, …)
Arguments
object

the predicted factor, or an fda or mda model object.

true

the true factor.

data

a data frame (list) containing the test data.

further arguments to be passed to or from methods.

Details

This is a generic function.

Value

For the default method essentially table(object, true), but with some useful attribute(s).

See Also

fda, predict.fda

Aliases
  • confusion
  • confusion.default
  • confusion.list
  • confusion.fda
Examples
# NOT RUN {
data(iris)
irisfit <- fda(Species ~ ., data = iris)
confusion(predict(irisfit, iris), iris$Species)
##            Setosa Versicolor Virginica 
##     Setosa     50          0         0
## Versicolor      0         48         1
##  Virginica      0          2        49
## attr(, "error"):
## [1] 0.02
# }
Documentation reproduced from package mda, version 0.4-10, License: GPL-2

Community examples

Looks like there are no examples yet.