  Magnetic materials have been applied in a large variety of technologies, from
data storage to quantum devices. The development of 2D materials has opened new
arenas for magnetic compounds, even when classical theories discourage their
examination. Here we propose a machine-learning-based strategy to predict and
understand magnetic ordering in 2D materials. This strategy couples the
prediction of the existence of magnetism in 2D materials using random forest
and the SHAP method with material maps defined by atomic features predicting
the magnetic ordering (ferromagnetic or antiferromagnetic). While the random
forest model predicts magnetism with an accuracy of 86%, the material maps
obtained by the SISSO method have an accuracy of about 90% in predicting the
magnetic ordering. Our model indicates that 3d transition metals, halides, and
structural clusters with regular transition metals sublattices have a positive
contribution in the total weight deciding the existence of magnetism in 2D
compounds. This behavior is associated with the competition between crystal
field and exchange splitting. The machine learning model also indicates that
the atomic SOC is a determinant feature for the identification of the patterns
separating ferro- from antiferro-magnetic order. The proposed strategy is used
to identify novel 2D magnetic compounds which, together with the fundamental
trends in the chemical and structural space, paves novel routes for
experimental exploration.
