Machine Learning Based Method for Estimating Energy Losses in Large-Scale Unbalanced Distribution Systems with Photovoltaics