Heuristic data classification algorithm based on random walk strategy
Through the heuristic data classification algorithm that generates and segments the similarity chain through a random walk strategy, the classification problem of sparse data sets and complex data is solved, and efficient data classification and robustness are achieved, and it is suitable for a variety of data types.
Patent Information
- Application Number
- CN202510425076.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-07-22
AI Technical Summary
Existing classification algorithms have poor results when processing sparse data sets, making them difficult to apply to complex multi-dimensional or unstructured data, and most algorithms are improved or combined and lack innovation.
Using a heuristic data classification algorithm based on a random walk strategy, data classification is realized through preprocessing, generating similarity chains, segmenting similarity chains and determining data point labels.
This algorithm is simple and efficient, suitable for various types of data, has good generalization ability and scalability, and especially shows good robustness on sparse data sets, and its classification effect is better than traditional algorithms.
Smart Images

Figure CN120354223A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly to a heuristic data classification algorithm based on a random walk strategy. Background Art
[0002] In the current era of data and information explosion, data has become an important asset for enterprises and organizations. The scale of data continues to increase, and the need for data processing and analysis is becoming increasingly urgent. As a means of scientifically managing data, data classification has become increasingly prominent. In multiple fields such as supply chain, finance, and e-commerce, the application of data classification technology has penetrated into all aspects of business processes. For example, in the supply chain field, data classification is widely used in customer information management, risk control, and supply chain financial fraud monitoring. With the rapid development of globalization and information technology, the complexity of supply chain management has been increasing, and supply chain enterprises are also facing challenges brought about by rapid changes in market demand, diversification of supply chain links, and explosive growth of data volume. The efficient management and analysis of data are crucial for the competitiveness of enterprises. Developing new data classification algorithms to improve the efficiency and accuracy of data processing can provide more accurate support for rapid decision-making in the supply chain, which has important practical significance for enterprises in fields such as the supply chain.
[0003] Classification algorithms play a crucial role in the field of machine learning, especially in data mining and regression analysis. Classification algorithms determine the category of target data by finding the similarity and correlation between the target data and the training data of known categories, so they are also widely used to extract data with certain special feature information from big data, such as document classification and screening, social network analysis, target customer screening, abnormal event detection, multimedia data analysis, etc. According to the complexity of model composition, classification algorithms can be divided into two categories: simple single models and complex combined models. The single model has a relatively simple structure, is easy to understand and implement, but is prone to performance limitations or failures when dealing with complex data; the combined model is often obtained by specifically combining single models, which can capture non-linear relationships and complex patterns in the data, but the model is prone to overfitting, and has high computational complexity and a small applicable range.
[0004] Looking at the existing research results at home and abroad, there are still deficiencies in the following aspects: (1) The vast majority of research is based on improving existing classification algorithms or combining multiple algorithms, and there are few innovative data classification methods; (2) For sparse data sets (where the training data is less, and the data with known categories is far lower than the total data volume), most classification algorithms are often at risk of classification failure or a significant decline in effect; (3) Most classification algorithms have limited applicable data types and are difficult to effectively classify complex multi-dimensional data or unstructured data.
[0005] It should be noted that the above content belongs to the technical cognitive scope of the inventor and does not necessarily constitute the prior art. Summary of the Invention
[0006] Aiming at the deficiencies of the prior art, the present invention provides a heuristic data classification algorithm based on a random walk strategy, which solves the existing problems.
[0007] To achieve the above object, the present invention provides the following technical solution: a heuristic data classification algorithm based on a random walk strategy, including the steps of preprocessing the original data and initializing the algorithm parameters, generating a similarity chain based on the random walk algorithm, splitting the similarity chain to determine its label, and determining the label of the data point in sequence;
[0008] The specific steps are as follows:
[0009] Step 1: Preprocess the original data and initialize the algorithm parameters. Preprocessing means defining the mathematical representation of the data and normalizing the data. Initialization includes defining and setting each parameter in the algorithm;
[0010] Step 2: Generate a similarity chain based on the random walk algorithm. Set a virtual point according to the random walk algorithm. The virtual point walks among the data points according to the similarity between the data points, and records the path formed by the data points it passes through in sequence. The path generated by the walk is called a similarity chain;
[0011] Step 3: Split the similarity chain and determine its label. The original similarity chain generated in the above step is composed of several longer chains formed by data points. This step can split such longer chains into shorter chains to ensure that the features between data points in each short chain are as similar as possible;
[0012] Step 4: Determine the label of each data point.
[0013] In some embodiments, the preprocessing step is specifically as follows:
[0014] 1) Denote that the given data set X contains N data points, which are respectively: {x1, x2,..., x N-n , x N-n+1 ,..., x N}, each data point is a multi-dimensional data with V attribute values. In X, the categories of the last n data points {x N-n+1 ,..., x N} are known and n << N, and its total number is denoted as n class , where n and n class are not necessarily equal, and n ≥ n class , and the labels of the remaining N - n data points are unknown and their labels are One of them realizes data classification by determining the labels of the remaining N - n data points;
[0015] Denote the set corresponding to the data point attributes in X as i = 1, 2,... N, v = 1, 2,... V, Denote the v - th attribute value of the data point x i To eliminate the dimensional difference corresponding to the attribute values of different dimensions of the data point, first standardize the data and obtain the standardized data point attribute set as In the formula, Denote the sum of the v - th attribute values of all data points;
[0016] 2) Define the similarity matrix W = {w ij} where i = 1, 2,... N, j = 1, 2,... N, and w ij Denote the similarity between the data points x i and x j The calculation of similarity can be preferably selected according to the data type. In the present invention, the Gaussian radial basis kernel function is used to calculate the similarity between data points, and the calculation expression is In the formula, Denote the Euclidean distance between x i and x j σ is a hyperparameter with a default value of 1, representing the bandwidth of the kernel function.
[0017] In some of the embodiments, the generating step is specifically as follows:
[0018] 1) First, initialize three groups of hyperparameters in the random walk algorithm, specifically the maximum search range q percentile , the maximum number ξ of similarity chains, and the maximum length τ;
[0019] 2) When the virtual point walks, it is necessary to select a surrounding data point as the next data point to be visited with the current data point as the center. Before selection, it is necessary to set the search range, that is, q percentile . According to q percentile , the candidate data points that can be selected around each data point can be determined;
[0020] 3) q percentile Selects two forms. One is determined according to the Euclidean distance between data points. Calculate the Euclidean distance between all data points to form the data set D, and use the percentile (such as percentile = 20 representing the 20th percentile) of the data in D as q percentile, which is a fixed value; second, select a threshold for each of the V attributes of the data in sequence to form an array. When the virtual point searches for the next data point, it determines the candidate points within the search range according to the search thresholds corresponding to each attribute. In addition, a termination condition must be set for the wandering process of the virtual point, that is, the length of the generated similarity chain should be less than or equal to ξ and the quantity should be less than or equal to τ;
[0021] 4) Denote the similarity chain as where C (t) represents the t-th similarity chain, represents the a-th data point in C (t) ( corresponding to a data point x in X i );
[0022] 5) Set hyperparameters q percentile , ξ, τ, and their value ranges are recommended as follows: q percentile ∈[q 20 , q 80 , ξ ∈ [N, 30×N], τ ∈ [n class , 20×n class , and ensure that ξ >> τ. Let t = 1 and initialize according to the hyperparameters
[0023] 6) Determine the starting point of C (t) . If each data point has been visited by the virtual point, randomly select one from all data points as the first point of C (t) ; otherwise, randomly select one from the data points not visited by the virtual point as the first point of C (t) ; Let j = 2;
[0024] 7) Determine the set of candidate data points around the data point where the virtual point is currently located . Determine the candidate data points within the search range around percentile according to q . Denote the set of candidate data points around as X i . If X i is an empty set, let t = t + 1, τ = τ + 1, and return to step 6) above; otherwise, proceed to the next step;
[0025] 8) Determine the next data point for the virtual point to wander Calculate the transition probability to determine the probability that the virtual point selects each data point in X i as the next data point (i.e., ). Denote the set of transition probabilities as xk ∈X i , i = 1, ..., N, X i represents the set of candidate data points around x i . represents the probability that the virtual point wanders from x i to x k . Calculated according to the similarity matrix W According to the probability distribution in i , randomly select a data point in X as the data point where the virtual point wanders to at this time Add the data point to C (t) and update
[0026] 9) Determine the current wandering state. If j < ξ, then set j = j + 1 and return to the above steps; if j = ξ and t < τ, then set t = t + 1 and return to the above steps; if j = ξ and t = τ, then end the wandering process and output
[0027] In some of the embodiments, the specific steps for splitting the similarity chain and determining its label are as follows:
[0028] 1) Construct an adjacency matrix of size N×N i = 1, 2,...N, j = 1, 2,...N, represents the number of times the virtual point wanders through x i to x j , and initialize to 0;
[0029] 2) According to the wandering order of the virtual point, traverse each C in (t) . Every time there is a wandering from x i to x j (denote (t) and in C corresponding to data points x i and x j respectively, and whenever there is , it means there is a wandering from x i to x j ), then After the traversal, the values of all elements in A can be obtained, and this is used as the basis for splitting the similarity chain;
[0030] 3) Set the default value of the threshold for splitting the similarity chain to:
[0031]
[0032] Traverse again in the walking order of the virtual points each C in (t) and find C (t) in the corresponding If then at and split C, that is, break C (t) and continue traversing until all Cs are traversed (t) (t) and obtain a new segmented similarity chain where C′ (t) is the segmented similarity chain, ξ′ (t) is the length of C′ (t) and τ′ is the number of C′ (t) in;
[0033] 4) Define that each C′ (t) corresponds to a label and initialize indicating that each C′ (t) has no label for the time being. Count the data points with labels in each C′ (t) . If there are any, calculate the number of times each label appears. The label that appears the most times is recorded as the label of C′ (t) . Update If not, then
[0034] In some embodiments, the specific steps for determining the label are as follows:
[0035] 1) Traverse each C′ in (t) and record the number of times each unlabeled data point (i.e., {x1, x2,..., x (t)}) in C′ N-n appears. And record the label (t) of C′ in the corresponding list according to the number of times each data point appears. Each data point corresponds to a list for counting the number of times the label appears. If a certain label already exists in the list, then add the number of times corresponding to the label. Then, extract the label y i with the highest number of appearances and the second-highest label y i,1st corresponding to each data point x i,2ed , and calculate the percentages p i,1st 、p of the two to the sum of the number of times of all labels respectivelyi,2ed , according to p i,1st and p i,2ed Determine the relative value of the data point x i Tags: If p i,1st Significantly higher than p i,2ed , then the data point x i The label is y i,1st , otherwise the data point x i The label is still None, that is, the label is not determined;
[0036] 2) If all data points have been labeled after the above steps are executed, then the process ends. If step 3 has been executed three times and there are still data points with the label None, for the data points with the label None, follow the steps q percentile , 2×q percentile , 3×q percentile ,....Gradually expand the search range to check the label distribution of the surrounding points, and extract the label y with the highest frequency corresponding to the surrounding data points i,1st and the second highest label y i,2ed Then, the labels of the data points are gradually determined according to the judgment method in the above steps until the label of the data point is not None, then the search is stopped, and this method is followed until the labels of all data points are determined.
[0037] Compared with the prior art, the present invention provides a heuristic data classification algorithm based on a random walk strategy, which has the following beneficial effects:
[0038] This is a heuristic data classification algorithm based on a random walk strategy. The present invention proposes a novel classification algorithm technical framework, rather than an improvement or secondary development based on an existing classification algorithm. The design of the algorithm technical framework is concise, efficient, and easy to implement. The proposed algorithm includes two stages. One is to collect the intrinsic correlations and common features between data and encode them into a similarity chain. The other is to mine data category information through steps such as chain cutting to achieve data classification. The two stages are independent of each other, which facilitates algorithm improvement and secondary development. Users can customize the encoding or cutting method of the similarity chain according to the actual situation of the data. Therefore, this algorithm has good generalization and scalability.
[0039] The present invention fully considers the pain point of difficult data classification caused by complex data distributions. By using the random walk algorithm to quickly capture the correlation features between data, it can be applied to the classification problems of various types of data. Verified by multiple data sets, the algorithm can effectively achieve data classification, and there are certain advantages in the classification effect compared with existing classical algorithms. In addition, the proposed algorithm can also show good classification ability in sparse data sets, that is, when there are very few data with known categories in the data set, the algorithm still has good robustness. This also indicates that when not considering the computing time and cost or when the computing power is rapidly improved so that the computing time and cost can be ignored, the proposed algorithm has the potential to solve large-scale data classification problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a schematic flowchart of the heuristic data classification algorithm based on the random walk strategy of the present invention;
[0041] Figure 2 It is a schematic diagram of data distribution for verifying the effectiveness of the algorithm of the present invention - a total of 8 data set schematic diagrams;
[0042] Figure 3 It is a schematic diagram of the classification result of the algorithm of the present invention - 10 representative classification algorithms are selected as comparison diagrams. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0043] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0044] It should be understood that the step numbers used in the text are only for convenient description and do not limit the execution order of the steps.
[0045] It should be understood that the terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include the plural forms.
[0046] The terms "comprising" and "including" indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their combinations.
[0047] The term "and / or" refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0048] See Figures 1-3 , in this embodiment: A heuristic data classification algorithm based on a random walk strategy fully considers the classification problem of data with different distributions, and proposes a brand-new cardinality framework and idea for implementing data classification, which includes successively performing preprocessing of the original data and initializing algorithm parameters, generating a similarity chain based on the random walk algorithm, splitting the similarity chain to determine its label, and determining the label of the data point;
[0049] The specific steps are as follows:
[0050] Step 1: Preprocess the original data and initialize the algorithm parameters. Preprocessing refers to defining the mathematical representation of the data and normalizing the data. Initialization includes defining and setting each parameter in the algorithm;
[0051] The specific preprocessing steps are as follows:
[0052] 1) Denote that the given data set X contains N data points, which are respectively: {x 1, x2,..., x N-n, x N-n+1 ,..., x N}, each data point is a multi-dimensional data with V attribute values. Among X, the categories of the last n data points {x N-n+1 ,..., x N} are known and n << N, and its total number is denoted as n class , where n and n class are not necessarily equal, and n ≥ n class , and the labels of the remaining N - n data points are unknown and their labels are one of, and data classification is achieved by determining the labels of these remaining N - n data points;
[0053] Denote the set corresponding to the data point attributes in X as i = 1, 2,... N, v = 1, 2,... V, represents the v-th attribute value of the data point x i . To eliminate the dimensional difference corresponding to the attribute values of different dimensions of the data point, first normalize the data and obtain the normalized data point attribute set as In the formula, represents the sum of the v-th attribute values of all data points;
[0054] 2) Define the similarity matrix W = {w ij}, i = 1, 2,...N, j = 1, 2,...N, w ij represents the data point x i and x j The similarity between them. The calculation of similarity can be preferably selected according to the data type. In the present invention, the Gaussian radial basis kernel function is used to calculate the similarity between data points, and the calculation expression is In the formula,[[]] represents x i and x j The Euclidean distance between them, σ is a hyperparameter, and the default value is 1, representing the bandwidth of the kernel function;
[0055] Step 2: Generate a similarity chain based on the random walk algorithm. Set a virtual point according to the random walk algorithm. The virtual point walks among the data points according to the similarity between the data points, and records the path formed by the data points it passes through in sequence. The path generated by the walk is called a similarity chain;
[0056] The specific generation steps are as follows:
[0057] 1) First, initialize three groups of hyperparameters in the random walk algorithm, specifically the maximum search range q percentile , the maximum number ξ of similarity chains, and the maximum length τ;
[0058] 2) When the virtual point walks, it needs to select a surrounding data point as the next data point to be visited with the current data point as the center. Before selection, it is necessary to set the search range, that is, q percentile , and according to q percentile , the candidate data points that can be selected around each data point can be determined;
[0059] 3) q percentile Two forms are selected. One is determined according to the Euclidean distance between data points. Calculate the Euclidean distance between all data points to form a data set D, and use the percentile (such as percentile = 20 representing the 20th percentile) of the data in D as q percentile , which is a fixed value; the other is to sequentially select a threshold in the V attributes of the data to form an array. When the virtual point searches for the next data point, according to the search thresholds corresponding to each attribute, the candidate points within the search range are finally determined. In addition, the termination condition must be set for the walking process of the virtual point, that is, the length of the generated similarity chain should be less than or equal to ξ, and the number should be less than or equal to τ;
[0060] 4) Denote the similarity chain as where C (t) represents the t-th similarity chain, represents the a-th data point in C (t) ( Corresponding to a data point x in X i )
[0061] 5) Set hyperparameters q percentile , ξ, τ, and their recommended value ranges are as follows: q percentile ∈[q 20 , q 80 , ξ ∈ [N, 30×N], τ ∈ [n class , 20×n class , and ensure ξ >> τ. Let t = 1, and initialize according to the hyperparameters
[0062] 6) Determine the starting point of C (t) . If every data point has been visited by the virtual point, randomly select one from all data points as the first point of C (t) Otherwise, randomly select one from the data points not visited by the virtual point as the first point of C Let j = 2; (t) the first point
[0063] 7) Determine the set of candidate data points around the data point where the virtual point is currently located . Determine the candidate data points within the search range around percentile according to q . Denote the set of candidate data points around as X i . If X i is an empty set, let t = t + 1, τ = τ + 1, and return to step 6) above; otherwise, proceed to the next step;
[0064] 8) Determine the next data point for the virtual point to wander Calculate the transition probability to determine the probability that the virtual point selects each data point in X i as the next data point (i.e., ). Denote the set of transition probabilities as x k ∈ X i , i = 1,..., N, where X i represents the set of candidate data points around x i , and represents the probability that the virtual point wanders from x i to x k . Calculated from the similarity matrix W, According to the probability distribution in , randomly select a data point in X i as At this time, the virtual point wanders to the data point Add data points into C (t) and update
[0065] 9) Determine the current random walk state. If j < ξ, then let j = j + 1 and return to the above steps; if j = ξ and t < τ, then let t = t + 1 and return to the above steps; if j = ξ and t = τ, then end the random walk process and output
[0066] Step 3: Split the similarity chain and determine its label. The original similarity chain generated in the above steps is composed of several relatively long chains formed by data points. This step can split such relatively long chains into shorter chains to ensure that the features between data points in each short chain are as similar as possible;
[0067] The specific steps for splitting the similarity chain and determining its label are as follows:
[0068] 1) Construct an adjacency matrix of size N×N i = 1, 2,... N, j = 1, 2,... N, indicating the number of times the virtual point passes through x i to x j and initialize to 0;
[0069] 2) According to the random walk order of the virtual point, traverse each C (t) in. Every time there is a random walk from x i to x j (denote (t) in C and corresponding to data points x i and x j respectively, and every time appears, it means there is a random walk from x i to x j ), then After the traversal, the values of all elements in A can be obtained and used as the basis for splitting the similarity chain;
[0070] 3) Set the default value of the threshold for splitting the similarity chain to:
[0071]
[0072] According to the random walk order of the virtual point, traverse each C (t) in again, and search for the corresponding (t) in C in If then at and split C (t) apart, that is, break C (t) without interrupting the traversal until all Cs (t) are traversed and a new segmented similarity chain is obtained, where C′ (t) is the segmented similarity chain and ξ′ (t) is the length of C′ (t) and τ′ is the number of C′ (t) in;
[0073] 4) Define that each C′ (t) corresponds to a label and initialize to indicate that each C′ (t) has no label for the time being. Count the data points with labels in each C′ (t) . If there are any, calculate the number of times each label appears. The label that appears the most times is recorded as the label of C′ (t) . Update If not, then
[0074] Step Four: Determine the labels of each data point;
[0075] The specific steps for determining the labels are as follows:
[0076] 1) Traverse each C′ in (t) , record the number of times each unlabeled data point (i.e., {x1, x2,..., x (t)}) appears in C′ N-n}, and record the label (t) of C′ in the corresponding list according to the number of times each data point appears. Each data point corresponds to a list for counting the number of times the label appears. If a certain label already exists in the list, the corresponding number of times of the label is accumulated. Then, extract the label y i with the highest number of appearances and the second-highest label y i,1st in the list corresponding to each data point x i,2ed , and calculate the percentages p i,1st , p i,2ed of the two in the sum of the number of times of all labels respectively. Determine the label of the data point x i,1st according to the relative values of p i,2ed and p i : If p i,1st is significantly higher than p i,2ed , then the data point xi The label of is y i,1st , and conversely for data point x i the label remains None, that is, the label is undetermined; for example, the label of the unlabeled data point x in the dataset can be determined according to the following rules i :
[0077]
[0078] 2) If the labels of all data points have been determined after the above steps are executed, then stop. If the steps have been executed three times and there are still data points with the label None, for the data points with the label None, sequentially according to q percentile , 2×q percentile , 3×q percentile ,.... gradually expand the search range to view the label distribution of its surrounding points, and extract the label y with the highest occurrence frequency corresponding to the surrounding data points i,1st and the second highest label y i,2ed , and then gradually determine the label of the data point according to the judgment method of the above steps until the label of the data point is not None, then stop the search, and follow this method until the labels of all data points are determined.
[0079] To verify the effectiveness of this method, 8 datasets with different distributions and characteristics are selected as experimental objects, please refer to Figure 2 , including the two-dimensional datasets Parabolic, Ring, Zigzag, and FuzzyX with different distributions, the two-dimensional datasets Sk-1 and Sk-2 with multiple data labels, and the three-dimensional datasets Sk-3 and Sk-4 with multiple data labels.
[0080] Ten representative data classification algorithms are selected as the control group, including eight classical algorithms: k-Nearest Neighbors (KNN), Support Vector Machines (SVM), Random Forest Classifier (RF), Gradient Boosting Classifier (GB), Decision Tree Classifier (DT), Logistic Regression (LR), Naive Bayesian Classifier (GNB), Bernoulli Bayes Classifier (BNB), and two newly proposed algorithms with better performance: LightGBM (LGB) and CatBoost (CB). The algorithm proposed in the present invention is abbreviated as CCB. Figure 3 For the comparison of the classification results between CCB and the other ten control groups, Acc and F1 in the figure st 、F1 sf are three evaluation indicators respectively. The larger the value, the better the classification effect. The abscissa of each sub-picture represents the proportion of training data, that is, the ratio of the data with known categories to the total amount of data. Figure 3 The red broken line in the figure represents the evaluation indicators of CCB. It can be seen that CCB has obvious performance advantages and can achieve better classification effects in multiple data sets and different scenarios.
[0081] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other, and the differences between each embodiment and other embodiments are emphasized. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
[0082] Finally, it should be noted that the above are only the preferred embodiments of the present invention and are not used to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A heuristic data classification algorithm based on a random walk strategy, characterized in that: It includes steps of preprocessing raw data and initializing algorithm parameters sequentially, generating similarity chains based on the random walk algorithm, segmenting the similarity chains to determine their labels, and determining the labels of data points; The specific steps are as follows: Step 1: Preprocess the raw data and initialize the algorithm parameters. Preprocessing means defining the mathematical representation of the data and normalizing the data. Initialization includes defining and setting each parameter in the algorithm; Step 2: Generate similarity chains based on the random walk algorithm. Set a virtual point according to the random walk algorithm. The virtual point walks among the data points according to the similarity between the data points, and records the path formed by the data points it passes through in sequence. The path generated by the walk is called a similarity chain; Step 3: Segment the similarity chains and determine their labels. The original similarity chains generated in the above steps are several longer chains composed of data points. This step can segment such longer chains into shorter chains to ensure that the features between data points in each short chain are as similar as possible; Step 4: Determine the labels of each data point.
2. The heuristic data classification algorithm based on the random walk strategy according to claim 1, wherein: The specific preprocessing steps described in Step 1 are as follows: 1) Given that the dataset X contains N data points, namely: {x1, x2,..., x N-n , x N-n+1 ,..., x N}, each data point is a multi-dimensional data with V attribute values. In X, the classes of the last n data points {x N-n+1 ,..., x N} are known and n << N. The total number is denoted as n class , where n and n class are not necessarily equal, and n ≥ n class . The labels of the remaining N - n data points are unknown and they are one of . Data classification is achieved by determining the labels of these remaining N - n data points; Let the set corresponding to the data point attributes in X be denote the v-th attribute value of the data point x i To eliminate the dimensional differences corresponding to the attribute values of different dimensions of the data points, first standardize the data and obtain the standardized data point attribute set as where denotes the sum of the v-th attribute values of all data points; 2) Define the similarity matrix W = {w ij}, where i = 1, 2,... N, j = 1, 2,... N, and w ij represents the similarity between data points x i and x j . The calculation of similarity can be preferably determined according to the data type. In the present invention, the Gaussian radial basis kernel function is selected to calculate the similarity between data points, and the calculation expression is In the formula, represents the Euclidean distance between x i and x j , σ is a hyperparameter with a default value of 1, representing the bandwidth of the kernel function.
3. A heuristic data classification algorithm based on a random walk strategy according to claim 1, characterized in that: The specific generation steps described in Step 2 are as follows: 1) First, initialize three groups of hyperparameters in the random walk algorithm, specifically the maximum search range q percentile , the maximum number ξ of similarity chains, and the maximum length τ; 2) When the virtual point wanders, it needs to select a data point around the current data point as the next data point to be visited. Before the selection, the search range, i.e., q, needs to be set first. percentile , according to q percentile the candidate data points that can be selected around each data point can be determined; 3)q percentile Two forms are selected. One is to determine it based on the Euclidean distance between data points. The Euclidean distance between all data points is calculated to form a data set D. The percentile percentile of the data in D (such as percentile = 20 represents the 20% quantile) is used as q percentile , which is a fixed value; secondly, a threshold is selected from the V attributes of the data in turn to form an array. When the virtual point searches for the next data point, the search threshold corresponding to each attribute is used to finally determine the candidate point within the search range. In addition, the virtual point's wandering process must set a termination condition, that is, the length of the generated similarity chain should be less than or equal to ξ, and the number should be less than or equal to τ; 4) Denote the similarity chain as where C (t) represents the t-th similarity chain, and (t) represents the a-th data point in C which corresponds to a data point in X, i.e., x i ). 5) Set hyperparameters q percentile , ξ, τ, and their value ranges are recommended as follows: q percentile ∈[q 20 , q 80 , ξ ∈ [N, 30×N], τ ∈ [n class , 20×n class , and ensure that ξ >> τ. Let t = 1, and initialize according to the hyperparameters 6) Determine C (t) The starting point of (t) . If every data point has been visited by the virtual point, randomly select one from all data points as the first point of C (t) Otherwise, randomly select one from the data points not visited by the virtual point as the first point of C (t) Let j = 2; 7) Determine the data point where the virtual point is currently located The set of candidate data points around it. According to q percentile Determine The candidate data points within the search range around it, denoted as The set of candidate data points around it as X i If X i Is an empty set, then let t = t + 1, τ = τ + 1, and return to step 6) above; otherwise, proceed to the next step; 8) Determine the next data point for the virtual point to wander to Calculate the transition probability to determine that the virtual point selects X i For each data point in (i.e., ) as the probability of the next data point, and denote the set composed of the transition probabilities as x k ∈X i , i = 1,..., N, where X i represents the set of candidate data points around x i , and represents the probability that the virtual point wanders from x i to x k . It is calculated according to the similarity matrix W, According to the probability distribution in, randomly select a data point in X i as the data point to which the virtual point wanders at this time Add the data point to C (t) and update 9) Determine the current wandering state. If j < ξ, then let j = j + 1 and return to the above steps; if j = ξ and t < τ, then let t = t + 1 and return to the above steps; if j = ξ and t = τ, then end the wandering process and output 4. A heuristic data classification algorithm based on a random walk strategy according to claim 1, characterized in that: The specific steps of segmenting the similarity chains and determining their labels described in Step 3 are as follows: 1) Construct an adjacency matrix of size N×N i = 1, 2,... N, j = 1, 2,... N, Denote the number of times passing through x when the virtual point walks i to x j and initialize them all to 0; All are initialized to 0; 2) Traverse according to the walking order of virtual points each C in (t) , every time there is a walk from x i to x j (denote the (t) in C and correspond to data points x i and x j respectively, and whenever appears, it means there is a walk from x i to x j ), then after the traversal, the values of all elements in A can be obtained, and this is used as the basis for dividing the similarity chain; 3) Set the threshold l for segmenting the similarity chains. The default value of l is: Traverse again in the walking order of the virtual points each C in (t) and find C (t) in the corresponding If then at and split C (t) that is, break C (t) without interrupting the traversal until all Cs (t) are traversed and a new segmented similarity chain is obtained where C′ (t) is the segmented similarity chain, ξ′ (t) is the length of C′ (t) and τ′ is the number of C′s in (t) ; 4) Define each C' (t) There is a corresponding label and initialize indicating each C' (t) has no label for the time being, count the data points with labels in each C' (t) If there are any, calculate the number of occurrences of each label, and record the label with the most occurrences as the label of C' (t) Update the label of If not, then 5. A heuristic data classification algorithm based on a random walk strategy according to claim 1, characterized in that: The specific steps of determining the labels described in Step 4 are as follows: 1) Traversal Each C′ in (t) , record C′ (t) Each unlabeled data point (i.e., {x1, x2, ..., x N-n }) appears, and C′ (t) Tags The number of occurrences of each data point is recorded in its corresponding list, where each data point corresponds to a list, which is used to count the number of times a label appears. If a label already exists in the list, the number of times the label corresponds to is accumulated. Then, extract each data point x i The label y that appears most frequently in the corresponding list i,1st and the second highest label y i,2ed , and calculate the percentage p of the two in the total number of labels i,1st 、p i,2ed , according to p i,1st and p i,2ed The relative value of the data point x is determined i Tags: If p i,1st Significantly higher than p i,2ed , then the data point x i The label is y i,1st , otherwise the data point x i The label is still None, that is, the label is not determined; 2) If the labels of all data points have been determined after performing the above steps, then it ends. If step three has been executed three times and there are still data points with the label "None", for the data points with the label "None", sequentially according to q percentile , 2×q percentile , 3×q percentile ,.... gradually expand the search range to view the label distribution of the surrounding points, extract the label y i,1st that appears most frequently among the surrounding data points and the second most frequent label y i,2ed , and then gradually determine the labels of the data points according to the judgment method of the above steps until the label of the data point is not "None", then stop the search, and follow this method until the labels of all data points are determined.
