Methodological framework for energy management by intelligent data analytics