On the relationship between spectroscopic constants of diatomic molecules: a machine learning approach