Machine learning and cosmological simulations – I. Semi-analytical models | Synapse