Multi-density data classification method and system based on density stratified clustering

By identifying multi-density data regions through density-based hierarchical clustering and the DBSCAN algorithm, and combining it with a Bayesian classifier, the uncertainty problem of traditional algorithms in multi-density data classification is solved, achieving higher classification accuracy and adaptability.

CN119760453BActive Publication Date: 2025-12-30FUJIAN NORMAL UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411830721.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-12-30
Estimated Expiration
2044-12-12

AI Technical Summary

Technical Problem

Traditional clustering algorithms are not suitable for multi-density data, which leads to high classification uncertainty for Bayesian classifiers when dealing with multi-density data, making it difficult to achieve accurate classification.

Method used

A density-based hierarchical clustering method is adopted to divide the data into different density layers. In each density layer, the DBSCAN clustering algorithm is used to identify data regions, and a Bayesian classifier is used for classification.

Benefits of technology

It improves the classification accuracy and adaptability of Bayesian classifiers on multi-density data, provides flexibility and interpretability, and can better adapt to the data distribution characteristics of different density regions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760453B_ABST
    Figure CN119760453B_ABST
Patent Text Reader

Abstract

The application discloses a multi-density data classification method and system based on density stratified clustering, and belongs to the technical field of multi-dimensional data classification. The method separates data in different density layers by using a Gaussian mixture model to perform density stratification on data of each category, and then uses a DBSCAN algorithm to identify a plurality of data regions in each density layer to form sub-categories. Finally, the sub-categories are identified and summarized by using a Bayesian model, so that the classification of multi-density data is realized. The method can more accurately depict the internal structure of data, and enables the Bayesian classifier to more accurately adapt to the characteristics of different density regions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of multi-dimensional data classification technology with multi-density characteristics, specifically involving a multi-density data classification method and system based on density hierarchical clustering. Background Technology

[0002] Traditional clustering algorithms, such as spectral clustering and DBSCAN, are not suitable for multi-density data. While traditional density-based algorithms can help handle multi-density data, they typically require setting a large number of parameters, increasing the complexity of the model application and inevitably introducing classification uncertainty. For example, in water body monitoring, sensors usually collect multiple physical and biochemical indicators simultaneously, forming data with multi-dimensional characteristics. Processing this data often involves complex and diverse density distributions. If water quality anomalies occur infrequently, the collected data will naturally contain fewer data points related to that category, resulting in a data space with multi-density characteristics. Similarly, in meteorology, certain weather phenomena occur infrequently. Accurately distinguishing these less frequent weather phenomena from data with vastly different probabilities also involves classifying data with multi-density characteristics. However, this type of data presents a significant challenge for classification using Bayesian classifiers. Therefore, we need effective methods for handling multi-density distributed data, improving the classification performance of Bayesian classifiers on multi-density data, and achieving accurate classification of unknown data. Summary of the Invention

[0003] To address the problems existing in the prior art, this invention provides a multi-density data classification method and system based on density hierarchical clustering. For the classification problem of multi-density data, it utilizes density hierarchical generation to generate subclasses, and then uses a Bayesian classifier to achieve accurate classification of multi-density data.

[0004] To achieve the above-mentioned objectives, the present invention provides the following technical solution:

[0005] This invention provides a multi-density data classification method based on density-hierarchical clustering, characterized by the following steps:

[0006] Obtain a dataset with category labels, divide the original data using the original category labels, and group data with the same category labels into the same dataset, thereby obtaining multiple single-category datasets and their corresponding category labels;

[0007] The density stratification algorithm was used to predict labels and cluster the obtained single-class datasets to obtain the corresponding density stratification data and corresponding density stratification labels.

[0008] The density clustering algorithm DBSCAN is used to cluster each data layer in the obtained density-stratified data to generate new category labels.

[0009] For each single-class dataset, a new class label and a Bayesian formula are used to fit a Bayesian model, thereby achieving data classification;

[0010] For each single-class dataset, the fitted Bayesian model is used to calculate the probability that the data point to be predicted belongs to the new class, and then the probability that the data point to be predicted belongs to the original class is calculated.

[0011] For each data point to be predicted, the probability of its category is calculated, the category with the highest probability is selected as its predicted classification label, and the predicted category label is returned.

