Dynamic Graph Learning for Dimension Reduction and Data Clustering