  We describe an optimal signal extraction process for imaging X-ray
polarimetry using an ensemble of deep neural networks. The initial
photo-electron angle, used to recover the polarization, has errors following a
von Mises distribution. This is complicated by events converting outside of the
fiducial gas volume, whose tracks have little polarization sensitivity. We
train a deep ensemble of convolutional neural networks to select against these
events and to measure event angles and errors for the desired gas conversion
tracks. We show how the expected modulation amplitude from each event gives an
optimal weighting to maximize signal-to-noise ratio of the recovered
polarization. Applying this weighted maximum likelihood event analysis yields
sensitivity (MDP99) improvements of ~10% over earlier heuristic weighting
schemes and mitigates the need to adjust said weighting for the source
spectrum. We apply our new technique to a selection of astrophysical spectra,
including complex extreme examples, and compare the polarization recovery to
the current state of the art.
