A user segmentation method based on dimensional iterative segmentation and silhouette coefficient clustering

Through a clustering algorithm based on dimensional iterative segmentation and improved silhouette coefficient, the segmentation problem of unbalanced user data sets is solved, efficient and accurate user segmentation is achieved, and the competitiveness of enterprises is improved.

CN116992318BActive Publication Date: 2025-09-16KUNMING UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310919382.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-25
Publication Date
2025-09-16
Estimated Expiration
2043-07-25

AI Technical Summary

Technical Problem

Existing clustering algorithms are difficult to efficiently and accurately segment unbalanced user data sets, resulting in inaccurate user segmentation results that cannot meet the actual needs of enterprises.

Method used

A method based on dimensional iterative segmentation and improved silhouette coefficient clustering is adopted. The user dataset is segmented by the kernel probability density function to generate compact subclusters, which are then merged using the Dijkstra algorithm and the improved silhouette coefficient model. Finally, outliers are processed through a voting mechanism to achieve user classification.

Benefits of technology

It improves the accuracy of user segmentation results, significantly reduces algorithm running time, and can efficiently and accurately segment based on user characteristics, helping companies better understand user characteristics and potential value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116992318B_ABST
    Figure CN116992318B_ABST
Patent Text Reader

Abstract

The present invention relates to a user segmentation method based on dimensional iterative segmentation and improved silhouette coefficient clustering, and belongs to the technical field of cluster analysis application. The present invention uses various basic information of users as features, first iteratively segments the data set through the kernel probability density function based on feature sorting, and processes the outliers generated in the segmentation to obtain multiple compact subclusters; secondly, each subcluster is used as a node, and the centroid distance between subclusters is used as the edge weight to construct a completely undirected graph, and the edge weight is scaled by the neighborhood interaction degree between subclusters. The Dijkstra algorithm is used to find the shortest path between subclusters to generate a distance matrix, and the subcluster density is calculated to obtain the density difference matrix between subclusters; finally, a subcluster aggregation method based on an improved silhouette coefficient measurement model is used to merge the final cluster structure, and the outliers are marked using a voting mechanism to complete clustering. The present invention effectively improves the accuracy of user segmentation results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention discloses a user segmentation method based on dimension iterative segmentation and silhouette coefficient clustering, belonging to the technical field of cluster analysis application in data mining and machine learning. Background Art

[0002] With the rapid development of information technology, data analysis has made significant progress. Clustering is the most representative tool in data analysis. Faced with the vast amount of data globally, the goal of clustering algorithm development is to efficiently and accurately mine large-scale, complex data. The development of high-performance new algorithms is becoming increasingly important for promoting social development and creating industrial value. Clustering algorithms have attracted increasing attention for their ability to provide services such as product recommendations and behavior prediction. For businesses, how to segment users based on their preferences, behaviors, and other characteristics to better provide targeted services has become a key concern.

[0003] Therefore, the present invention proposes iterative segmentation of data sets using kernel probability density functions and an improved silhouette coefficient metric model merging strategy. This makes the invention applicable to unbalanced user data sets and improves the accuracy of user segmentation results, meeting the requirements of enterprises for user segmentation results. Summary of the Invention

[0004] The present invention provides a user segmentation method based on dimensional iterative segmentation and silhouette coefficient clustering, which can be used to divide an unbalanced user data set into user segmentation groups according to various user characteristics, and has the advantage of high accuracy of the segmentation results.

[0005] The technical solution of the present invention is: first, the user data set is iteratively segmented through the kernel probability density function based on feature sorting, and the outliers generated in the segmentation are processed to obtain multiple compact subclusters; second, each subcluster is used as a node, and the centroid distance between subclusters is used as the edge weight to construct a completely undirected graph, the edge weight is scaled by the neighborhood interaction degree between subclusters, the Dijkstra algorithm is used to find the shortest path between subclusters to generate a distance matrix, and the subcluster density is calculated to obtain the density difference matrix between subclusters; finally, the final cluster structure is merged through an improved silhouette coefficient measurement model, and the outliers are marked by a voting mechanism to complete clustering and realize user classification.

[0006] The specific steps of the method are as follows:

