We discuss a machine learning (ML) regression model to reduce the computational cost of disconnected diagrams in lattice QCD calculations. This method creates a mapping between the results of fermionic loops computed at different quark masses and flow times. The ML mapping, trained with just a small fraction of the complete data set, makes use of translational invariance and provides consistent result with comparable uncertainties over the calculation done over the whole ensemble, resulting in a significant computational gain.