Outlier detection method based on affinity density peak clustering

By employing principal component analysis and affinity density peak clustering, the high time and space costs of the DPC algorithm on high-dimensional datasets are addressed, achieving efficient and stable outlier detection, adapting to multi-density clusters, and improving detection accuracy.

CN121009356APending Publication Date: 2025-11-25YANSHAN UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511173910.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-21
Publication Date
2025-11-25

AI Technical Summary

Technical Problem

Existing DPC algorithms generate distance matrices when calculating local density, which increases the space and time costs of the algorithm. They are also highly sensitive to truncation distances, leading to unstable clustering results. Furthermore, the time consumption increases significantly on high-dimensional datasets. They also ignore the local structure of data objects, resulting in information loss and decreased detection accuracy.

Method used

A method based on affinity density peak clustering is adopted. Principal component analysis is used to reduce dimensionality, calculate the average distance between nearest affinity points and the relative distance between clusters, and combine local affinity density and cluster distance metrics to propose an affinity density peak clustering outlier factor, which automatically selects cluster centers and avoids global search and manual setting of cutoff distance.

Benefits of technology

It effectively alleviates the curse of dimensionality, reduces time costs, improves the accuracy and stability of outlier detection, adapts to multi-density clusters, and maintains low complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121009356A_ABST
    Figure CN121009356A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of outlier detection in data mining, and provides an outlier detection method based on affinity density peak clustering, which fully considers neighbor distribution information of an area where a data object is located, and brings the density condition of the area where the data object is located into local density calculation; after an original data set is clustered, different distance measurement indexes are used according to different local density characteristics of a data object, the problem of partial outliers can be solved while the detection precision is improved, and a proposed clustering relative distance considers the relationship between the data object and a clustering center position; the outlier degree of the data can be accurately quantified by combining the two indexes to calculate the affinity density peak clustering outlier factor, and a reliable judgment basis is provided for outlier detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of outlier detection technology in data mining, specifically involving an outlier detection method based on affinity density peak clustering. Background Technology

[0002] Outlier detection technology has developed over decades, resulting in numerous representative algorithms. Among these, unsupervised outlier detection algorithms are favored by researchers due to their ease of use, lack of pre-trained models, and strong scalability. In unsupervised detection algorithms, density-based and clustering-based algorithms have become research hotspots due to their efficiency, convenience, and outstanding detection results. Density-based detection methods typically calculate the local density of each data object using a predefined density concept. They determine whether a data object is an outlier based on the density characteristics of its surrounding area and the degree of density difference from its neighbors. Outliers are usually far from dense areas, and their deviation from normal patterns means their density is typically lower than that of normal data objects. With the deepening of research and practice, clustering-based outlier detection methods are increasingly valued by the academic community due to their ease of operation and good algorithm transferability, gradually developing into a groundbreaking research direction in this field. The operational process of this type of method involves clustering the dataset, amplifying the feature differences between different types of data objects. Normal data objects generally exhibit larger and more concentrated cluster characteristics, while outliers are concentrated in a small number of data objects that deviate from normal clusters. By analyzing the basic concepts and assumptions of the two methods mentioned above, it is easy to see that they are similar to each other to a certain extent. The few data objects that deviate from normal clustering are usually distributed in sparse, low-density locations. The main research objective of this chapter is to propose an excellent outlier detection algorithm that combines the advantages of different methods.

[0003] In recent years, the DPC algorithm, based on fast search and density peak detection, has become one of the most influential clustering methods in the field of clustering algorithm research due to its shape adaptability. This algorithm can automatically cluster datasets of arbitrary shapes without pre-setting cluster shapes by identifying data density distribution characteristics. Although the DPC algorithm's clustering process is simple and efficient, it still has shortcomings. First, when calculating local density, the DPC algorithm generates a distance matrix, which greatly increases the space and time costs of the algorithm's operation. This process can significantly increase the time consumption for large-scale or high-dimensional datasets. Second, whether the DPC algorithm uses a truncated distance density kernel or a Gaussian density kernel to calculate local density, the truncated distance d needs to be manually set. cWhen there are clusters of different densities in the dataset, the sensitivity to the cutoff distance not only makes the clustering results unstable, but also leads to information loss due to ignoring the local structure of data objects, which can easily reduce the accuracy of outlier detection. Finally, the DPC algorithm searches the entire dataset when calculating the relative distance, which greatly increases the time cost. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention provides an outlier detection method based on affinity density peak clustering, thereby resolving the issues in the prior art. The technical solution adopted by this invention is as follows:

