The present invention relates to a computer-implemented method and apparatus for data processing for the purpose of blind separation of nonnegative correlated pure components from smaller number of nonlinear mixtures of mass spectra. More specific, the invention relates to preprocessing of recorded matrix of mixtures spectra by robust principal component analysis, trimmed thresholding, hard thresholding and soft thresholding; empirical kernel map-based nonlinear mappings of preprocessed matrix of mixtures mass spectra into reproducible kernel Hilbert space and linear sparseness and nonnegativity constrained factorization of mapped matrices therein. Thereby, preprocessing of recorded matrix of mixtures mass spectra is performed to suppress higher order monomials of the pure components that are induced by nonlinear mixtures. Components separated by each factorization are correlated with the ones stored in the library. Thereby, component from the library is associated with the separated component by which it has the highest correlation coefficient. Value of the correlation coefficient indicates degree of pureness of the separated component. Separated components that are not assigned to the pure components from the library can be considered as candidates for new pure components. Identified pure components can be used for identification of compounds in chemical synthesis, food quality inspection or pollution inspection, identification and characterization of compounds obtained from natural sources (microorganisms, plants and animals), or in instrumental diagnostics—determination and identification of metabolites and biomarkers present in biological fluids (urine, blood plasma, cerebrospinal fluid, saliva, amniotic fluid, bile, tears, etc.) or tissue extracts.