[0007] Step 1: Take each user's data as a feature, sort the features, iteratively segment the data set using the kernel probability density function according to the feature order, and process the outliers generated during the segmentation to obtain multiple compact subclusters;

[0008] Specifically: Input user data set X={x1,x2,x3,…,x n}∈R N×d , N represents the number of users, d represents the number of features in the dataset, i.e., the number of dimensions, then Represents the data set X on the vth dimension, calculates the data variance of each dimension, sorts the dimensions from large to small, and introduces the Gaussian kernel probability density function:

[0009]

[0010] The bandwidth of each dimension The calculation formula is as follows:

[0011]

[0012] in, The variance of the data sample in the vth dimension, are the first and third quantiles, respectively;

[0013] The peaks and valleys in the function that meet the following conditions are used as cutting coordinates:

[0014]

[0015] Indicates the value of the front peak or back peak of the i-th valley. When j is 1, it means

[0016] The front peak, when j is 2, it represents the back peak. is the value of the i-th valley, l is the l-th round of cutting, t1 defaults to 10%, and range(f) is the difference between the maximum and minimum values ​​of KDE;

[0017] The dataset is divided into multiple subclusters according to the cutting coordinates, and the results are used as the input for the next segmentation. When the cycle is completed, multiple subclusters are obtained. The subclusters are processed with a box plot, and the data points far away from the cluster are removed as outliers to obtain a subcluster set CC = {cc1,cc2,...,cc m},m<n;

[0018] Step 2: Get multiple subclusters through Step 1, use the average value of each dimension of the subclusters as the cluster centroid, use the subclusters as nodes, and calculate the Euclidean distance between the two centroids. As the edge weight, Represents the value of the centroid of subcluster p in the vth dimension, generates a completely undirected graph, introduces the interaction degree between subcluster neighbors to update the edge weight, takes the ε neighborhood data of each subcluster, and performs KNN on each two areas in turn, where k is 3; the interaction degree between subcluster neighbors is recorded as Inter, which is the number of neighbors between the two clusters. If Inter≠0, the updated weight is Introduce the Dijkstra algorithm to obtain the shortest distance matrix between subclusters and calculate the subcluster density Respectively represent the minimum and maximum values ​​of the samples of sub-cluster q in the vth dimension, and obtain the density difference matrix rho between sub-clusters;

[0019] Step 3: Select the subcluster with the largest density as the representative subcluster and put it into the set rep. Put the remaining subclusters into the candidate set can. Define the improved silhouette coefficient based on the distance matrix distance and density difference matrix rho obtained in Step 2: in,

[0020]

[0021]

[0022] Among them, rho(cc g ,cc q ) represents the density difference between sub-cluster g and sub-cluster q, distance(cc g ,cc q ) represents the distance between sub-cluster g and sub-cluster q;

[0023] Merge according to the improved silhouette coefficient to obtain the final clustering result;

[0024] Step 4: Put the outliers into the clustering result C, find the k nearest neighbors of each outlier, get the labels of its neighbors, and use a voting mechanism, that is, the outlier is marked as which category has the most labels among the neighbors.

[0025] Step 3 further includes the following steps:

[0026] Step 3.1: Select the subcluster with the largest density as the representative subcluster and put it into the set rep. Put the remaining subclusters into the candidate set can. Loop through the subclusters in can, calculate the coefficient J of each subcluster, and save it to the set J-list.

[0027] Step 3.2: Add the subclusters in J-list that satisfy J ≥ th to rep, where th is the threshold;

[0028] Step 3.3: Repeat Step 3.1-Step 3.2 until no sub-clusters are added to rep, then merge the sub-clusters in rep into one cluster and store it in set C;

[0029] Step 3.4: Repeat Step 3.1-Step 3.3 until there are no subclusters in can;

[0030] Step 3.5: Get the final clustering result C.

[0031] The beneficial effects of the present invention are as follows: the present invention proposes a two-stage clustering algorithm based on first segmentation and then merging. In the segmentation stage, the probability density function based on different dimensions is used to divide the data sets with different shapes and densities; in the merging stage, the improved silhouette coefficient is used to accurately merge the subclusters. Compared with the prior art, the present invention effectively improves the accuracy of clustering results on data sets with different shapes and densities, and significantly reduces the running time of the algorithm. In addition, the algorithm can efficiently and accurately segment different users according to different user characteristics, so that the segmentation results are more in line with the actual needs of user segmentation, enabling enterprises to understand user characteristics more accurately and discover the potential value therein, thereby helping enterprises to better improve their competitiveness. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is the overall flow chart of the present invention;

