Understanding Deregulated Retail Electricity Markets In The Future: A Perspective From Machine Learning And Optimization