One or both of two methods and systems are used to determine concentration of a known material in an unknown mixture on the basis of the measured interaction of electromagnetic waves upon the mixture. One technique is to utilize a multivariate analysis patch technique to develop a library of optimized patches of spectral signatures of known materials containing only those pixels most descriptive of the known materials by an evolutionary algorithm. Identity and concentration of the known materials within the unknown mixture is then determined by minimizing the residuals between the measurements from the library of optimized patches and the measurements from the same pixels from the unknown mixture. Another technique is to train a neural network by the genetic algorithm to determine the identity and concentration of known materials in the unknown mixture. The two techniques may be combined into an expert system providing cross checks for accuracy.