Intelligent real-time prediction for energy and sensing applications