In the past two decades, mass spectrometry-based identification of serum proteomic patterns has emerged as a new diagnostic tool for the early detection of various types of cancers. However, due to its high dimensionality, the analysis of mass spectrometry data poses considerable challenges. Existing methods proposed for the analysis of mass spectrometry data usually consist of a number of steps. In this study, a comparatively simple but efficient method, namely, an optimal spatial filter (OSF) method, is proposed for the classification of mass spectrometry data. The newly proposed method is based on the theory of common spatial patterns (CSPs), which are widely used to classify motor imagery EEG signals in brain-computer interface (BCI) applications. The CSP method aims to find spatial filters to project the data into a new space in which optimal discrimination between classes is achieved. Although it has been shown that the CSP method performs quite well in classifying motor imagery EEG signals, it has a major drawback. In the CSP method, the between-class variance is maximized, but the minimization of within-class variance is ignored. As a result, the projected data may have large within-class variances. To overcome this problem, in this study, optimal filters are found by using the differential evolution (DE) algorithm. For the fitness function of the differential evolution algorithm, a divergence analysis is used. In the divergence analysis, both the between-class and within-class distributions of the projected data are considered. The experimental results obtained using publicly available mass spectrometry datasets showed that, when compared to existing methods, the proposed OSF method is quite simple and achieves the minimum classification error for each dataset. Furthermore, the proposed OSF method highlights the importance of certain parts of the spectra, which is highly valuable for the identification of biomarkers that lie outside the pathological pathway of the disease. (C) 2016 Elsevier B.V. All rights reserved.