[0012] Furthermore, applying a density-based stratification algorithm to a single-class dataset includes the following steps:

[0013] Through the density formula Calculate a single-class dataset Each data point to be predicted Data density, to obtain density data ,in For single-class datasets and the data points to be predicted The closest k A set of data points Representative data points With data points The Euclidean distance;

[0014] Density data The number of models is EM fitting of Gaussian mixture distribution, calculation of ICL, number of models In 2 to T This process is performed iteratively in a loop, selecting the ICL that is maximized. As the number of Gaussian mixture models, where T The maximum number of models;

[0015] Select the optimal number of models Then, a Gaussian mixture model was used to analyze the density data. Prediction is performed to obtain new density stratification labels. , t m For a single-class dataset U m After clustering, the original data is divided into different density strata based on the model fitting results, resulting in density-stratified data. .

[0016] Furthermore, the data density is per data point Samples and k The reciprocal of the average distance to the nearest data point.

[0017] Furthermore, the Gaussian mixture distribution EM fitting EM refers to the EM algorithm, also known as the expectation-maximization algorithm, where the output of EM is a specified number of Gaussian model parameters. ICL refers to the integrated complete likelihood, and the formula for calculating ICL is as follows:

[0018] (1)

[0019] in, The degree of fit of the model, The set of data points actually observed. To estimate the best cluster label, These are the optimal parameters obtained from the maximum likelihood estimation. For the structure type of the model, To represent the number of distributions included in the mixture model, For containing K Mixture model of distributions m The number of free parameters contained For single-class datasets The number of data points to be predicted in the dataset.

[0020] Furthermore, the Gaussian mixture model is expressed as:

[0021] (2)

[0022] in, H For the number of data density layers, For the first h The parameters of a Gaussian model, ; For the first The mean of a Gaussian model, For the first The variance of a Gaussian model; It is the first h The weights of a Gaussian model, ; For the first h The probability density function of a Gaussian model. .

[0023] Furthermore, the density clustering algorithm DBSCAN uses two parameters: the neighborhood radius ε and the minimum number of neighbors MinPts. Generally, the square root of the number of data points is chosen as the metric for DBSCAN. k The value represents the average distance of the density layer. k As ε.

[0024] Furthermore, the Bayes formula used to fit the Bayesian model is:

[0025] (3)

[0026] (4)

[0027] (5)

[0028] in, It calculates the new input feature vector α in the category The posterior concept, It is an a priori concept. It is a feature In category The conditional probability under the following conditions, It is a feature In category The kernel probability density function under the given conditions; It is the conditional probability density function of Gaussian Naive Bayes. and They are categories Next j The mean and variance of each feature. It is the first i The first sample j The values ​​of each feature; It is a multivariate Gaussian Bayes decision function. and They are The mean vector and covariance matrix of class attributes, It is the first i The feature vector of each sample p It is the number of features.

[0029] Furthermore, the data points to be predicted in each density stratification data The probability of the corresponding new category is expressed as:

[0030] (6)

[0031] Data points to be predicted in each density stratification data The probability of the corresponding original category is expressed as:

[0032] (7)

[0033] in, For single-class datasets The data points to be predicted in the middle, for Belongs to a new category The probability, For the new category The prior probability, In a given new category Under these conditions, observed The probability, for The marginal probability, for Belongs to the original category The probability, For single-class datasets The total number of clusters generated after DBSCAN clustering.

[0034] This invention also provides a multi-density data classification system based on density hierarchical clustering, comprising:

[0035] Data segmentation module: Obtain labeled datasets, divide the original data using the original labels, and group data with the same labels into the same dataset, thereby obtaining multiple single-class datasets and their corresponding class labels;

[0036] Density stratification module: The density stratification algorithm is used to predict labels and cluster the obtained single-class datasets to obtain the corresponding density stratification data and corresponding density stratification labels.

[0037] DBSCAN clustering module: Clusters each data layer in the obtained density-stratified data using the DBSCAN density clustering algorithm to generate new category labels;

[0038] The Bayesian model fitting module uses new class labels and the Bayesian formula to fit a Bayesian model to classify the data for each single-class dataset. The Bayesian model can be fitted with different Bayesian classifiers, such as Naive Bayes and Gaussian Naive Bayes, depending on different prior assumptions.

