Noise data clustering method based on step-by-step sampling and media data analysis method
Processing noisy data through step-by-step sampling and robust clustering methods to construct a weak core set solves the problems of poor clustering accuracy and high complexity in the existing technology, and achieves effective noise identification in high-dimensional large-scale data and removal, improving the reliability and accuracy of data analysis.
Patent Information
- Application Number
- CN202410869755.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2024-10-01
AI Technical Summary
The existing noisy k-means clustering method has the problems of poor clustering accuracy, high algorithm complexity and inaccurate noise identification in high-dimensional large-scale data. Especially in social media data analysis, it is difficult to effectively distinguish irrelevant information or misleading information. sexual information, resulting in unreliable data analysis results.
Using a method based on step-by-step sampling, candidate center points are obtained through step-by-step random sampling, a weak core set is constructed, and the robust clustering method and threshold truncation D2-Sampling sampling method are used to gradually and iteratively process the data to reduce the impact of noise, achieving clustering.
It improves the clustering accuracy, reduces the algorithm complexity, enhances the reliability of the method, can effectively identify and remove noise points, is suitable for very large-scale noisy data sets, and improves the accuracy of data analysis.
Smart Images

Figure CN118734110A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and in particular relates to a noisy data clustering method and a media data analysis method based on step-by-step sampling. Background Art
[0002] Clustering technology is widely used in many fields, including recommendation systems, financial analysis, and data mining; the main task of clustering is to classify data objects according to their intrinsic characteristics. Through classification, it is ensured that data objects in the same group or cluster have a high degree of similarity, while data objects in different groups or clusters have obvious differences; clustering technology can be used to discover meaningful patterns or structures in a large amount of unlabeled data; the difficulty of clustering problems lies in the difficulty of finding the corresponding optimal solution within a limited polynomial time. In order to cope with the above-mentioned difficulties, researchers and engineers often use approximate algorithms or heuristic methods to solve clustering problems; common clustering methods include k-means clustering, k-median clustering, and k-center clustering.
[0003] In a complex data ecosystem, data from different sources are often affected by multiple factors, which inevitably generates data noise. The sources of this noise include calibration errors of equipment, nonlinear characteristics of sensors, interference during data transmission, or the introduction of random variables in various other complex scenarios. This inevitable noise not only reduces the quality of the data, but may also cause the algorithm to misjudge, further affecting the data-based decision-making process. In high-dimensional data and large-scale data sets, the performance of k-means clustering may be significantly affected by the presence of noise. When faced with noisy data, the stability and accuracy of the traditional k-means algorithm may be compromised, resulting in many problems, including cluster offset, cluster dispersion, or cluster merging.
[0004] In-depth research and optimization of k-means clustering under noisy data has become an urgent need in the field of data science. In the noisy k-means problem, given the data point noise parameter z, the problem allows removing up to z noise points in a given data point set and minimizing the clustering cost of the k clusters formed by the remaining data points. Currently, although there are corresponding clustering methods for the noisy k-means clustering problem, most of the existing clustering methods have multiple problems, including poor clustering accuracy, high algorithm complexity, and inaccurate noise identification; and most methods are often difficult to expand to ultra-large-scale noisy data sets.
[0005] At present, the social media data analysis method based on the above-mentioned noisy k-means clustering method also has a lot of problems, including the inability to effectively distinguish a large amount of irrelevant or misleading information that may be contained in tweets or comments, poor clustering accuracy, and low reliability of data analysis results. Summary of the invention
[0006] One of the purposes of the present invention is to provide a noisy data clustering method based on step sampling with enhanced reliability, reduced complexity and improved clustering accuracy.
[0007] A second objective of the present invention is to provide a media data analysis method including the noisy data clustering method based on step-by-step sampling.
[0008] The noisy data clustering method based on step-by-step sampling provided by the present invention comprises the following steps:
[0009] S1. Obtain noisy data;
[0010] S2. For the noisy data obtained in step S1, obtain the candidate center points corresponding to the data through step-by-step random sampling processing, and construct a partial center point set;
[0011] S3. Iteratively process the noisy data obtained in step S1, and add the processed data to the partial center point set constructed in step S2 to construct a candidate center point set;
[0012] S4. Using the candidate center point set constructed in step S3, construct a weak core set;
[0013] S5. Using the weak core set constructed in step S4, clustering the noisy data is completed by a robust clustering method;
[0014] Step S2, for the noisy data obtained in step S1, obtains candidate center points corresponding to the data through step-by-step random sampling, and constructs a partial center point set, specifically including:
[0015] The objective function is expressed by the following formula, the purpose of which is to avoid the influence of suspected noise points in the noise clustering process:
[0016]
[0017] Among them, C represents the center point set; R d represents the d-dimensional Euclidean space; In represents the set of data points after removing noise points; P represents the given data set; |In| represents the number of elements contained in the set In; |P| represents the number of elements contained in the set P; z represents the number of noise points to be discarded; d 2 (x, C) represents the distance from the data point x to the nearest center point in C, and C represents the set of currently opened center points;
[0018] (1) Randomly sample a point p from a given data set P, and use the following formula to represent the center point set C after initialization:
[0019] C={p}
[0020] (2) According to the step-by-step random sampling method, the oversampling coefficient l is sought to ensure that the following formula holds. The purpose is to increase the probability of non-noise points being selected and suppress the probability of noise points being selected:
[0021]
[0022] Among them, ε represents a given algorithm parameter, and its value range is 0 to 1;
[0023] (3) For D after amplification by sampling factor l 2 -Sampling The sampling distribution is normalized so that the sampling frequency of each data point x can be expressed by the following formula:
[0024]
[0025] in, It represents the minimum value between the distance sampling probability after being amplified by coefficient l and the probability 1; represents the sum of oversampling probabilities after being amplified by coefficient l;
[0026] D 2 -Sampling The sampling distribution is the commonly used k-means sampling distribution, through D 2 -Sampling random sampling distribution ensures that the probability of at least one normal point that is not a noise point in the sampled data is constant, and at the same time ensures that the influence of noise points can be avoided during the sampling process;
[0027] The iterative processing of the noisy data obtained in step S1 described in step S3, and adding the processed data to the partial center point set constructed in step S2 to construct a candidate center point set, specifically includes:
[0028] Iteratively process the noisy data obtained in step S1, select a number of processed data and add them to the partial center point set constructed in step S2 to construct a candidate center point set;
[0029] In each iterative process, the distance from the data point to the center set C needs to be recalculated; through iterative processing, it is ensured that the center point selected in each iteration is selected according to the set probability size, and a better data point is selected from different optimal clusters as the center point;
[0030] Repeat the iterative step sampling for βk times to obtain the candidate center set C1 of size βk;
[0031] The step S4 uses the candidate center point set constructed in step S3 to construct a weak core set, which specifically includes:
[0032] For the candidate center point set constructed in step S3, remove the z farthest data points in P, and assign all remaining data points to the center point in C1 that is closest to itself, and the weight of each center point is the number of data points assigned to the corresponding center point;
[0033] The weak core set constructed in step S4 described in step S5 is used to complete the clustering processing of the noisy data through a robust clustering method, which specifically includes:
[0034] D based on threshold truncation 2 -Sampling method (TIKmeans++ method, a weighted noise processing method, published in the machine learning conference NeurIPS2019), selects a center point each time, and repeats the selection until k center points are selected;
[0035] In the threshold truncation method, given the threshold parameter T, the threshold truncation will be performed in any distance-related processing process for any point distance d 2 (x, y) is thresholded so that the maximum value of the corresponding distance after truncation is less than or equal to the hyperparameter T. The specific formula is as follows:
[0036] d 2 (x,y)=min{d 2 (x,y),T}
[0037] The time complexity of the TIKmeans++ algorithm is nearly linear in time with respect to n. It can quickly obtain k center points and obtain an approximation ratio of 0 with a constant probability of a set size. The solution is that the number of noise points removed does not exceed (1+ε)z;
[0038] Use the following formula to calculate
[0039]
[0040] Among them, ε represents the input parameter; γ represents the constant obtained by calculation;
[0041] The present invention also provides a media data analysis method including the noisy data clustering method based on step-by-step sampling, comprising obtaining original social media basic information as noisy data to be processed; using the noisy data clustering method based on step-by-step sampling to cluster the data to be processed; classifying the social media data based on the obtained clustering results, and when classifying the social media data, excluding irrelevant or misleading information that may be contained in tweets or comments based on the information differences between the data.
[0042] The noisy data clustering method based on step-by-step sampling provided by the present invention processes the noisy data to be processed by means of step-by-step random sampling, and constructs a weak core set based on an iterative processing method to achieve classification of the noisy data; the present invention also provides a media data analysis method including the noisy data clustering method based on step-by-step sampling; the reliability of the method of the present invention is enhanced, the complexity is reduced, and the clustering accuracy is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 The figure is a schematic diagram of the method flow of the present invention.
[0044] Figure 2 Schematic diagram of the running time, clustering effect and noise recognition accuracy of the method of the present invention under the SIFT data set.
[0045] Figure 3 The figure is a flow chart of a media data analysis method including the method of the present invention. DETAILED DESCRIPTION
[0046] like Figure 1 The method flow chart of the method of the present invention is shown as follows: The noisy data clustering method based on step-by-step sampling provided by the present invention comprises the following steps:
[0047] S1. Obtain noisy data;
[0048] S2. For the noisy data obtained in step S1, obtain the candidate center points corresponding to the data through step-by-step random sampling processing, and construct a partial center point set; specifically, including:
[0049] The objective function is expressed by the following formula, the purpose of which is to avoid the influence of suspected noise points in the noise clustering process:
[0050]
[0051] Among them, C represents the center point set; R d represents the d-dimensional Euclidean space; In represents the set of data points after removing noise points; P represents the given data set; |In| represents the number of elements contained in the set In; |P| represents the number of elements contained in the set P; z represents the number of noise points to be discarded; d 2 (x,C) represents the distance from the data point x to the nearest center point in C;
[0052] (1) Randomly sample a point p from a given data set P, and use the following formula to represent the center point set C after initialization:
[0053] C={p}
[0054] (2) According to the step-by-step random sampling method, the oversampling coefficient l is sought to ensure that the following formula holds. The purpose is to increase the probability of non-noise points being selected and suppress the probability of noise points being selected:
[0055]
[0056] Among them, ε represents a given algorithm parameter, and its value range is 0 to 1;
[0057] (3) For D after amplification by sampling factor l 2 -Sampling The sampling distribution is normalized so that the sampling frequency of each data point x can be expressed by the following formula:
[0058]
[0059] in, It represents the minimum value between the distance sampling probability after being amplified by coefficient l and the probability 1; represents the sum of oversampling probabilities after being amplified by coefficient l;
[0060] D 2 -Sampling The sampling distribution is the commonly used k-means sampling distribution, through D 2 -Sampling random sampling distribution ensures that the probability of at least one normal point that is not a noise point in the sampled data is constant, and at the same time ensures that the influence of noise points can be avoided during the sampling process;
[0061] S3. Iteratively process the noisy data obtained in step S1, and add the processed data to the partial center point set constructed in step S2 to construct a candidate center point set; specifically, it includes:
[0062] Iteratively process the noisy data obtained in step S1, select a number of processed data and add them to the partial center point set constructed in step S2 to construct a candidate center point set;
[0063] In each iterative process, the distance from the data point to the center set C needs to be recalculated; through iterative processing, it is ensured that the center point selected in each iteration is selected according to the set probability size, and a better data point is selected from different optimal clusters as the center point;
[0064] Repeat the iterative step sampling for βk times to obtain the candidate center set C1 of size βk;
[0065] S4. Using the candidate center point set constructed in step S3, construct a weak core set; specifically, including:
[0066] For the candidate center point set constructed in step S3, remove the z farthest data points in P, and assign all remaining data points to the center point in C1 that is closest to itself, and the weight of each center point is the number of data points assigned to the corresponding center point;
[0067] S5. Using the weak core set constructed in step S4, clustering processing of noisy data is completed through a robust clustering method; specifically, the method includes:
[0068] D based on threshold truncation 2 -Sampling method (TIKmeans++ method, a weighted noise processing method, published in the machine learning conference NeurIPS2019), selects a center point each time, and repeats the selection until k center points are selected;
[0069] In the threshold truncation method, given the threshold parameter T, the threshold truncation will be performed in any distance-related processing process for any point distance d 2 (x, y) is thresholded so that the maximum value of the corresponding distance after truncation is less than or equal to the hyperparameter T. The specific formula is as follows:
[0070] d 2 (x,y)=min{d 2 (x,y),T}
[0071] The time complexity of the TIKmeans++ algorithm is nearly linear in time with respect to n. It can quickly obtain k center points and obtain an approximation ratio of 0 with a constant probability of a set size. The solution is that the number of noise points removed does not exceed (1+ε)z;
[0072] Use the following formula to calculate
[0073]
[0074] Among them, ε represents the input parameter; γ represents the constant obtained by calculation;
[0075] The method of the present invention selects a real data set SIFT for testing, the data set includes 100000000 integer data, each data has 128 features, and is randomly generated by Gaussian distribution; in the experiment, the parameter ε is set to 0.1; Figure 2 The figure shows the running time, clustering effect and noise recognition accuracy of the method of the present invention under the SIFT data set. Figure 2 It shows the running time, clustering quality and noise recognition accuracy of the method of the present invention under the condition of a fixed k value, when the number of noise points is 1% to 10% of the total data volume of the data set and the noise amplitude is 5;
[0076] like Figure 3 The figure is a flow chart of a media data analysis method including the method of the present invention: The present invention also provides a media data analysis method including the noisy data clustering method based on step-by-step sampling, comprising obtaining original social media basic information as noisy data to be processed; clustering the data to be processed using the noisy data clustering method based on step-by-step sampling; classifying the social media data based on the obtained clustering results, and at the same time, when classifying the social media data, excluding irrelevant or misleading information that may be contained in tweets or comments based on the information differences between the data.
[0077] The method of the present invention is described by selecting the following examples:
[0078] 1. Social Media Platforms:
[0079] There is a social media platform that needs to collect tweets or comments for user system recommendation analysis. In the process of collecting tweets or comments, there may be a large amount of irrelevant or misleading information, which is defined as "noise data". Noise can be classified into the following two types: ① irrelevant information: comments that are completely irrelevant to the platform topic; ② misleading information: erroneous information that is contrary to objective logic and mainstream values. In view of such situations, a media data analysis and processing method including the method of the present invention is used, which specifically includes the following steps:
[0080] 1-1) Collect original social media data information. The basic information of social media data includes gender, age, geographic location, and number of followers of the commentator. The basic information of social media data is used as noisy data to be classified. The noise comes from irrelevant information, including comments that are completely irrelevant to the platform topic; or misleading information, including erroneous information that goes against objective logic and mainstream values;
[0081] 1-2) Clustering the noisy data to be classified using the method of the present invention; finding the noise points in the data during the clustering process and discarding the noise points; forming the social media data of similar situations into the same cluster, and discarding the remaining outliers as irrelevant or misleading information;
[0082] 1-3) According to the classification results described in step 1-2), the basic information of the social media data is classified;
[0083] After the above steps, the social media data clustering result with noise points removed is finally obtained, which is used to help social media platforms better analyze user structure.
[0084] The media data analysis method including the method of the present invention can also be applied to e-commerce and consumer behavior analysis; consumers' purchase history and browsing history may be affected by temporary promotions, accidental events or other noises; using the noisy -mean clustering method, e-commerce platforms can more accurately group users and thus carry out more targeted marketing activities.
[0085] 2. E-commerce and consumer behavior analysis:
[0086] The media data analysis method including the method of the present invention provides an e-commerce and consumer behavior analysis method based on outlier detection, which can ensure high-quality user grouping results, thereby improving the marketing plan design of the e-commerce platform, specifically including:
[0087] 2-1) Obtaining user transaction data from e-commerce platforms;
[0088] 2-2) performing feature abstraction and feature extraction on the transaction data provided in step 2-1); using the transaction data information obtained in step 2-1) as noisy data to be clustered;
[0089] 2-3) Using the media data analysis method of the step-by-step sampling-based noisy data clustering method of the present invention, data clustering is performed on the clustered data; in the clustering process, noise points in the data are found and discarded; data of similar situations are clustered into the same cluster, and the remaining outliers are regarded as noise points and classified into another category;
[0090] 2-4) Based on the classification results obtained in step 2-3), the e-commerce platform can not only more effectively process and analyze the noise in the consumer behavior data, but also more accurately identify and meet the needs of consumers, thereby achieving more targeted marketing strategies and higher conversion rates;
[0091] The above-mentioned social media data analysis cases and e-commerce and consumer behavior analysis cases can be similarly extended to traditional industrial fields, including in environmental monitoring, industrial automation or intelligent transportation systems. Sensor data is often interfered by environmental noise, equipment aging or other external factors. Noisy clustering methods can help identify real data patterns, thereby improving the decision-making quality of the system; in geographic information systems (GIS), remote sensing data may be affected by atmospheric conditions and equipment errors. Noisy clustering methods can help identify landforms, vegetation types or other environmental features.
Claims
1. A noisy data clustering method based on step sampling, comprising the following steps: S1. Obtain noisy data; S2. For the noisy data obtained in step S1, obtain the candidate center points corresponding to the data through step-by-step random sampling processing, and construct a partial center point set; S3. Iteratively process the noisy data obtained in step S1, and add the processed data to the partial center point set constructed in step S2 to construct a candidate center point set; S4. Using the candidate center point set constructed in step S3, construct a weak core set; S5. Use the weak core set constructed in step S4 to complete the clustering processing of noisy data through a robust clustering method.
2. The noisy data clustering method based on step sampling according to claim 1 is characterized in that Step S2, for the noisy data obtained in step S1, obtains candidate center points corresponding to the data through step-by-step random sampling, and constructs a partial center point set, specifically including: The objective function is expressed by the following formula: Among them, C represents the center point set; R d represents the d-dimensional Euclidean space; In represents the set of data points after removing noise points; P represents the given data set; |In| represents the number of elements contained in the set In; |P| represents the number of elements contained in the set P; z represents the number of noise points to be discarded; d 2 (x, C) represents the distance from the data point x to the nearest center point in C, and C represents the set of currently opened center points; (1) Randomly sample a point p from a given data set P, and use the following formula to represent the center point set C after initialization: C={p} (2) According to the step-by-step random sampling method, the oversampling coefficient l is sought to ensure that the following formula holds. The purpose is to increase the probability of non-noise points being selected and suppress the probability of noise points being selected: Among them, ε represents a given algorithm parameter, and its value range is 0 to 1; (3) For D after amplification by sampling factor l 2 -Sampling The sampling distribution is normalized so that the sampling frequency of each data point x can be expressed by the following formula: in, It represents the minimum value between the distance sampling probability after being amplified by coefficient l and the probability 1; represents the sum of oversampling probabilities after being amplified by coefficient l; By D 2 -Sampling random sampling distribution ensures that the probability of there being at least one normal point in the sampled data that is not a noise point is constant, while ensuring that the influence of noise points can be avoided during the sampling process.
3. The noisy data clustering method based on step sampling according to claim 2 is characterized in that The iterative processing of the noisy data obtained in step S1 described in step S3, and adding the processed data to the partial center point set constructed in step S2 to construct a candidate center point set, specifically includes: Iteratively process the noisy data obtained in step S1, select a number of processed data and add them to the partial center point set constructed in step S2 to construct a candidate center point set; In each iterative process, the distance from the data point to the center set C needs to be recalculated; through iterative processing, it is ensured that the center point selected in each iteration is selected according to the set probability size, and a better data point is selected from different optimal clusters as the center point; Repeat the iterative step sampling for βk times to obtain the candidate center set C1 of size βk.
4. The noisy data clustering method based on step sampling according to claim 3 is characterized in that The step S4 uses the candidate center point set constructed in step S3 to construct a weak core set, which specifically includes: For the candidate center point set constructed in step S3, remove the z farthest data points in P, and assign all remaining data points to the center point in C1 that is closest to itself, and the weight of each center point is the number of data points assigned to the corresponding center point.
5. The noisy data clustering method based on step sampling according to claim 4 is characterized in that The weak core set constructed in step S4 described in step S5 is used to complete the clustering processing of the noisy data through a robust clustering method, which specifically includes: D based on threshold truncation 2 -Sampling sampling method, select one center point each time, and repeat the selection until k center points are selected; In the threshold truncation method, given the threshold parameter T, the threshold truncation will be performed in any distance-related processing process for any point distance d 2 (x, y) is thresholded so that the maximum value of the corresponding distance after truncation is less than or equal to the hyperparameter T. The specific formula is as follows: d 2 (x,y)=min{d 2 (x,y),T} The TIKmeans++ algorithm can obtain k center points and obtain an approximation ratio of The solution is that the number of noise points removed does not exceed (1+ε)z; Use the following formula to calculate Among them, ε represents the input parameter; γ represents the constant obtained by calculation.
6. A media data analysis method comprising the step-by-step sampling-based noisy data clustering method according to any one of claims 1 to 5, characterized in that This includes obtaining original basic information of social media as noisy data to be processed; The noisy data clustering method based on step sampling as described in any one of claims 1 to 5 is used to cluster the data to be processed; social media data is classified according to the obtained clustering results, and when classifying the social media data, irrelevant or misleading information that may be contained in tweets or comments is excluded based on the information differences between the data.
