bedroc_score#
- skfp.metrics.bedroc_score(y_true: ndarray | list[int], y_score: ndarray | list[float], alpha: float = 20) float #
Boltzmann-enhanced discrimination of ROC (BEDROC).
A normalized alternative to Robust Initial Enhancement (RIE), scaled to have values in range
[0, 1]
.alpha
is directly passed to underlying RIE function, and is roughly equivalent to1 / fraction
from enrichment factor (EF). See [1] [2] for details.Defined as:
\[BEDROC(\alpha) = \frac{RIE(\alpha) - RIE_{min}(\alpha)}{RIE_{max}(\alpha) - RIE_{min}(\alpha)}\]- Parameters:
y_true (array-like of shape (n_samples,)) – Ground truth (correct) target values.
y_score (array-like of shape (n_samples,)) – Target scores, e.g. probability of the positive class, or similarities to active compounds.
alpha (float, default=20) – Exponential weight, roughly equivalent to
1 / fraction
from EF.
References
- Returns:
score – BEDROC value.
- Return type:
float
Examples
>>> import numpy as np >>> from skfp.metrics import bedroc_score >>> y_true = [0, 0, 1] >>> y_score = [0.1, 0.2, 0.7] >>> bedroc_score(y_true, y_score) 0.9999999999999999