[0005] The outlier detection method based on affinity density peak clustering includes the following steps:

[0006] Step 1: Input the initial dataset arrhythmia, perform principal component analysis to reduce the dimensionality of the initial high-dimensional dataset, and obtain the dimensionality-reduced dataset D; Input the dimensionality-reduced dataset D, the nearest neighbor parameter k, the number of clusters c, and the number of outliers n;

[0007] Step 2: Obtain the cluster center set `center`, the maximum density set `MAXden`, and `c` clusters;

[0008] Step 3: Iterate through each data point x that does not belong to the maximum density set MAXden, and calculate the average distance of the nearest neighbor affinities of data point x;

[0009] Step 4, iterate through each cluster c i Calculate cluster c i The average cluster distance;

[0010] Step 5: Traverse the data points x that do not belong to the cluster center set center, and calculate the cluster relative distance and affinity density peak cluster outlier factor of data point x;

[0011] Step 6: Sort all data points in descending order based on the value of the affinity density peak clustering outlier factor, and output the top n data points as outliers.

[0012] Furthermore, in step 1, the dimensionality-reduced dataset D is obtained through the following steps:

[0013] Step 1.1, Dataset D = {x1, x2, ..., x} n}, where i = {x i1 ,x i2 ,…,x ij ,…,x im}, where n is the sample size, x ij The dataset D represents the value of sample i on feature j, expressed in matrix form:

[0014]

[0015] Centering matrix X yields matrix Y, which is represented as follows:

[0016]

[0017] The centralization formula is as follows:

[0018] Let matrix C be the covariance matrix of matrix Y, then:

[0019]

[0020] in

[0021] Eigenvalue decomposition is performed on the covariance matrix C to obtain eigenvalues ​​and corresponding unit eigenvectors. Eigenvalues ​​measure the importance of principal components, and eigenvectors represent the direction of principal components.

[0022] Sort the eigenvalues ​​in order of magnitude to get λ1≥λ2≥…≥λ p ;

[0023] Calculate the contribution rate c i c i Let represent the contribution rate of the i-th principal component, calculated using the following formula:

[0024]

[0025] Calculate the cumulative contribution rate sum k ;sum k The sum of the contribution rates of the first k principal components is represented by the following formula:

[0026]

[0027] Set a threshold α, when sum k-1 <α,sum k When ≥α, retain the first k principal components and project the original data onto a new coordinate axis composed of these k principal components.

[0028] Furthermore, in step 2, the cluster center set `center`, the maximum density set `MAXden`, and `c` clusters are obtained through the following steps:

[0029] Step 2.1, for each data point x in the initial dataset D:

[0030] Calculate the nearest neighbor affinity A using the k-nearest neighbor set and the following formula. ij :

[0031] Aij =|{KNN(x i )∩KNN(x j )|x j ∈KNN(X i )}|

[0032] Among them, data object x j Belongs to data object x i The k-nearest neighbor set KNN(x) i );

[0033] The nearest neighbor affinity density Aden is calculated using the following formula. ij :

[0034]

[0035] In the formula, dist(x) i ,x j ) represents data object x i and x j The distance between them;

[0036] Affinity density Aden is calculated using the following formula. i :

[0037]

[0038] Step 2.2, for each data point x in the initial dataset D:

[0039] The decision distance α between cluster centers is calculated using the following formula. i :

[0040] α i =dist(x i ,x j )|x j ∈KNN(x i ),k=1

