FlavFinder
FlavFinder decides whether a single MS/MS spectrum comes from a flavonoid. Positive and negative ion modes are modelled separately.
Input and output
- Input: peak m/z and intensity of one MS/MS spectrum.
- Output: flavonoid / non-flavonoid decision, with low, mid or high confidence depending on which threshold the score passes.
How it works
- Two representations of the same spectrum: (1) fixed-width binning from m/z 10 to 500 at 0.10 width (4,900 features), normalised to the maximum intensity in the spectrum; (2) a learned m/z vocabulary at 5 ppm tolerance, giving a normalised token-weight vector.
- Both representations feed a binary classifier. The reference backend is AutoGluon TabularPredictor (metric roc_auc); LightGBM and scikit-learn backends are provided for local runs.
- Two thresholds are set on validation data: the Youden point of the ROC curve, and the threshold closest to a 1% false-positive rate.
- Positive labels come from ten priority-ordered SMARTS scaffold rules: flavonol, flavone, dihydroflavonol, flavanone, flavan-3-ol, isoflavone, chalcone, dihydrochalcone, aurone and anthocyanidin.
Training data
24,928 / 8,229
positive-mode training / test spectra
11,804 / 3,886
negative-mode training / test spectra
8.7% / 10.2%
flavonoid-positive share (pos / neg)
Performance
Group-disjoint split, where near-duplicate spectra are kept on one side. On a random split the same metrics are 0.9507 / 0.7927 (positive) and 0.9267 / 0.7050 (negative). 44–47% of test spectra have a training neighbour at cosine similarity 0.95 or higher, so the group-disjoint numbers are the realistic ones.
Where to use it
- Web platform: AI Tools module.
- Source code and pipeline: flavfinder-core (MIT licence).