cc.search_compound confidence metric?

9 views
Skip to first unread message

Maggie Cook

unread,
Feb 4, 2025, 3:03:51 PMFeb 4
to eQuilibrator Users
Hello,

When using cc.search_compound, is there a way to also return some sort of score which quantifies the confidence of the returned identifiers?

Thanks!

Elad Noor

unread,
Feb 5, 2025, 3:23:14 AMFeb 5
to eQuilibrator Users
Hello,

Here is a code example:

from equilibrator_api import ComponentContribution
cc = ComponentContribution()
search_results = cc.ccache.search("glucose", page=1, page_size=100)

The result will be a list of tuples: (Compound, score).
The score is based on the "ratio" function from the Levenshtein package: https://rapidfuzz.github.io/Levenshtein/levenshtein.html#ratio
So the highest score will be 1 (perfect match) and will go down as the edit distance increases.

Best,
Elad
Reply all
Reply to author
Forward
0 new messages