[0039] Category probability calculation module: For each single-category dataset, the fitted Bayesian model is used to calculate the probability that the data point to be predicted belongs to the new category and the probability that the data point to be predicted belongs to the original category.

[0040] Category prediction module: For the data points to be predicted, perform probability calculations on the categories, select the category with the highest probability as its predicted classification label, and return the predicted category label.

[0041] Furthermore, the density stratification module includes:

[0042] Density data calculation module: Calculates the density data for each single-class dataset using the density formula;

[0043] Model Fitting and Selection Module: Performs model fitting and selects the optimal number of models based on the calculated density data;

[0044] Density layer prediction module: After selecting the optimal number of models, the density data is predicted using a Gaussian mixture model to obtain density layer labels; based on the model fitting results, the original data points are divided into different density layers to obtain density layer data.

[0045] Compared with the prior art, the present invention has the following beneficial effects:

[0046] 1. The classification method provided by this invention can effectively cope with the complexity of data distribution when dealing with multi-density data. First, it uses a Gaussian mixture model to divide the data into different density layers. After separation, clustering is performed in different density layers. The DBSCAN clustering algorithm is used to identify multiple data regions in each density layer and form subcategories, thereby more accurately characterizing the internal structure of the data. Finally, a fitted Bayesian model is used to identify and summarize the subcategories, thereby achieving classification of multi-density data. This allows Bayesian classification to more accurately adapt to the characteristics of different density regions, thus achieving accurate classification of multi-density data. This invention fully considers the local density information of the data during the classification process. By performing local density estimation and hierarchical clustering on the data, it can better adapt to the data distribution characteristics of different density regions and improve the classifier's adaptability and generalization ability.

[0047] 2. The method and classification system provided by this invention have high flexibility and interpretability. The parameters of density-based hierarchical clustering and the parameters of the Bayesian classifier can be flexibly selected according to actual conditions to adapt to the needs of different datasets and tasks. Furthermore, since this invention uses a Bayesian classifier for classification, it provides interpretability of the classification results, clearly expressing the classification basis and reasoning process of the classifier, making the classification results more convincing and credible. Attached Figure Description

[0048] Figure 1 A comparison of the classification performance of traditional Bayesian classification and the Bayesian classification of density hierarchical clustering of this invention for four synthetic datasets;

[0049] Figure 2 This is a schematic diagram of the principle architecture of the multi-density data classification system based on density hierarchical clustering of the present invention;

[0050] Figure 3 This is a schematic diagram of the density layering algorithm used in the density layering module of this invention. Detailed Implementation

[0051] The principles and spirit of the invention will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are given merely to enable those skilled in the art to better understand and implement the invention, and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided to make this disclosure more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.

[0052] According to an embodiment of the present invention, a multi-density data classification method and system based on density hierarchical clustering is proposed. The method decomposes complex data into different density layers and then performs clustering in different density layers. Finally, the subclasses are summarized to form the final accurate classification.

[0053] Example 1

[0054] This embodiment provides a multi-density data classification method based on density hierarchical clustering, including the following steps:

[0055] S1. Data Splitting: Obtaining labeled datasets Using the original label For the original data The data is divided into multiple single-class datasets by grouping data with the same label into the same dataset. and the corresponding category tags ;in, n For the sample size, h For the number of tags, C There are no duplicate tags in the text;

[0056] S2, Density Stratification: For the obtained single-class dataset... Label prediction and clustering were performed using density stratification algorithms respectively, resulting in corresponding density stratification data. and corresponding density stratification labels ,in, middle For single-class datasets The number of clusters after clustering ;

[0057] The density stratification algorithm is as follows:

[0058] First, for single-class datasets Through the density formula Calculate a single-class dataset Each data point to be predicted Data density, data density per data point Samples and k The reciprocal of the average distance to the nearest data point, obtained through the formula... Obtain density data , ,in, for The number of data points to be predicted in the data. For single-class datasets and the data points to be predicted The closest k A set of data points Representative data points With data points The Euclidean distance;

[0059] Secondly, regarding density data The number of models is EM fitting of Gaussian mixture distribution, calculation of ICL, number of models In 2 to T This process is performed iteratively in a loop, selecting the ICL that is maximized. As the number of Gaussian mixture models, where T The maximum number of models;

