The effect of the presence of Ar on the isomerization reaction HCN ⇄ CNH is investigated via machine learning. After the potential energy surface function is developed based on the CCSD(T)/aug-cc-pVQZ level abinitio calculations, classical trajectory simulations are performed. Subsequently, with the aim of extracting insights into the reaction dynamics, the obtained reactivity, that is, whether the reaction occurs or not under a given initial condition, is learned as a function of the initial positions and momenta of all the atoms in the system. The prediction accuracy of the trained model is greater than 95%, indicating that machine learning captures the features of the phase space that affect reactivity. Machine learning models are shown to successfully reproduce reactivity boundaries without any prior knowledge of classical reaction dynamics theory. Subsequent analyses reveal that the Ar atom affects the reaction by displacing the effective saddle point. When the Ar atom is positioned close to the N atom (resp. the C atom), the saddle point shifts to the CNH (HCN) region, which disfavors the forward (backward) reaction. The results imply that analyses aided by machine learning are promising tools for enhancing the understanding of reaction dynamics.