[0041] When data object x i Having KNN(x i The maximum density in the set is placed into the set of maximum affinity densities, MAXden. The minimum distance to other data objects in the set is calculated and used as the data object x. i Cluster center decision distance; data object x with the highest density among k nearest neighbors. i Cluster center decision distance α i The calculation formula is as follows:

[0042] α i =min(dist(x) i ,x j ),x j ∈MAXden)

[0043] The cluster center decision parameter cen is calculated using the following formula. i :

[0044] cen i =Aden i ×α i

[0045] Obtain the cluster center decision parameter cen for each data object i Then, sort in descending order, and take the first c values. i The data object represented is determined as the cluster center, and the remaining data objects are assigned to the nearest cluster center to complete the clustering.

[0046] Step 2.3: Select the top c largest values ​​of cen from all data points. i The data is used as cluster centers and placed into the cluster center set `center`; the remaining data objects are assigned to the nearest cluster center;

[0047] Step 2.4: Complete the clustering and output the cluster center set center, the maximum density set MAXden, and c clusters.

[0048] Furthermore, in step 3, the data point x is calculated using the following formula. i Average distance between nearest neighbor affinities:

[0049]

[0050] In the formula, n is the data object x i The number of neighbors whose density is greater than its own density among the k nearest neighbors.

[0051] Furthermore, in step 4, clustering c i The average cluster distance is calculated using the following formula:

[0052]

[0053] In the formula, λ is the clustering C i The number of data contained; x c It is clustering C i Cluster center; dist(x j ,x c ) represents data object x j Distance to the cluster center of the cluster to which it belongs.

[0054] Furthermore, in step 5, the relative distance between clusters is calculated using the following formula:

[0055]

[0056] In the formula, MAXden / center refers to the data objects that have the highest density in the k-neighborhood but do not belong to the cluster center.

[0057] Furthermore, in step 5, the affinity density peak clustering outlier factor is calculated using the following formula:

[0058]

[0059] Furthermore, in step 6, the value of n is taken from the number of outliers in the dataset.

[0060] The present invention has the following beneficial effects:

[0061] This invention employs principal component analysis (PCA) to effectively mitigate the curse of dimensionality in high-dimensional datasets. To fully utilize neighborhood information, it calculates the k-nearest neighbor intersection size of each data object with its neighbors. Then, the sum of the intersection size and the ratio of the nearest neighbor distances is defined as the affinity density, replacing the density calculation in traditional density peak clustering, thus avoiding the need to manually set the cutoff distance d. c The relative distance calculation is performed only within the k-neighborhood, avoiding global search and reducing time costs. Then, the data object with the larger product of density and distance is automatically selected as the cluster center. Different distance indicators are selected according to the density distribution characteristics of the data objects, and an evaluation index based on the relative distance of clustering is proposed. By combining local affinity density and cluster distance measurement, an affinity density peak clustering outlier factor is proposed. This factor can effectively quantify the degree of anomaly of data points and identify outliers in different density regions.

[0062] This invention improves detection performance through the following four key technological innovations: (1) Principal component analysis is used to alleviate the curse of dimensionality; (2) The average distance metric of nearest neighbor affinity points is proposed to effectively distinguish boundary points from outliers; (3) A cluster relative distance index is designed to enhance adaptability to multi-density clusters; (4) Affinity density and distance features are integrated to construct an optimized affinity density peak cluster outlier factor evaluation system, which improves detection accuracy and maintains low complexity. Attached Figure Description

[0063] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

[0064] The following will be based on embodiments of the present invention. Figure 1 The technical solutions in the embodiments of the present invention will be clearly and completely described. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Unless otherwise specified, the technical means used in the embodiments are conventional means well known to those skilled in the art.

[0065] This invention proposes an outlier detection method based on affinity density peak clustering, which can better detect outliers in datasets with low-density patterns.

[0066] like Figure 1 An outlier detection method based on affinity density peak clustering includes the following steps:

