In this paper, a novel method for developing a tree-like classifier which differentiates between organic and inorganic particulate matter by means of Raman spectroscopy is introduced. The algorithm is fully automatic and optimises itself without any human interaction. This method uses a tree-like structure to classify Raman spectra as a decision tree. On every knot of this tree, the optimal classifier is automatically obtained, tested and trained. The optimal classifier is an artificial neural network, linear discriminant analysis or a support vector machine, where different kernels are possible. The support vector machine is optimised by the simulated annealing method to achieve the best possible classifier. After the training, a hold-out experiment with two completely independent sets of Raman spectra was tried to show the abilities of this method for real-world application. Copyright © 2010 John Wiley & Sons, Ltd.