## models.confusion_matrix()


The confusion matrix of a binary model at [threshold](risk.PotTail.md#prospicio.risk.PotTail.threshold) (a row is


Usage


``` python
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 float`  

`threshold: float`  

`weights: list of float = None`  


## Returns


`dict`  
`true_positive`, `false_positive`, `true_negative`, `false_negative`, `sensitivity` and `specificity`.
