The weak disorder potential seen by the electrons of a two-dimensional electron gas in high-mobility semiconductor heterostructures leads to fluctuations in the physical properties and can be an issue for nanodevices. In this paper, we show that a scanning gate microscopy (SGM) image contains information about the disorder potential, and that a machine learning approach based on SGM data can be used to determine the disorder. We reconstruct the electric potential of a sample from its experimental SGM data and validate the result through an estimate of its accuracy.