Dual-aspect model for failure forecasting in cyber-physical systems