compute_fraction_best_ligands#
- cinnabar.classification_metrics.compute_fraction_best_ligands(y_true: Iterable[float], y_pred: Iterable[float], fraction: float = 0.5) float[source]#
Compute the fraction of the best ligands metric introduced by Chris Bayly.
This function calculates the fraction of the best ligands by computing overlap coefficients for each ranking up to the number of ligands and then averaging up to the specified fraction.
- Parameters:
y_true (array-like) – The true values.
y_pred (array-like) – The predicted values.
fraction (float, default 0.5) – The fraction of ligands to consider as the best.
- Returns:
The computed fraction of the best ligands.
- Return type:
float
- Raises:
ValueError – If
fractionis not between 0 and 1.