Embodiments of the present invention provide a method implemented by a computer program for detecting and identifying valve failure in a reciprocating compressor and further for predicting valve failure in the compressor. Embodiments of the present invention detect and predict the valve failure using wavelet analysis, logistic regression, and neural networks. A pressure signal from the valve of the reciprocating compressor presents a non-stationary waveform from which features can be extracted using wavelet packet decomposition. The extracted features, along with temperature data for the valve, are used to train a logistic regression model to classify defective and normal operation of the valve. The wavelet features extracted from the pressure signal are also used to train a neural network model to predict to predict the future trend of the pressure signal of the system, which is used as an indicator for performance assessment and for root cause detection of the compressor valve failures.