[0060] In the Gaussian mixture distribution EM fitting, the output of EM is a specified number of Gaussian model parameters. ICL refers to the integrated complete likelihood, and the formula for calculating ICL is as follows:

[0061] (1)

[0062] in, The degree of fit of the model, The set of data points actually observed. To estimate the best cluster label, These are the optimal parameters obtained from the maximum likelihood estimation. For the structure type of the model, To represent the number of distributions included in the mixture model, For containing K Mixture model of distributions m The number of free parameters contained For single-class datasets The number of data points to be predicted in the data;

[0063] Finally, select the optimal number of models. Then, a Gaussian mixture model was used to analyze the density data. Prediction is performed to obtain new density stratification labels. Based on the model fitting results, the original data is divided into different density layers to obtain density-layered data. ;

[0064] The Gaussian mixture model is represented as follows:

[0065] (2)

[0066] in, H For the number of data density layers, For the first h The parameters of a Gaussian model, ; For the first The mean of a Gaussian model, For the first The variance of a Gaussian model; It is the first h The weights of a Gaussian model, ; For the first h The probability density function of a Gaussian model. ;

[0067] S3 and DBSCAN clustering: Clustering the obtained density-stratified data. Each data layer in the dataset is further clustered using the density clustering algorithm DBSCAN to generate new category labels. ,in, , For single-class datasets The total number of clusters generated after DBSCAN clustering ;

[0068] The density-based clustering algorithm DBSCAN uses two parameters: the neighborhood radius ε and the minimum number of neighbors MinPts. Typically, the square root of the number of data points is chosen as the parameter for DBSCAN. k The value represents the average distance of the density layer. k As ε;

[0069] S4, Bayesian model fitting: For each single-class dataset Use new category labels And the Bayesian formula fits the Bayesian model, which uses the features of the data and prior knowledge to build a Bayesian model, thereby achieving the classification of the data. Different Bayesian classifiers, such as Naive Bayes or Gaussian Naive Bayes, can be used according to different prior assumptions.

[0070] like Figure 1The figure shows a comparison of the classification performance of traditional Bayesian classification and the density-level hierarchical clustering Bayesian classification of this invention on four synthetic datasets. Row a represents the True label, indicating the true classification; row b represents GNB (Gaussian Naive Bayes), row c represents GNB-GDSC (Gaussian Naive Bayes in density-level hierarchical clustering), row d represents KNB (Kernel Naive Bayes), and row e represents KNB-GDSC (Kernel Naive Bayes in density-level hierarchical clustering). As can be seen from the figure, the density-level hierarchical clustering method provided in this embodiment can significantly improve the classification performance of Bayesian classifiers on multi-density datasets. Taking row b as an example, we can see that in the traditional Gaussian Naive Bayes method, due to its sensitivity to data distribution assumptions, the algorithm's performance is significantly affected, making it unable to adapt well to multi-density data, leading to a decrease in classification accuracy. In contrast, the Gaussian Naive Bayes in density-level hierarchical clustering shown in row c is not affected by the characteristics of multi-density data and still maintains high classification performance. It can better adapt to multi-density data structures, thereby improving classification accuracy and robustness.

[0071] In this embodiment, the Bayesian formula used to fit the Bayesian model is:

[0072] (3)

[0073] (4)

[0074] (5)

[0075] in, It calculates the new input feature vector α in the category The posterior concept, It is an a priori concept. It is a feature In category The conditional probability under the following conditions, It is a feature In category The kernel probability density function under the given conditions; It is the conditional probability density function of Gaussian Naive Bayes. and They are categories Next j The mean and variance of each feature. It is the first i The first sample j The values ​​of each feature; It is a multivariate Gaussian Bayes decision function. and They are The mean vector and covariance matrix of class attributes, It is the firsti The feature vector of each sample p It is the number of features;

[0076] S5. Category Probability Calculation: For each single-class dataset... Data points to be predicted The fitted Bayesian model is used to calculate the data points to be predicted. Belongs to a new category probability , change the original category Different new categories The probability is summed to obtain the data points to be predicted. Belongs to the original category probability ;

[0077] Among them, the data points to be predicted in each density stratification data The probability of the corresponding new category is expressed as:

[0078] (6)

[0079] Among them, the data points to be predicted in each density stratification data The probability of the corresponding original category is expressed as:

[0080] (7)

[0081] in, For single-class datasets The data points to be predicted in the middle, for Belongs to a new category The probability, For the new category The prior probability, In a given new category Under these conditions, observed The probability, for The marginal probability, for Belongs to the original category The probability, For single-class datasets The total number of clusters generated after DBSCAN clustering;

[0082] S6. Category Prediction: For the data points to be predicted... Perform class probability calculation, select the class with the highest probability as its predicted class label, and return the predicted class label.

[0083] To verify the effectiveness of the above classification method, this embodiment uses precipitation data with multi-density characteristics for method verification. Meteorological observations at weather stations typically include measurements of meteorological elements such as temperature, air pressure, relative humidity, wind speed, wind direction, and rainfall. Between 5:00 and 8:00 AM, many stations' rain gauges record 0.1 mm of precipitation. This precipitation could be genuine, or it could be due to factors such as dew causing the rain gauge to record precipitation; this is commonly referred to as false precipitation. At national meteorological stations, monitoring data from weather phenomena instruments can be used to assist in determining whether precipitation is genuine or false. However, general regional automatic weather stations only collect a few elements such as temperature, air pressure, relative humidity, wind speed, wind direction, and rainfall, making it impossible to determine whether precipitation is genuine or false. To differentiate between 0.1 mm precipitation from automatic weather stations (i.e., whether it's genuine or false precipitation), we summarized a method for determining genuine and false precipitation from the 0.1 mm precipitation data of national meteorological stations and then extended it to regional meteorological stations. In most cases, 0.1 mm of precipitation can occur in multiple ways. Some occurrences are less frequent and have low data density, while others occur more frequently and have high data density. This results in real and fake precipitation data having multiple density characteristics, which poses a significant challenge to classifying the data using a Bayesian classifier.

[0084] Using the classification method of this embodiment, assuming the input dataset... Each data point in the dataset contains five attributes: temperature, air pressure, relative humidity, wind speed, and wind direction. Z-score normalization is applied to each attribute of this dataset to obtain the dataset... The corresponding tag is 'n' represents the total number of data entries, and each data entry... These represent the observed values ​​of five meteorological elements, labeled... The value can be 0 or 1, representing real precipitation and false precipitation, respectively.

[0085] Data segmentation: Using the original labels to segment the data Divided into and , representing the true precipitation dataset and the false precipitation dataset, respectively;

[0086] Density stratification: for the obtained single-class dataset and Density stratification algorithms were used for label prediction and clustering to obtain the corresponding density stratification data and corresponding density stratification labels.

[0087] Through the density formula Calculate a single-class dataset and Each data point to be predicted Data density, to obtain density data and ,in, For density data The number of data points in the data. For density data The number of data points in the data. For single-class datasets and the data points to be predicted The closest k A set of data points Representative data points With data points The Euclidean distance in this application k The value is 10, and the data density is per data point. Samples and k = The reciprocal of the average distance to the 10 nearest data points;

[0088] Density data and The number of models is respectively The mixture Gaussian distribution EM is fitted, and the ICL is calculated using the above formula (1). The number of models is... In 2 to T This process is performed iteratively in a loop, selecting the maximum ICL each time. and As the number of Gaussian mixture models, where T This is the maximum number of models, which is set to 5 in this application.

[0089] Select the optimal number of models and Then, a Gaussian mixture model was used to analyze the density data. and For prediction, the Gaussian mixture model uses the above formula (2) to obtain new density stratification labels. and The dataset is then fitted based on the model results. Data points in The data was divided into different density layers to obtain density layer data. and ;

[0090] DBSCAN Clustering: The DBSCAN density-based clustering algorithm is used to cluster the data at each density level. DBSCAN uses two parameters: the neighborhood radius ε and the minimum number of neighbors MinPts. In this application, ε is set to 3 and MinPts to 6, generating new class labels. and ,in, For single-class datasets The total number of clusters generated after DBSCAN clustering For single-class datasets The total number of clusters generated after DBSCAN clustering;