[0033] Figure 2 This is an example diagram of Example 1;

[0034] Figure 3 is the instance segmentation result diagram of Example 1;

[0035] Figure 4 is the sub-cluster weighted completely undirected graph of Example 1;

[0036] Figure 5 is the distance matrix between subclusters in Example 1;

[0037] Figure 6 is the density difference matrix between subclusters in Example 1;

[0038] Figure 7 This is the instance clustering result of Example 1. DETAILED DESCRIPTION

[0039] The present invention will be further described below with reference to the accompanying drawings and specific examples.

[0040] Implementation example 1: Figure 1As shown in the figure, a user segmentation method based on iterative dimensional segmentation and silhouette coefficient clustering is proposed. First, the dataset is iteratively segmented using a kernel probability density function based on feature sorting. Outliers generated during segmentation are processed to obtain multiple compact subclusters. Second, each subcluster is used as a node, and the distance between the centroids of the subclusters is used as the edge weight to construct a completely undirected graph. The edge weights are scaled by the neighborhood interaction between the subclusters. The Dijkstra algorithm is used to find the shortest path between subclusters to generate a distance matrix, and the subcluster density is calculated to obtain the inter-subcluster density difference matrix. Finally, a subcluster aggregation method based on an improved silhouette coefficient metric model is used to merge the subclusters to obtain the final cluster structure, and a voting mechanism is used to mark outliers to complete the clustering.

[0041] The specific steps of the method are as follows:

[0042] Step 1: This example inputs the synthetic data set Aggregation, such as Figure 2 As shown, the data set is X={x1,x2,x3,…,x 788}∈R 788×2 Calculate the data variance of each dimension, sort the dimensions from large to small, and split the data starting from the first dimension according to the feature order. Represents the data set X in dimension 1. Introducing the Gaussian kernel probability density function:

[0043]

[0044] The bandwidth of each dimension The calculation formula is as follows:

[0045]

[0046] in, is the variance of the data sample in the vth dimension, The first and third quartiles, respectively.

[0047] The peaks and valleys in the function that meet the following conditions are used as cutting coordinates:

[0048]

[0049] in, Indicates the value of the front peak or back peak of the i-th valley. When j is 1, it represents the front peak, and when j is 2, it represents the back peak. is the value of the i-th valley, l is the l-th round of cutting, t1 defaults to 10%, and range(f) is the difference between the maximum and minimum values ​​of KDE.

[0050] The first-dimension segmentation result is used as the input for the next segmentation, and the cutting is continued on the second dimension. For the multiple subclusters obtained, the subclusters are processed using box plots, and the data points far away from the cluster are removed as outliers, and the subclusters with a sufficiently cohesive structure are obtained. CC = {cc1, cc2, ..., cc9}, the results are as follows Figure 3 shown.

[0051] Step 2: Obtain the sub-cluster set CC through Step 1, use the average value of the sub-cluster in each dimension as the cluster centroid, use the sub-cluster as the node, and calculate the Euclidean distance between the two centroids. As the edge weight, where Represents the value of the centroid of subcluster p in the vth dimension, generating a completely undirected graph. Introduce the interaction degree between subcluster neighbors to update the edge weight. Take the ε neighborhood data of each subcluster, and do KNN for every two areas in turn, where k is 3. The interaction degree between subcluster neighbors is recorded as Inter, which is the number of neighbors between the two clusters. If Inter≠0, the updated weight is Update results such as Figure 4 As shown. The Dijkstra algorithm is introduced to obtain the distance matrix between sub-clusters. Figure 5 As shown, and calculate the subcluster density in They represent the minimum and maximum values ​​of the samples of sub-cluster q in the vth dimension, respectively, and the density difference matrix rho between sub-clusters is obtained. The matrix result is as follows Figure 6 shown.

[0052] Step 3: Select the subcluster with the largest density as the representative subcluster and put it into the set rep, and put the remaining subclusters into the candidate set can. Based on the distance matrix distance and density difference matrix rho obtained in Step 2, define the improved silhouette coefficient: in

