A two-stage neural network classifier for condition-based maintenance in wireless sensor networks