1. An artificial neural network for processing data, comprising at least one processing unit, a first processing unit including (a) at least one artificial neuronal encoder for encoding a vector into a neuronal code; (b) a means for evaluating a code deviation vector that is the deviation of a neuronal code obtained by said artificial neuronal encoder from a neuronal code average; (c) a plurality of artificial synapse memories each for storing a component of a code deviation accumulation vector; (d) a first means for evaluating a first product of a component of a code deviation accumulation vector, a masking factor, and a component of a code deviation vector; (e) an artificial nonspiking neuron processor for evaluating a first sum of first products obtained by said first means; (f) a plurality of artificial synapse memories each for storing an entry of a code covariance matrix; (g) a second means for evaluating a second product of an entry of a code covariance matrix, a masking factor, and a component of a code deviation vector; and (h) at least one artificial spiking neuron processor for evaluating a second sum of second products obtained by said second means, and for using at least said second sum and a first sum obtained by said artificial nonspiking neuron processor to evaluate a representation of a first empirical probability distribution of a component of a label of a vector that is input to said first processing unit.