Learn R Programming

galgo (version 1.4)

sensitivityClass.BigBang: Computes the sensitivity of class prediction

Description

Computes the sensitivity of class prediction.

Usage

# S3 method for BigBang
sensitivityClass(o, cm, ...)

Arguments

cm

The confusion matrix or the class prediction matrix. If missing, confusionMatrix method is called using the object and ... as other arguments

..

Further parameters when cm is missing.

Value

A vector with the sensitivities of prediction for every class.

Details

Sensitivity is the probability that a sample of class X will be predicted as the same class X. High sensitivity detect true positives. Sensitivity = TP / (TP + FN) TP - True Positives: Example for class A, TP = Paa FN - False Negatives: Example for class A, FN = Pab + Pac + Pax Confusion Matrix: [ Predicted Class ] ClassA ClassB ClassC "misclass" ClassA Paa Pab Pac Pax ClassB Pba Pbb Pbc Pbx ClassC Pca Pcb Pcc Pcx

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

Run this code
# 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
   
# }
# NOT RUN {
 
# }

Run the code above in your browser using DataLab