Drift correction for pattern classification with neural networks