| Density peaks clustering algorithm is a kind of clustering algorithm based on density.Its principle is simple and efficient.It has good clustering effect on various types of data sets.However,the algorithm still has some defects:(1)because the definition of local density of samples cannot capture the local characteristics of samples correctly,and the definition of relative distance cannot consider the idea that the density peaks is surrounded by non-density peaks,it is difficult to find the correct density peaks in complex data sets;(2)the robustness of the algorithm allocation strategy is poor,and it is easy to produce the difference when processing complex data sets The clustering performance of the algorithm is greatly reduced due to the joint effect of matching errors.In order to improve the clustering performance of the algorithm in complex data sets and enhance the robustness of the algorithm,three improvement schemes are proposed1)A density peaks clustering algorithm based on merging multiple clusters is proposed.Use k in k nearest neighbors to replace the cutoff distance.Since k is only an integer,the algorithm parameters are easier to determine;considering the two ideas of the distance between the density peaks and the density peaks surrounded by non-density peaks,the relative distance of the samples is redefined to make the algorithm It can find the correct density peaks more accurately;define the microcluster similarity matrix through the k-nearest neighbor information of the sample,and use the microcluster similarity matrix to merge the microclusters to alleviate the problem of allocation errors that are likely to occur when the algorithm processes complex data.2)A density peaks clustering algorithm based on mutual proximity is proposed.The relative density of k-nearest neighbor samples is used to define the local density of samples,so that the local density of samples has more environmental information,so that the algorithm can better deal with multi-scale data sets;the k-nearest neighbor information of samples is used to define the degree of proximity between samples,so as to determine the similarity between samples,so that the definition of the relationship between samples is more in line with the objective logic,so as to solve the problem of joint errors.3)A density peaks clustering algorithm based on k-nearest neighbor sharing is proposed.The shared neighbors and natural neighbors of the samples are used to weight the sample similarity,and the similarity between the samples is newly defined to construct the sample similarity matrix,so that the algorithm can make full use of the sample neighbor information and more accurately describe the relationship between the samples.The allocation strategy is more robust.And use the similarity matrix definition to determine the density contribution between samples,so as to determine the local density definition method that is more in line with the objective facts,so that the algorithm can find the correct density peaks in various complex types of data sets.By improving the traditional density peaks clustering algorithm,the algorithm can better cluster complex data sets.The three nearest neighbor optimization density peaks clustering algorithms proposed in this paper are applied to the extraction of typical electricity consumption patterns of users.By clustering the electricity load curves of users,the central curve of each cluster is used as the typical electricity consumption pattern of the cluster.The extraction of typical electricity consumption patterns of users has been achieved,and a good result of extraction of typical electricity consumption patterns of users has been obtained,which provides certain technical support for the extraction of typical electricity load patterns of users. |