R: Classification Confusion Matrix and Accuracy

confusion {rknn} | R Documentation

## Classification Confusion Matrix and Accuracy

### Description

Compute classification confusion matrix and accuracy

### Usage

    confusion(obs, pred)
    confusion2acc(ct)

### Arguments

`obs` | A vector of observed classes.
`pred` | A vector of predicted classes.
`ct` | A table retruned from `confusion`

### Value

`confusion` return a matrix of cross classification counts. `confusion` return a overall classification accuracy.

### Author(s)

Shengqiao Li<lishengqiao@yahoo.com>

### Examples

      obs<- rep(0:1, each =5);
      pre<- c(obs[3:10], obs[1:2])
      confusion(obs, pre)
      confusion2acc(  confusion(obs, pre))

[Package rknn version 1.2-1 Index]