Unsupervised machine learning approaches to the $q$-state Potts model