Classification of compact radio sources in the Galactic plane with supervised machine learning