[0067] Step 1: Input the initial dataset arrhythmia, perform principal component analysis to reduce the dimensionality of the initial high-dimensional dataset, and obtain the dimensionality-reduced dataset D; Input the dimensionality-reduced dataset D, the nearest neighbor parameter k, the number of clusters c, and the number of outliers n;

[0068] Step 2: Obtain the cluster center set `center`, the maximum density set `MAXden`, and `c` clusters;

[0069] Step 3: Iterate through each data point x that does not belong to the maximum density set MAXden, and calculate the average distance of the nearest neighbor affinities of data point x;

[0070] Step 4, iterate through each cluster c i Calculate cluster c i The average cluster distance;

[0071] Step 5: Traverse the data points x that do not belong to the cluster center set center, and calculate the cluster relative distance and affinity density peak cluster outlier factor of data point x;

[0072] Step 6: Sort all data points in descending order based on the value of the affinity density peak clustering outlier factor, and output the top n data points as outliers.

[0073] Furthermore, in step 1, the dimensionality-reduced dataset D is obtained through the following steps:

[0074] Step 1.1, Dataset D = {x1, x2, ..., x} n}, where x i ={x i1 ,x i2 ,…,x ij ,…,x im}, where n is the sample size, x ij The dataset D represents the value of sample i on feature j, expressed in matrix form:

[0075]

[0076] Centering matrix X yields matrix Y, which is represented as follows:

[0077]

[0078] The centralization formula is as follows:

[0079] Let matrix C be the covariance matrix of matrix Y, then:

[0080]

[0081] in

[0082] Eigenvalue decomposition is performed on the covariance matrix C to obtain eigenvalues ​​and corresponding unit eigenvectors. Eigenvalues ​​measure the importance of principal components, and eigenvectors represent the direction of principal components.

[0083] Sort the eigenvalues ​​in order of magnitude to get λ1≥λ2≥…≥λ p ;

[0084] Calculate the contribution rate c i c i Let represent the contribution rate of the i-th principal component, calculated using the following formula:

[0085]

[0086] Calculate the cumulative contribution rate sum k ;sum k The sum of the contribution rates of the first k principal components is represented by the following formula:

[0087]

[0088] Set a threshold α, when sum k-1 <α,sum k When ≥α, retain the first k principal components and project the original data onto a new coordinate axis composed of these k principal components.

[0089] Furthermore, in step 2, the cluster center set `center`, the maximum density set `MAXden`, and `c` clusters are obtained through the following steps:

[0090] Step 2.1, for each data point x in the initial dataset D:

[0091] Calculate the nearest neighbor affinity A using the k-nearest neighbor set and the following formula. ij :

[0092] A ij =|{KNN(x i )∩KNN(x j )|x j ∈KNN(x i )}|

[0093] Among them, data object x j Belongs to data object x iThe k-nearest neighbor set KNN(x) i ); Neighborly affinity A ij (neighborAffinity) refers to x i The k-nearest neighbor set KNN(x) i ) and data object x j The k-nearest neighbor set KNN(x) j The size of the intersection of ) and nearest neighbor affinity A. ij KNN(x) reflects the closeness between each data object and its nearest neighbors in anomaly datasets. i ) refers to data object x i The set of k nearest neighbors of object x. i The set of k nearest neighbors and its k nearest neighbor object x j When the intersection of the k-nearest neighbor sets is large, it can be proven that x i It is closely related to the surrounding data objects. In the case of abnormal data, normal data accounts for the majority and is more concentrated. Therefore, it has a high affinity with its neighboring data, while abnormal data, as outliers, is sparsely distributed and deviates from normal data.

[0094] The nearest neighbor affinity density Aden is calculated using the following formula. ij Aden's nearest neighbor affinity density ij (neighbor Affinitydensity) refers to data object x i and neighboring data objects x j The ratio of nearest neighbor affinity to the distance between two objects. Data object x i Regarding data object x j Aden's nearest neighbor affinity density ij The calculation method is as follows:

[0095]

[0096] In the formula, dist(x) i ,x j ) represents data object x i and x j The distance between them; in a dataset, because outliers are sparsely distributed, outliers deviate from most normal data, thus the distance between them is relatively large. This metric further enhances the difference between normal and outlier data.

