Multivariate statistics is the standard instrument to analyze the data of chemical sensor arrays. However, the non-reproducibility of sensors and in some cases the drift of signals make the prediction of multivariate classifiers rather uncertain. In recent years, adaptive classifiers that can follow the evolution of sensor signals have been introduced for many pattern recognition applications. The performance of these methods is sometimes strongly dependent on the frequency of class occurrence of the problem. In particular, the adaptation fails for those classes characterized by a scarce rate of occurrence. But for chemical sensor arrays the detection of such classes is often the goal of the application. A suggestion to overcome this problem is offered by a set of algorithm inspired by the natural immune system. In this paper a modified version of an Artificial Immune System algorithm is introduced. This algorithm can achieve a classification model that is substantially immune to the drift of the sensors. Noteworthy, the immunity is independent from the occurrence frequency of the classes of the problem. The algorithm properties are demonstrated with both synthetic and real data. In the case of real data a 5 classes problem with an array of metal-oxide gas sensors operated for 18 months has been considered. © 2012 Elsevier B.V. All rights reserved.