[0091] Bayesian model fitting: Based on the new category labels, fit the Bayesian model using the Bayesian formula; the above Bayesian formulas (3) and (4) are used in this application.

[0092] Category probability calculation: Calculate the single-category data using the above formula (6). and Data points in each density stratification data The probability of the corresponding new category and Then, the calculation is performed using formula (7). The probability of it being real precipitation or false precipitation.

[0093] Example 2

[0094] like Figure 2 and 3 As shown, this embodiment provides a multi-density data classification system based on density hierarchical clustering, including:

[0095] Data segmentation module: Obtain labeled datasets, divide the original data using the original labels, and group data with the same labels into the same dataset, thereby obtaining multiple single-class datasets and their corresponding class labels;

[0096] Density stratification module: The density stratification algorithm is used to predict labels and cluster the obtained single-class datasets to obtain the corresponding density stratification data and corresponding density stratification labels.

[0097] The density stratification module includes:

[0098] Density data calculation module: Calculates the density data for each single-class dataset using the density formula;

[0099] Model Fitting and Selection Module: Performs model fitting and selects the optimal number of models based on the calculated density data;

[0100] Density layer prediction module: After selecting the optimal number of models, the density data is predicted using a Gaussian mixture model to obtain density layer labels; based on the model fitting results, the original data points are divided into different density layers to obtain density layer data;

[0101] DBSCAN clustering module: Clusters each data layer in the obtained density-stratified data using the DBSCAN density clustering algorithm to generate new category labels;

[0102] The Bayesian model fitting module uses new class labels and the Bayesian formula to fit a Bayesian model to classify the data for each single-class dataset. The Bayesian model can be fitted with different Bayesian classifiers, such as Naive Bayes and Gaussian Naive Bayes, depending on different prior assumptions.

[0103] Category probability calculation module: For each single-category dataset, the fitted Bayesian model is used to calculate the probability that the data point to be predicted belongs to the new category and the probability that the data point to be predicted belongs to the original category.

[0104] Category prediction module: For the data points to be predicted, perform probability calculations on the categories, select the category with the highest probability as its predicted classification label, and return the predicted category label.

[0105] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0106] This invention is described with reference to flowchart illustrations and / or block diagrams of methods and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0107] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0108] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0109] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A multi-density data classification method based on density stratified clustering, characterized in that, The method comprises the following steps: Obtain a data set with category labels, each data in the data set containing five attributes, namely air temperature, air pressure, relative humidity, wind speed and wind direction; Divide the original data using the original category labels, and divide data with the same category label into the same data set, thereby obtaining multiple single-category data sets and corresponding category labels, the category labels taking values of 0 or 1, representing true precipitation and false precipitation respectively; Use the density layering algorithm to predict and cluster the obtained single-category data sets respectively, to obtain corresponding density layering data and corresponding density layering labels; Use the density clustering algorithm DBSCAN to cluster each data layer in the obtained density layering data, to generate new category labels; Fit a Bayesian model for each single-category data set using the new category labels and the Bayesian formula, thereby realizing classification of the data; Calculate the probability of a to-be-predicted data point belonging to a new category using the fitted Bayesian model, and then calculate the probability of the to-be-predicted data point belonging to the original category; Select the category with the maximum probability as the predicted classification label of the to-be-predicted data point, and return the predicted category label; The density layering algorithm used for the single-category data set comprises the following steps: by the density formula computing a single-class data set of each data point to be predicted data density of each data point and k the reciprocal of the average distance of the nearest data points, obtaining density data wherein is the set of the nearest data points in the single-class data set to the data point to be predicted k , represents the Euclidean distance between the data point and the data point ; on density data Perform EM fit of a mixture of Gaussian distributions with number of components b, compute ICL, number of components b is looped between 2 and T between 2 and 10, this is performed iteratively, selecting b that maximizes ICL m as the number of mixture of Gaussian components, where, T is the maximum number of components; Selecting the optimal model number b m After that, the density data is predicted by using the Gaussian mixture model , and the new density hierarchical label is obtained , for the single-class data set , the density hierarchical label of the first cluster generated after clustering, representing the second cluster, t m for the single-class data set U m The number of clusters after clustering; according to the model fitting result, the original data is divided into different density hierarchies to obtain density hierarchical data .

