models.confusion_matrix()
The confusion matrix of a binary model at threshold (a row is
Usage
models.confusion_matrix(
y,
score,
threshold,
weights=None,
)positive when its score is at least the threshold), weighted counts.
Parameters
y: list of float-
0 or 1.
score: list of floatthreshold: floatweights: list of float = None
Returns
dict-
true_positive,false_positive,true_negative,false_negative,sensitivityandspecificity.