Model-Based Machine Learning for the Power Grid