  We analyzed the invariant mass spectrum of near-threshold exotic states for
one-channel candidates with a deep neural network. It can extract the
scattering length and effective range, which would shed light on the nature of
given states, from the experimental mass spectrum. As an application, the mass
spectrum of the $X(3872)$ and the $T_{cc}^+$ are studied. The obtained
scattering lengths, effective ranges, and most relevant thresholds are
consistent with those from fitting to the experimental data. The advantage of
the neural network is that it is more stable than the fitting, especially for
low-statistic data. The network, which provides another way to analyze the
experimental data, can also be applied to other one-channel near-threshold
exotic candidates.
