PNN is often used in classification problems.<ref>[https://archive.today/20120804150441/http://www.mathworks.in/help/toolbox/nnet/ug/bss38ji-1.html{{dead link|date=September 2017 |bot=InternetArchiveBot |fix-attempted=yes }}]</ref> When an input is present, the first layer computes the distance from the input vector to the training input vectors. This produces a vector where its elements indicate how close the input is to the training input. The second layer sums the contribution for each class of inputs and produces its net output as a vector of probabilities. Finally, a compete transfer function on the output of the second layer picks the maximum of these probabilities, and produces a 1 (positive identification) for that class and a 0 (negative identification) for non-targeted classes.