[0053]

[0054]

[0055] Among them, rho(cc g ,cc q ) represents the density difference between sub-cluster g and sub-cluster q, distance(cc g ,cc q ) represents the distance between sub-cluster g and sub-cluster q. The clusters are merged according to the improved silhouette coefficient to obtain the final clustering result.

[0056] Step 4: Put the outliers into the clustering result C, find the k nearest neighbors of each outlier (k is 5), get the labels of its neighbors, and use a voting mechanism. That is, the outlier with the most labels among the neighbors will be marked as the final clustering result. The final result is as follows: Figure 7 The clustering results show that the accuracy of the aggregation segmentation reaches 99.997%.

Claims

1. A user segmentation method based on dimensional iterative segmentation and improved silhouette coefficient clustering, characterized by: The specific steps are as follows: Step 1: Take each user's data as a feature, sort the features, iteratively segment the data set using the kernel probability density function according to the feature order, and process the outliers generated during the segmentation to obtain multiple compact subclusters; Specifically: Input user data set ,The user data set includes user preferences, behavioral characteristics, Indicates the number of users, Represents the number of features of the dataset, that is, the number of dimensions, then , indicating that Wei Shang For a data set, calculate the data variance of each dimension, sort the dimensions from large to small, and introduce the Gaussian kernel probability density function: ; The bandwidth of each dimension The calculation formula is as follows: ; in, The variance of the data sample in the vth dimension, , are the first and third quantiles, respectively; The peaks and valleys in the function that meet the following conditions are used as cutting coordinates: ; Indicates the The value of the peak before or after the valley, when When the value is 1, it means Front Peak, When the value is 2, it represents the post-peak. For the The value of the valley, For the Wheel cutting, The default is 10%. is the difference between the maximum and minimum values ​​of KDE; The data set is divided into multiple subclusters according to the cutting coordinates, and the results are used as the input for the next segmentation. When the cycle is completed, multiple subclusters are obtained. The subclusters are processed with a box plot, and the data points far away from the cluster are removed as outliers to obtain a subcluster with a cohesive structure. ; Step 2: Get multiple subclusters through Step 1, use the average value of each dimension of the subclusters as the cluster centroid, use the subclusters as nodes, and calculate the Euclidean distance between the two centroids. As the edge weight, Represents a subcluster The center of mass of The value of the dimension is generated to generate a completely undirected graph, and the interaction degree between sub-cluster neighbors is introduced to update the edge weight. Neighborhood data, every two neighbors are sequentially KNN, where k is 3; the interaction degree between sub-cluster neighbors is recorded as , which is the number of neighbors between two clusters. If , then the updated weight is , introduce Dijkstra algorithm to obtain the shortest distance matrix between subclusters and calculate the subcluster density , 、 Represent subclusters In the The minimum and maximum values ​​of the samples in the dimension are used to obtain the density difference matrix rho between subclusters; Step 3: Select the sub-cluster with the largest density as the representative sub-cluster and put it into the set In the , put the remaining subclusters into the candidate set In the distance matrix obtained by Step 2 and density difference matrix , define the improved silhouette coefficient: ; , ; in, Represents a subcluster With sub-cluster The density difference between Represents a subcluster With sub-cluster the distance between them; Merge according to the improved silhouette coefficient to obtain the final clustering result; Step 4: Put the outliers into the clustering result C, find the k nearest neighbors of each outlier, get the labels of its neighbors, and use a voting mechanism, that is, the outlier is marked as which category has the most labels among the neighbors.

2. The user segmentation method based on dimensional iterative segmentation and improved silhouette coefficient clustering according to claim 1, characterized in that: Step 3 also includes the following steps: Step 3.1: Select the sub-cluster with the largest density as the representative sub-cluster and put it into the set In the , put the remaining subclusters into the candidate set In the loop, traverse Neutron clusters, calculate the coefficients of each subcluster , save to collection middle; Step 3.2: In, satisfied The sub-cluster joins Among them is the threshold; Step 3.3: Repeat Step 3.1-Step 3.2 until no more sub-clusters are added In The subclusters in are merged into one cluster and stored in set C; Step 3.4: Repeat Step 3.1-Step 3.3 until There are no subclusters in ; Step 3.5: Get the final clustering result C.