User clustering is one of the most important problems because of the difference of the frequency spectrum utilization situation from cognitive users. This paper gives the analysis result of correlation between cognitive radio users and also proposes the clustering algorithm based on this analysis. Considering the real situation, the effects of data quantization are derived and the derivation shows the performance loss could be compensated partly through the increase the number of spectrum bands. Finally, the simulation shows the proposal could perform well whether the data quantization is adopted or not. From the aspect of reliability, accuracy and adaptability, the proposed algorithm, which gives a comprehensive consideration of the spectrum environment and other factors, is more practical than the traditional clustering algorithm based on the geographic location.