The machine-learning techniques have shown their capability for studying phase transitions in condensed matter physics. Here, we employ the machine-learning techniques to study the nuclear liquid-gas phase transition. We adopt an unsupervised learning and classify the liquid and gas phases of nuclei directly from the final state raw experimental data of heavy-ion reactions. Based on a confusion scheme which combines the supervised and unsupervised learning, we obtain the limiting temperature of the nuclear liquid-gas phase transition. Its value $9.24pm0.04~rm MeV$ is consistent with that obtained by the traditional caloric curve method. Our study explores the paradigm of combining the machine-learning techniques with heavy-ion experimental data, and it is also instructive for studying the phase transition of other uncontrollable systems, like QCD matter.