Machine Learning methods for long and short term energy demand forecasting