Learning-based Energy Consumption Prediction