confusionMatrix.BigBang {galgo} | R Documentation

## Computes the class confusion matrix from a class prediction matrix

### Description

Computes the class confusion matrix from a class prediction matrix.

### Usage

    ## S3 method for class 'BigBang'
    confusionMatrix(o, cm, ...)

### Arguments

`cm` | The confusion matrix, If not specified `classPredictionMatrix` method is call using the `BigBang` object provided and `...`
`...` | Further parameters passed to `classPredictionMatrix` when `cm` is not specified.

### Details

The matrix is computed getting the predicted class proportions for all samples; accumulating the proportions; finally producing propotions for all classes. This procedure is equivalent to having the same weights (priors) for all classes.

### Value

A matrix with original classes in rows and predicted classes in columns. Each value represent the “probability” for a sample within a given class to be predicted as any other class.

### Author(s)

Victor Trevino. Francesco Falciani Group. University of Birmingham, U.K. http://www.bip.bham.ac.uk/bioinf

### References

Goldberg, David E. 1989 Genetic Algorithms in Search, Optimization and Machine Learning. Addison-Wesley Pub. Co. ISBN: 0201157675

### See Also

For more information see `BigBang`. `*classPredictionMatrix()`, `*confusionMatrix()`.

### Examples

    ## Not run:
       #bb is a BigBang object
       cpm <- classPredictionMatrix(bb)
       cpm
       cm <- confusionMatrix(bb)
       cm
       #equivalent and quicker because classPredictionMatrix is provided
       cm <- confusionMatrix(bb, cpm)
       cm

       specificityClass(bb, cm)
       specificityClass(bb, cpm)
       specificityClass(bb)
       # all are equivalent
       sensitivityClass(bb, cpm)
       sensitivityClass(bb, cm)
       sensitivityClass(bb)
       # all are equivalent

    ## End(Not run)

[Package galgo version 1.4 Index]