Get your own Python server Result Size: 625 x 565
x
 
import numpy
from sklearn import metrics
actual = numpy.random.binomial(1,.9,size = 1000)
predicted = numpy.random.binomial(1,.9,size = 1000)
Specificity = metrics.recall_score(actual, predicted, pos_label=0)
print(Specificity)
0.08888888888888889