The literature on electoral cycles has developed in two distinct phases. The first one considered the existence of non-rational (naive) voters whereas the second one considered fully rational voters. In our perspective, an intermediate approach is more interesting, i.e. one that considers learning voters, which are boundedly rational. In this sense, neural networks may be considered as learning mechanisms used by voters to perform a classification of the incumbent in order to distinguish opportunistic (electorally motivated) from benevolent (non-electorally motivated) behaviour. The paper shows in which circumstances a neural network, namely a perceptron, can resolve that problem of classification. This is done by considering a model allowing for output persistence, which is a feature of aggregate supply that, indeed, may make it impossible to correctly classify the incumbent.