Collective motion of dislocations is governed by the obstacles they encounter. In pure crystals, dislocations form complex structures as they become jammed by their anisotropic shear stress fields. On the other hand, introducing disorder to the crystal causes dislocations to pin to these impeding elements and, thus, leads to a competition between dislocation-dislocation and dislocation-disorder interactions. Previous studies have shown that, depending on the dominating interaction, the mechanical response and the way the crystal yields change. Here we employ three-dimensional discrete dislocation dynamics simulations with varying density of fully coherent precipitates to study this phase transition − from jamming to pinning − using unsupervised machine learning. By constructing descriptors characterizing the evolving dislocation configurations during constant loading, a confusion algorithm is shown to be able to distinguish the systems into two separate phases. These phases agree well with the observed changes in the relaxation rate during the loading. Our results also give insights on the structure of the dislocation networks in the two phases.