Our paper presents a method for getting the diagnosis of a system. This method is based on a pattern recognition approach. Two problems have to be solved : discrimination, between different system states, detection of an evolution between a state and another one. For the first problem, we propose to use general non linear decision surfaces, based on Bayes decision rule, using a learning set. During the learning step, we construct optimal decision surfaces and evolution surfaces surrounding each class (a class representing a system state). The polynomial discriminant function is based on a non parametric estimation of probability density. There are three main interests: (i) adaptibility. (ii) it is not necessary to store the learning set in order to classify a new observation. Therefore it can be easily implemented to classify different patterns or signals, (iii) not only pattern classification can be done, but also pattern evolution between two classes can be detected.