[0097] Affinity density Aden is calculated using the following formula. i Affinity density (Aden) i (Affinity density) refers to the density of a data object x given a value of k. i The cumulative value of the nearest neighbor affinity density of all neighbors. Data object xi The affinity density is calculated as follows:

[0098]

[0099] Among them, Aden i It refers to data x i Affinity density is the number of common neighbors of the k nearest neighbor data objects within a unit distance around the sample data object. The closer the k nearest neighbor is to the sample point, the denser the distribution, and the greater the affinity density of the sample point. This indicates that the data object is more closely distributed with its nearest neighbor data objects and is more likely to become a cluster center. Abnormal data is difficult to become a cluster center because of its deviation from normal data.

[0100] Step 2.2, for each data point x in the initial dataset D:

[0101] The decision distance α between cluster centers is calculated using the following formula. i :

[0102] α i =dist(x i ,x j )|x j ∈KNN(x i ),k=1

[0103] When data object x i Having KNN(x i The maximum density in the set is placed into the set of maximum affinity densities, MAXden. The minimum distance to other data objects in the set is calculated and used as the data object x. i Cluster center decision distance; data object x with the highest density among k nearest neighbors. i Cluster center decision distance α i The calculation formula is as follows:

[0104] α i =min(dist(x) i ,x j ),x j ∈MAXden)

