1. A system, comprising: a downhole formation fluid sampling tool; an optical spectrometer of the downhole formation fluid sampling tool, wherein the optical spectrometer is configured to measure an optical characteristic of a formation fluid flowing through the downhole formation fluid sampling tool over a plurality of wavelengths and configured to generate optical spectra data indicative of the optical characteristic; and a processor configured to receive the optical spectra data generated by the optical spectrometer, to predict a parameter corresponding to one component of multiple components of the formation fluid based on the optical spectra data, and to calculate an uncertainty in the predicted parameter based on the optical spectra data.