ABSTRACT We use sparse regression methods (SRMs) to build accurate and explainable models that predict the stellar mass of central and satellite galaxies as a function of properties of their host dark matter haloes. SRMs are machine learning algorithms that provide a framework for modelling the governing equations of a system from data. In contrast with other machine learning algorithms, the solutions of SRM methods are simple and depend on a relatively small set of adjustable parameters. We collect data from 35 459 galaxies from the EAGLE simulation using 19 redshift slices between z = 0 and z = 4 to parametrize the mass evolution of the host haloes. Using an appropriate formulation of input parameters, our methodology can model satellite and central haloes using a single predictive model that achieves the same accuracy as when predicted separately. This allows us to remove the somewhat arbitrary distinction between those two galaxy types and model them based only on their halo growth history. Our models can accurately reproduce the total galaxy stellar mass function and the stellar mass-dependent galaxy correlation functions (ξ(r)) of EAGLE. We show that our SRM model predictions of ξ(r) is competitive with those from subhalo abundance matching and might be comparable to results from extremely randomized trees. We suggest SRM as an encouraging approach for populating the haloes of dark matter only simulations with galaxies and for generating mock catalogues that can be used to explore galaxy evolution or analyse forthcoming large-scale structure surveys.