Machine learning for predicting battery capacity for electric vehicles