[0105] The data can be divided into multiple clusters based on its distribution. A major prerequisite for clustering algorithms is that the cluster centers are relatively far apart. The decision distance α between the cluster centers is... i This requirement can be met quite well because when data object x i Having KNN(x i When the density in a data object is the maximum, it indicates that the data object has a local maximum density, and data objects with local maximum density are generally far apart.

[0106] The cluster center decision parameter cen is calculated using the following formula. i cen i Refers to data object x i The product of affinity density and decision distance to cluster centers. Data object x i Cluster center decision parameter cen i The calculation method is as follows:

[0107] cen i =Aden i ×α i

[0108] This parameter reflects the ability of a data object to act as a cluster center, and a cluster center decision parameter cen is obtained for each data object. i Then, sort in descending order, and take the first c values. i The data object represented is determined as the cluster center, and the remaining data objects are assigned to the nearest cluster center to complete the clustering.

[0109] Step 2.3: Select the top c largest values ​​of cen from all data points. i The data is used as cluster centers and placed into the cluster center set `center`; the remaining data objects are assigned to the nearest cluster center;

[0110] Step 2.4: Complete the clustering and output the cluster center set center, the maximum density set MAXden, and c clusters.

[0111] Furthermore, in step 3, the data point x is calculated using the following formula. i Average distance between nearest neighbor affinities: NADist i (Average distance of Neighbors Affinity Point) refers to the distance between non-affinity data points x. i The average distance to data objects with a density greater than or equal to its own among its k nearest neighbors. The calculation formula is as follows:

[0112]

[0113] In the formula, n is the data object x iThe number of neighbors with a density greater than the object's own density among its k-nearest neighbors. The average distance between nearest neighbor affinity points considers the average distance between a normal data object and its nearest neighbors. Generally, outlier data objects are farther from their nearest neighbors. Affinity is a relative concept. If a point's affinity density is greater than that of its nearest neighbors, then the former can be considered closer to its k-nearest neighbor than the latter, and in this case, the former is regarded as an affinity point of the latter. By calculating the average distance to the affinity points among a data object's k-nearest neighbors, the degree of deviation between the sample point and its k-nearest neighbors can be determined. The deviation of outliers is more pronounced, and since most of their k-nearest neighbors are also their own affinity points, the average distance between the affinity points of outlier data objects will be larger.

[0114] Furthermore, in step 4, clustering c i The average cluster distance is calculated using the following formula:

[0115]

[0116] In the formula, λ is the clustering C i The number of data contained; x c It is clustering C i Cluster center; dist(x j ,x c ) represents data object x j Distance to the cluster center of the cluster to which it belongs.

[0117] Furthermore, in step 5, the relative distance between clusters is calculated using the following formula:

[0118]

[0119] In the formula, MAXden / center refers to the data objects with the highest density within k neighborhoods but not belonging to the cluster center. The relative cluster distance CRdist... i This refers to data objects x other than cluster centers. i The outlier detection distance metric is the ratio of the outlier detection distance to the average cluster distance of its respective cluster. The relative cluster distance considers that different data objects have different distributions within their k-nearest neighbors, classifying them based on density characteristics: density greater than all neighbors and density not greater than all neighbors. Using different outlier detection distance metrics for different cases can better distinguish between outliers and normal points, and also has better results for small outlier clusters.

[0120] Furthermore, in step 5, the affinity density peak clustering outlier factor is calculated using the following formula:

[0121]

[0122] The affinity density peak clustering outlier factor is an indicator for judging whether data is abnormal. The affinity density peak clustering outlier factor of abnormal data objects is greater than that of normal data objects. This is because, generally speaking, the relative cluster distance of abnormal data objects is greater than that of normal data objects, and the affinity density of abnormal data objects is less than that of normal data objects.

[0123] AOF i Refers to data object x i The outlier factor is the ratio of the relative distance between clusters to the affinity density. It is composed of both the distance index and affinity density. From a density metric perspective, this invention first calculates the affinity density of data objects within a k-neighborhood. This density utilizes the density of the region where the data object is located, combined with the distribution characteristics of its neighbors. Outliers are typically significantly different from their k-nearest neighbors and are much farther away, resulting in a lower affinity density compared to normal data objects. From a distance metric perspective, the proposed relative distance index quantifies the spatial relationship between data points and cluster centers, effectively characterizing the overall distribution characteristics of the cluster structure. It exhibits good adaptability to multi-density cluster datasets and can accurately capture the spatial distribution patterns of outliers that significantly deviate from the core region of the main cluster or are located at the cluster edge. Based on this, the affinity density peak outlier factor of this invention integrates local density features and global distance information to achieve precise quantification of the degree of outlier behavior. Its value is positively correlated with the probability of data point anomalies, providing a reliable basis for outlier identification.

[0124] Furthermore, in step 6, the value of n is taken from the number of outliers in the dataset.

[0125] In specific implementations, this invention can be used in data analysis in multiple fields, including but not limited to financial detection, network security monitoring, medical assistance, and fault early warning in industrial manufacturing.

[0126] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Any modifications, alterations, substitutions, or variations made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention shall fall within the protection scope defined by the claims of the present invention.

Claims

1. An outlier detection method based on affinity density peak clustering, characterized in that, Includes the following steps: Step 1: Input the initial dataset arrhythmia, perform principal component analysis to reduce the dimensionality of the initial high-dimensional dataset, and obtain the dimensionality-reduced dataset D; Input the dimensionality-reduced dataset D, the nearest neighbor parameter k, the number of clusters c, and the number of outliers n; Step 2: Obtain the cluster center set `center`, the maximum density set `MAXden`, and `c` clusters; Step 3: Iterate through each data point x that does not belong to the maximum density set MAXden, and calculate the average distance of the nearest neighbor affinities of data point x; Step 4, iterate through each cluster c i Calculate cluster c i The average cluster distance; Step 5: Traverse the data points x that do not belong to the cluster center set center, and calculate the cluster relative distance and affinity density peak cluster outlier factor of data point x; Step 6: Sort all data points in descending order based on the value of the affinity density peak clustering outlier factor, and output the top n data points as outliers.

2. The outlier detection method based on affinity density peak clustering according to claim 1, characterized in that, In step 1, the dimensionality-reduced dataset D is obtained through the following steps: Step 1.1, Dataset D = {x1, x2, ..., x} n }, where x i ={x i1 ,x i2 ,…,x ij ,…,x im }, where n is the sample size, x ij The dataset D represents the value of sample i on feature j, expressed in matrix form: Centering matrix X yields matrix Y, which is represented as follows: The centralization formula is as follows: Let matrix C be the covariance matrix of matrix Y, then: in Eigenvalue decomposition is performed on the covariance matrix C to obtain eigenvalues ​​and corresponding unit eigenvectors. Eigenvalues ​​measure the importance of principal components, and eigenvectors represent the direction of principal components. Sort the eigenvalues ​​in order of magnitude to get λ1≥λ2≥…≥λ p ; Calculate the contribution rate c i c i Let represent the contribution rate of the i-th principal component, calculated using the following formula: Calculate the cumulative contribution rate sum k ;sum k The sum of the contribution rates of the first k principal components is represented by the following formula: Set a threshold α, when sum k-1 <α,sum k When ≥α, retain the first k principal components and project the original data onto a new coordinate axis composed of these k principal components.

