A machine learning approach to mapping baryons on to dark matter haloes using theeagleandC-EAGLEsimulations | Synapse