A device may receive information identifying results of a spectroscopic measurement of an unknown sample. The device may perform a first classification of the unknown sample based on the results of the spectroscopic measurement and a global classification model. The device may generate a local classification model based on the first classification. The device may perform a second classification of the unknown sample based on the results of the spectroscopic measurement and the local classification model. The device may provide information identifying a class associated with the unknown sample based on performing the second classification.