3. The outlier detection method based on affinity density peak clustering according to claim 1, characterized in that, In step 2, the cluster center set `center`, the maximum density set `MAXden`, and `c` clusters are obtained through the following steps: Step 2.1, for each data point x in the initial dataset D: Calculate the nearest neighbor affinity A using the k-nearest neighbor set and the following formula. ij : A ij =|{KNN(x i )∩KNN(x j )|x j ∈KNN(x i )}| Among them, data object x j Belongs to data object x i The k-nearest neighbor set KNN(x) i ); The nearest neighbor affinity density Aden is calculated using the following formula. ij : In the formula, dist(x) i ,x j ) represents data object x i and x j The distance between them; Affinity density Aden is calculated using the following formula. i : Step 2.2, for each data point x in the initial dataset D: The decision distance α between cluster centers is calculated using the following formula. i : α i =dist(x i ,x j )|x j ∈KNN(x i ),k=1 When data object x i Having KNN(x i The maximum density in the set is placed into the set of maximum affinity densities, MAXden. The minimum distance to other data objects in the set is calculated and used as the data object x. i Cluster center decision distance; data object x with the highest density among k nearest neighbors. i Cluster center decision distance α i The calculation formula is as follows: α i =min(dist(x i ,x j ),x j ∈MAXden) The cluster center decision parameter cen is calculated using the following formula. i : cen i =Aden i ×α i Obtain the cluster center decision parameter cen for each data object i Then, sort in descending order, and take the first c values. i The data object represented is determined as the cluster center, and the remaining data objects are assigned to the nearest cluster center to complete the clustering. Step 2.3: Select the top c largest values ​​of cen from all data points. i The data is used as cluster centers and placed into the cluster center set `center`; the remaining data objects are assigned to the nearest cluster center; Step 2.4: Complete the clustering and output the cluster center set center, the maximum density set MAXden, and c clusters.

4. The outlier detection method based on affinity density peak clustering according to claim 1, characterized in that, In step 3, the data point x is calculated using the following formula. i Average distance between nearest neighbor affinities: In the formula, n is the data object x i The number of neighbors whose density is greater than its own density among the k nearest neighbors.

5. The outlier detection method based on affinity density peak clustering according to claim 1, characterized in that, In step 4, clustering c i The average cluster distance is calculated using the following formula: In the formula, λ is the clustering C i The number of data contained; x c It is clustering C i Cluster center; dist(x j ,x c ) represents data object x j Distance to the cluster center of the cluster to which it belongs.

6. The outlier detection method based on affinity density peak clustering according to claim 1, characterized in that, In step 5, the relative distance between clusters is calculated using the following formula: In the formula, MAXden / center refers to the data objects that have the highest density in the k-neighborhood but do not belong to the cluster center.

7. The outlier detection method based on affinity density peak clustering according to claim 1, characterized in that, In step 5, the affinity density peak clustering outlier factor is calculated using the following formula:

8. The outlier detection method based on affinity density peak clustering according to claim 1, characterized in that, In step 6, the value of n is taken from the number of outliers in the dataset.

Citation Information

Cited By

  • Processing process fault monitoring method and system of cable production equipment

    CN121635094A