Therefore, we used a dynamic threshold for each functional group to determine the presence of a functional group in the molecule. This threshold is calculated to maximize the functional group F1 score for the training set after training is complete. While the ability of the model to predict the presence of a particular functional group is important for evaluating the performance of the model, a metric better suited for the study of chemistry and essential for autonomous instrumentation will be to measure the performance to prediction all functional groups in a given molecule. Therefore, we have introduced new metrics, such as the 'Molecular F1 score (MF1)' and the 'Molecular Perfection Rate (MPR)' (see Figure and the methods section for more details) and optimized our models for the IR and IR+MS data. After optimization, the IR+MS model was able to perform on par or better than the optimized combined IR for the majority of functional groups (Figure ). The resulting models have comparable average MPRs (72.5% vs 74.9%) and MF1s (0.923 vs 0.931) for IR and IR+MS respectively (see Tables ). The hyperparameters for these models are given in the supporting information under Details of the neural networks.