From 16c95dd32808c85adaaaa26e7dfd8b3ade3f33b2 Mon Sep 17 00:00:00 2001 From: Wout Bittremieux Date: Fri, 13 Oct 2023 12:52:52 +0200 Subject: [PATCH] Correctly report AA precision and recall during validation Fixes #252. --- CHANGELOG.md | 1 + casanovo/denovo/model.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3d0e272..47b86828 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Casanovo runs on CPU and can passes all tests. - Enable gradients during prediction and validation to avoid NaNs from occuring as a temporary workaround until a new Pytorch version is available. - Upgrade to depthcharge v0.2.3 for `PeptideTransformerDecoder` hotfix. +- Correctly report amino acid precision and recall during validation. ### Removed diff --git a/casanovo/denovo/model.py b/casanovo/denovo/model.py index 23eeac92..03baa594 100644 --- a/casanovo/denovo/model.py +++ b/casanovo/denovo/model.py @@ -773,8 +773,8 @@ def validation_step( aa_precision, _, pep_precision = evaluate.aa_match_metrics( *evaluate.aa_match_batch( - peptides_pred, peptides_true, + peptides_pred, self.decoder._peptide_mass.masses, ) )