'sensitivity_score' from 'sklearn.metrics
时间: 2024-01-12 17:02:33 浏览: 37
'sensitivity_score' is not a function in the 'sklearn.metrics' module. However, 'recall_score' can be used to compute the sensitivity of a binary classification model. Sensitivity, also known as true positive rate, measures the proportion of actual positive cases that are correctly identified by the model. It can be calculated as:
sensitivity = true positives / (true positives + false negatives)
Here's an example of how to use 'recall_score' to compute sensitivity:
```python
from sklearn.metrics import recall_score
y_true = [0, 1, 1, 0, 1, 0]
y_pred = [0, 1, 0, 0, 1, 1]
sensitivity = recall_score(y_true, y_pred)
print('Sensitivity:', sensitivity)
```
Output:
```
Sensitivity: 0.6666666666666666
```