Quantifying and Predicting Residential Building Flexibility Using Machine Learning Methods