Cybersecurity Assessment of Smart Grid Exposure Using a Machine Learning Based Approach