Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BioRED evaluation #270

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ontogpt/evaluation/biored/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

45 changes: 45 additions & 0 deletions src/ontogpt/evaluation/biored/eval_biored.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
"""
BioRED evaluation.

This evaluation measures performance of OntoGPT
on relation extraction over the BioRED data set
(see Luo et al. 2022,
https://doi.org/10.1093/bib/bbac282).

The BioRED set includes 600 biomedical abstracts
annotated for multiple entity and relation types.
The entity types are as follows, grounded
to the following namespaces:
Gene (NCBI Gene)
Variant (dbSNP)
Species (NCBI Taxonomy)
Disease (MESH + OMIM)
Chemical (MESH Chemicals and Drugs)
CellLine (Cellosaurus)
The BioRED annotations include ungrounded but
normalized tmVar representations for variants without
corresponding dbSNP entries.

The relation types are as follows:
Disease-chemical
Disease-gene
Disease-variant
Disease-gene
Gene-gene
Gene-chemical
Chemical-chemical
Chemical-variant

Note that these relation types have subtypes as
well. See the BioRED annotation guide, Table 4,
for the full set
(https://ftp.ncbi.nlm.nih.gov/pub/lu/BioRED/BioRED_Annotation_Guideline.pdf)

Luo et al. report these F1 scores as best results:
NER: 89.3
RE: 47.7

This evaluation uses a task-specific template
(biored).

"""
Loading