Description Usage Arguments Details Value Author(s) References See Also Examples
Computes the specificity of class prediction.
1 2 | ## S3 method for class 'BigBang'
specificityClass(o, cm, ...)
|
cm |
The confusion matrix or the class prediction matrix. If missing, |
.. |
Further parameters when |
Specificity is the probability that a sample of class different to X
will NOT be predicted as class X
. High specificity avoids false positives.
Specificity = TN / (TN + FP)
TN - True Negatives: For class A, TN = Pbb + Pbc + Pbx + Pcb + Pcc + Pcx
FP - False Positives: For class A, FP = Pba + Pca
Confusion Matrix:
[ Predicted Class ]
ClassA ClassB ClassC "misclass"
ClassA Paa Pab Pac Pax
ClassB Pba Pbb Pbc Pbx
ClassC Pca Pcb Pcc Pcx
A vector with the specificity of prediction for every class.
Victor Trevino. Francesco Falciani Group. University of Birmingham, U.K. http://www.bip.bham.ac.uk/bioinf
Goldberg, David E. 1989 Genetic Algorithms in Search, Optimization and Machine Learning. Addison-Wesley Pub. Co. ISBN: 0201157675
For more information see BigBang
.
*classPredictionMatrix()
,
*confusionMatrix()
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.