Stochastic Control Of Energy Systems: A Statistical Learning Framework