Metrics
Metrics(residues, isotope_error_range, cum_mass_threshold=0.5, ind_mass_threshold=0.1)
Peptide metrics class.
Source code in instanovo/utils/metrics.py
calc_auc(targs, preds, conf)
Calculate the peptide-level AUC.
Source code in instanovo/utils/metrics.py
compute_aa_er(peptides_truth, peptides_predicted)
Compute amino-acid level error-rate.
Source code in instanovo/utils/metrics.py
compute_precision_recall(targets, predictions, confidence=None, threshold=None)
Calculate precision and recall at peptide- and AA-level.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
targets |
list[str] | list[list[str]]
|
Target peptides. |
required |
predictions |
list[str] | list[list[str]]
|
Model predicted peptides. |
required |
confidence |
list[float] | None
|
Optional model confidence. |
None
|
threshold |
float | None
|
Optional confidence threshold. |
None
|
Source code in instanovo/utils/metrics.py
matches_precursor(seq, prec_mass, prec_charge, prec_tol=50)
Check if a sequence matches the precursor mass within some tolerance.