Metrics and Evaluation API
Hyperion separates metric primitives from evaluators. Use NumPy functions for
in-memory score arrays; use evaluators or
hyperion-eval-verification-metrics when scores and keys are stored in
tables/files.
Verification metrics
The primary verification contract is a TrialKey plus an aligned
TrialScores object. The evaluator extracts target/non-target scores, then
computes EER and min/actual DCF for the requested target priors.
- hyperion.np.metrics.compute_eer(tar: ndarray, non: ndarray) float[source]
Computes equal error rate.
- Parameters:
tar – Scores of target trials.
non – Scores of non-target trials.
- Returns:
EER
- hyperion.np.metrics.compute_min_dcf(tar: ndarray, non: ndarray, prior: float | ndarray | Sequence[float], normalize: bool = True) Tuple[float | ndarray, float | ndarray, float | ndarray][source]
Computes minimum DCF.
min_DCF = min_t prior * p_miss(t) + (1 - prior) * p_fa(t), wheretis the decision threshold.- Parameters:
tar – Target scores.
non – Non-target scores.
prior – Target prior or vector of target priors.
normalize – if true, return normalized DCF, else unnormalized.
- Returns:
Vector Minimum DCF for each prior. Vector of P_miss corresponding to each min DCF. Vector of P_fa corresponding to each min DCF.
Use the command-line workflow in Extract, Score, and Evaluate X-Vectors for CSV/HDF5 result files and DET/DCF plots. EER is threshold-independent; DCF depends on the declared prior and costs, so only compare DCF values computed under the same policy.
Other evaluator families
The anonymization/voice-conversion workflows that feed these evaluators are experimental. TPM-backed quality and VoxProfile evaluators may require their corresponding optional external packages.
Torch metrics
hyperion.torch.metrics contains training-loop metrics such as categorical
accuracy. These are distinct from speaker-verification EER/DCF evaluation and
should not be used as a substitute for trial-based evaluation.