2. The density-based hierarchical clustering and multi-density data classification method of claim 1, wherein: The output of the EM in the EM fitting of the mixture of Gaussians is a specified number of Gaussian model parameters The formula of ICL is as follows: (1) in, The degree of fit of the model, The set of data points actually observed. To estimate the best cluster label, These are the optimal parameters obtained from the maximum likelihood estimation. For the structure type of the model, To represent the number of distributions included in the mixture model, For containing K Mixture model of distributions m The number of free parameters contained For a single-class dataset The number of data points to be predicted in the dataset.

3. The density-based hierarchical clustering and multi-density data classification method of claim 1, wherein: The Gaussian mixture model is represented as: (2) wherein, H is the data density layer, is the parameter of the h th Gaussian model, , is the mean of the h th Gaussian model, is the variance of the h th Gaussian model; is the weight of the h th Gaussian model, ; is the probability density function of the h th Gaussian model, .

4. The density-based hierarchical clustering and multi-density data classification method of claim 1, wherein: The density clustering algorithm DBSCAN uses two parameters, namely a neighborhood radius ε and a minimum number of neighbors MinPts.

5. The density-based hierarchical clustering and multi-density data classification method of claim 1, wherein: The Bayesian formula used for fitting the Bayesian model is: (3) (4) (5) wherein is the posterior concept of the new input feature vector a in class , is the prior concept, is the feature , is the conditional probability of the feature in class , is the kernel probability density function of the feature , and are the mean and variance of the th feature in class j , is the value of the i th feature of the j th sample; is the decision function of the multivariate Gaussian Bayes, and are the mean vector and covariance matrix of the class attribute, respectively, is the feature vector of the i th sample, p is the number of features.

6. The density-based hierarchical clustering and multi-density data classification method of claim 1, wherein: Predicted data points in each density slice data The probability of the corresponding new class is represented as: (6) Predicted data points in each density slice data The probability of the corresponding original class is represented as: (7) in, For a single-class dataset The data points to be predicted in the middle, for Belongs to a new category The probability, For the new category The prior probability, In a given new category Under these conditions, observed The probability, for The marginal probability, for Belongs to the original category The probability, For a single-class dataset The total number of clusters generated after DBSCAN clustering.

7. A multi-density data classification system based on density stratified clustering, characterized in that, It comprises: A data segmentation module: obtain a data set with labels, each data in the data set containing five attributes, namely air temperature, air pressure, relative humidity, wind speed and wind direction; Divide the original data using the original labels, and divide data with the same label into the same data set, thereby obtaining multiple single-category data sets and corresponding category labels; the category labels taking values of 0 or 1, representing true precipitation and false precipitation respectively; A density layering module: use the density layering algorithm to predict and cluster the obtained single-category data sets respectively, to obtain corresponding density layering data and corresponding density layering labels; A DBSCAN clustering module: use the density clustering algorithm DBSCAN to cluster each data layer in the obtained density layering data, to generate new category labels; A Bayesian model fitting module: fit a Bayesian model for each single-category data set using the new category labels and the Bayesian formula, to realize classification of the data; A category probability calculation module: calculate the probability of a to-be-predicted data point belonging to a new category using the fitted Bayesian model, and then calculate the probability of the to-be-predicted data point belonging to the original category; A category prediction module: select the category with the maximum probability as the predicted classification label of the to-be-predicted data point, and return the predicted category label; The density layering module comprises: Density data calculation module: by density formula calculates density data of each single category data set ;​ Model fitting and selection module: based on the computed density data Perform model fitting and optimal model number selection; on the density data Perform EM fitting of a mixture of Gaussian distributions with model number b, compute ICL, model number b is looped between 2 to T Perform this iteratively, select the b that maximizes the ICL m as the optimal model number, where, T is the maximum model number; the formula for the computation of ICL is as follows: ; Density layer prediction module: select the optimal model number b m After that, the density data is predicted by using the Gaussian mixture model , and the density layer label is obtained ; the original data points are divided into different density layers according to the model fitting result, and the density layer data is obtained , and the Gaussian mixture model is represented as: 。

Citation Information

Patent Citations

  • Multi-density clustering method based on connectivity coefficient

    CN117708631A

  • Building sampling method based on hierarchical clustering and feature selection

    CN118468068A