  Complex behavior poses challenges in extracting models from experiment. An
example is spin liquid formation in frustrated magnets like Dy$_2$Ti$_2$O$_7$.
Understanding has been hindered by issues including disorder, glass formation,
and interpretation of scattering data. Here, we use a novel automated
capability to extract model Hamiltonians from data, and to identify different
magnetic regimes. This involves training an autoencoder to learn a compressed
representation of three-dimensional diffuse scattering, over a wide range of
spin Hamiltonians. The autoencoder finds optimal matches according to
scattering and heat capacity data and provides confidence intervals. Validation
tests indicate that our optimal Hamiltonian accurately predicts temperature and
field dependence of both magnetic structure and magnetization, as well as glass
formation and irreversibility in Dy$_2$Ti$_2$O$_7$. The autoencoder can also
categorize different magnetic behaviors and eliminate background noise and
artifacts in raw data. Our methodology is readily applicable to other materials
and types of scattering problems.
