lir.metrics package
- lir.metrics.cllr(llr_data: LLRData, weights: tuple[float, float] = (1, 1)) float[source]
Calculate a log likelihood ratio cost (C_llr) for a series of log likelihood ratios.
Nico Brümmer and Johan du Preez, Application-independent evaluation of speaker detection, In: Computer Speech and Language 20(2-3), 2006.
- lir.metrics.cllr_cal(llr_data: LLRData, weights: tuple[float, float] = (1, 1)) float[source]
Calculate the difference between the C_llr before and after isotonic calibration.
- lir.metrics.cllr_min(llr_data: LLRData, weights: tuple[float, float] = (1, 1)) float[source]
Estimate the discriminative power from a collection of log likelihood ratios.
- lir.metrics.llr_lower_bound(llrs: LLRData) float | None[source]
Provide corresponding lower bound for provided LLR data.
When an LLRData object contains a lower bound, return it. If not, return None.
- lir.metrics.llr_upper_bound(llrs: LLRData) float | None[source]
Provide corresponding upper bound for provided LLR data.
When an LLRData object contains an upper bound, return it. If not, return None.
Submodules
lir.metrics.overestimation module
- lir.metrics.overestimation.llr_overestimation(llrs: ndarray, y: ndarray, **kwargs: Any) float[source]
Calculate the mean absolute value of the LLR-overestimation.
- Parameters:
llrs (np.ndarray) – Array of log-likelihood ratios.
y (np.ndarray) – Array of labels (1 for H1 and 0 for H2).
**kwargs (Any) – Additional keyword arguments forwarded to calc_llr_overestimation.
- Returns:
Mean absolute value of the overestimation grid, or np.nan when unavailable.
- Return type: