Understanding the Magnetic Microstructure through Experiments and Machine Learning Algorithms