Predictive analytics for machinery