Use the I-means algorithm to cluster the rating matrix R, divide users into m clusters, and use Pearson correlation or cosine similarity as the distance function;
(2)
For the currently active user n, calculate the distance between it and m class centers and specify m as the cluster closest to the class center;
(3)
Calculate sim (n,) in the cluster to which user n belongs, and select the k most similar users as the nearest neighbors of n;
(4)
According to the rating data of the nearest neighbor user set, weighted prediction of the unrated item rating of the current user n.