  We describe a technique for reconstruction of the four-dimensional transverse
phase space of a beam in an accelerator beamline, taking into account the
presence of unknown errors on the strengths of magnets used in the data
collection. Use of machine learning allows rapid reconstruction of the
phase-space distribution while at the same time providing estimates of the
magnet errors. The technique is demonstrated using experimental data from
CLARA, an accelerator test facility at Daresbury Laboratory.
