Data sequence complex network construction method and data classification method based on angle difference threshold graph
By introducing an angle difference threshold graph into the viewing algorithm, dynamically adjusting the connection criteria of complex networks, the problem of limited network feature recognition capabilities in the prior art is solved, and a higher data classification accuracy is achieved.
Patent Information
- Application Number
- CN202411876046.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-04
AI Technical Summary
When existing viewing algorithms build complex networks, the connection criteria are fixed and unadjustable, resulting in limited discrimination ability of network features and making it difficult to effectively characterize data sequence features.
A method for constructing a data sequence complex network based on the angle difference threshold graph is proposed. By introducing angle difference threshold parameters, dynamically adjusting the connection criteria, and building a flexible complex network.
By adjusting the angle difference threshold parameters, more discernible network features can be obtained and the accuracy of data classification can be improved.
Smart Images

Figure CN119760506A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of graph domain and complex network technology, and in particular to a method for converting a data sequence into a complex network, specifically, to a data sequence complex network construction method and a data classification method based on an angle difference threshold graph. Background Art
[0002] The principle of complex networks originally originated from graph theory, so the complex network in this document is consistent with the concept of graph.
[0003] The increasingly powerful complex network technology provides a new way for big data analysis and processing in today's information age. As a method of constructing complex networks, visualization graphs are widely used to transform various time series into complex networks because of their simple, efficient and easy implementation.
[0004] However, since the connection criteria of the visibility graph algorithm are fixed and cannot be adjusted, the complex network constructed for the data sequence using this algorithm has limited ability to characterize the characteristics of the data sequence, which makes the discernibility of the obtained network features limited, that is, the ability of these features to classify and identify signals is limited. Summary of the invention
[0005] Purpose of the invention: To propose a data sequence complex network construction method based on an angle difference threshold map, and further propose a data classification method based on the complex network construction method, so as to solve the above-mentioned problems existing in the prior art.
[0006] In a first aspect of the present invention, a data sequence complex network construction method based on an angle difference threshold graph is proposed, wherein for a data sequence, any two adjacent sequence points are connected to each other;
[0007] Based on the angle difference threshold judgment formula, the angle difference between two non-adjacent sequence points is calculated in sequence. If the angle difference between two non-adjacent sequence points is less than the angle difference threshold parameter, the two non-adjacent sequence points are connected.
[0008] If the angle difference between two non-adjacent sequence points is greater than or equal to the angle difference threshold parameter α, the current two non-adjacent sequence points are skipped and the next set of two non-adjacent sequence points is determined.
[0009] The angle difference threshold determination formula is as follows:
[0010]
[0011] Where x represents the data sequence, x(i) and x(j) are the i-th and j-th points in the sequence x, x(p) represents any point between x(i) and x(j), and α is the angle difference threshold parameter;
[0012] After traversing all adjacent and non - adjacent sequence points, finally output a data - sequence complex network containing the connection relationships of each sequence point.
[0013] In a further embodiment of the first aspect, the method for constructing a data - sequence complex network proposed by the present invention is as follows:
[0014] For a data sequence x(n) with N points, determine the angle - difference threshold parameter α;
[0015] Set the initial values of sequence points i, j, p: i = 1, j = i + 2, p = i + 1, where i < p < j;
[0016] Adjacent sequence points x(i) and x(i + 1) are connected;
[0017] Judge whether two non - adjacent sequence points x(i) and x(j) are connected as follows:
[0018] Calculate the angle θ1 between the line connecting x(i) and x(j) and the positive horizontal axis, calculate the angle θ2 between the line connecting x(i) and x(p) and the positive horizontal axis, and judge whether the expression θ2 - θ1 < α holds:
[0019] If not, then x(i) and x(j) are not connected;
[0020] If so, when p < j - 1, let p = p + 1, recalculate the angle θ2 between the line connecting x(i) and x(p) and the positive horizontal axis, and judge again whether the expression θ2 - θ1 < α holds. When p = j - 1, then x(i) and x(j) are connected;
[0021] Judge whether j < N holds:
[0022] If so, then let j = j + 1, p = i + 1, recalculate the angle θ1 between the line connecting x(i) and x(j) and the positive horizontal axis, calculate the angle θ2 between the line connecting x(i) and x(p) and the positive horizontal axis, and repeat the above steps;
[0023] If not, then judge whether i < N - 2 holds: If so, then let i = i + 1, j = i + 2, p = i + 1, and repeat the above steps, that is, x(i) and x(i + 1) are connected, calculate the angle θ1 between the line connecting x(i) and x(j) and the positive horizontal axis, calculate the angle θ2 between the line connecting x(i) and x(p) and the positive horizontal axis, and make a judgment;
[0024] If not, then let i = i + 1, j = 0, p = 0, x(i) and x(i + 1) are connected, and the angle - difference threshold graph is created.
[0025] A second aspect of the present invention discloses a data classification method, firstly creating a complex network based on the data sequence complex network construction method disclosed in the first aspect;
[0026] The created complex network is represented by the adjacency matrix:
[0027] A=[a ij ] N×N ;
[0028] where a ij 1 means node i is connected to node j, a ij 0 means node i is not connected to node j, and N represents the number of nodes;
[0029] Next, six features of the complex network are extracted, namely, the degree mean D M , degree distribution entropy D DE , mean clustering coefficient C M , Clustering coefficient distribution entropy C DE , local efficiency mean E M , local efficiency distribution entropy E DE ;
[0030] Finally, based on the extracted six network features D M , D DE , C M , C DE 、E M and E DE , use machine learning models to train and test the data, and finally complete the classification and identification of the data.
[0031] In a further embodiment of the second aspect, the degree mean D M It is defined as the average of all node degrees, as follows:
[0032]
[0033] Where D i Represents the degree of node i, which is used to represent the number of nodes connected to the node;
[0034]
[0035] Where N is the total number of network nodes, a ij 1 means node i is connected to node j, a ij A value of 0 indicates that node i is not connected to node j.
[0036] Arrange the degree values of the nodes from small to large and define the degree distribution P D The ratio of the number of nodes corresponding to each degree value to the total number of nodes:
[0037]
[0038] Where D min and D max are the minimum and maximum degree values respectively, N represents the total number of network nodes, Represents the number of nodes corresponding to each degree value;
[0039] According to the information entropy formula, we define the degree distribution entropy D DE :
[0040]
[0041] Mean clustering coefficient C M It is defined as the average of the clustering coefficients of all nodes, and the expression is as follows:
[0042]
[0043] In the formula, C i represents the clustering coefficient of node i, and N represents the total number of network nodes;
[0044]
[0045] In the formula, a ij The adjacency matrix A = [a ij ] N×N The corresponding value in D i is the degree of node i, e i is the actual number of edges between all adjacent nodes of node i.
[0046] The range of clustering coefficient is 0 to 1, which is divided into K intervals, and then the clustering coefficients of all nodes are arranged from small to large;
[0047] Define the clustering coefficient distribution P C is the ratio of the number of nodes in each interval to the total number of nodes. The expression is as follows:
[0048]
[0049] in, represents the number of nodes in the kth interval, and N represents the total number of network nodes;
[0050] According to the information entropy formula, the clustering coefficient distribution entropy C is defined DE as follows:
[0051]
[0052] Local efficiency mean E M It is defined as the average of the local efficiencies of all nodes, as follows:
[0053]
[0054] In the formula, E i is the local efficiency value of the i-th node, and N represents the total number of network nodes;
[0055]
[0056] Where N i is the set of nodes in the subgraph formed by the adjacent nodes of node i, D i is the degree of node i, l jk is the shortest path length between nodes k and j.
[0057] The range of local efficiency is from 0 to 1, which is divided into K intervals, and then the local efficiency of all nodes is arranged from small to large;
[0058] Define the local efficiency distribution P E is the ratio of the number of nodes in each interval to the total number of nodes. The expression is as follows:
[0059]
[0060] in, represents the number of nodes in the kth interval, and N represents the total number of network nodes;
[0061] Define the local efficiency distribution entropy E DE as follows:
[0062]
[0063] In a further embodiment of the second aspect, based on the extracted six network features D M , D DE , C M , C DE 、E M and E DE , use a machine learning model to train and test the data, the machine learning model can be one or more of a decision tree DT, a k-nearest neighbor classifier KNN, a support vector machine SVM, and a Bayesian classifier;
[0064] The classification accuracy of each machine learning model was calculated using ten-fold cross validation.
[0065] Beneficial effects: The data sequence complex network construction method based on the angle difference threshold graph proposed by the present invention introduces an angle difference threshold parameter to construct a flexible connection criterion on the basis of the traditional visual graph algorithm, and the connection criterion can be adjusted as needed to obtain a more discriminative network feature. In addition, the method improves the slope difference in the visual graph algorithm into an angle difference, which can more intuitively display the connection criterion of the algorithm in the graph, and the physical meaning is clearer. Moreover, the complex network constructed based on the improved method has a higher accuracy in the process of realizing data classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 This is an angle diagram in the angle difference threshold diagram in an embodiment of the present invention.
[0067] Figure 2 This is a connection relationship diagram between sequence points of six sequences when the angle difference threshold parameter α takes different values in an embodiment of the present invention.
[0068] Figure 3 A complex network diagram is created for a 10-point sequence using an angle difference threshold graph algorithm in an embodiment of the present invention.
[0069] Figure 4 4 is a flow chart of the angle difference threshold graph algorithm in an embodiment of the present invention.
[0070] Figure 5 This is a flow chart of data classification and identification in an embodiment of the present invention. DETAILED DESCRIPTION
[0071] In the following description, a large number of specific details are provided to provide a more thorough understanding of the present invention. However, it is apparent to those skilled in the art that the present invention can be implemented without one or more of these details. In other examples, in order to avoid confusion with the present invention, some technical features known in the art are not described.
[0072] In order to obtain more discriminative network features and construct a complex network that can better characterize the characteristics of data sequences, the present invention improves the visibility graph algorithm, proposes a data sequence complex network construction method based on an angle difference threshold graph, and further proposes a data classification method based on the complex network construction method. The specific steps are as follows:
[0073] Step 1: Build a complex network for the data sequence based on the angle difference threshold graph algorithm
[0074] For a data sequence, the connection criterion of the angle difference threshold graph is: any two adjacent sequence points are connected to each other, and whether two non-adjacent sequence points are connected depends on whether expression (1) holds.
[0075]
[0076] In expression (1), x represents the data sequence, x(i) and x(j) are the i-th point and the j-th point in the sequence x, x(p) represents any point between x(i) and x(j), and α is the angle difference threshold parameter.
[0077] set up Then expression (1) can be rewritten as:
[0078] θ Δ =θ2-θ1<α i<p<j (2)
[0079] Wherein, θ1 represents the angle between the straight line connecting x(i) and x(j) and the positive horizontal axis, θ2 represents the angle between the straight line connecting x(i) and x(p) and the positive horizontal axis, and θ is defined as θ2-θ1.
[0080] Figure 1 The three-point sequence is used as an example to illustrate the meaning of the angle in the angle difference threshold diagram. According to θ1, θ1, and θ Δ The value of , divides the three-point sequence into six cases. The green |θ1| represents the angle between the straight line connecting x(i) and x(j) and the horizontal axis, the blue |θ2| represents the angle between the straight line connecting x(i) and x(p) and the horizontal axis, and the red |θ Δ | represents the angle between the line connecting x(i) and x(j) and the line connecting x(i) and x(p). Note that And 0≤|θ Δ |≤π. If θ1≥0, the green |θ1| represents the angle between the straight line connecting x(i) and x(j) and the positive horizontal axis. If θ1<0, the green |θ1| represents the angle between the straight line connecting x(i) and x(j) and the negative horizontal axis. Similarly, if θ2≥0, the green |θ2| represents the angle between the straight line connecting x(i) and x(p) and the positive horizontal axis. If θ2<0, the green |θ2| represents the angle between the straight line connecting x(i) and x(p) and the negative horizontal axis. From Figure 1 It can be seen that if θ Δ ≥0, the line connecting x(i) and x(p) rotates counterclockwise from the line connecting x(i) and x(j) by |θ Δ |, if θ Δ <0, the line connecting x(i) and x(p) rotates clockwise from the line connecting x(i) and x(j) by |θ Δ |.
[0081] The meaning of expressions (1) and (2) is that when θ Δ When θ < α, x(i) and x(j) are connected to each other. ΔWhen ≥α, x(i) and x(j) are not connected. Since the angle difference threshold parameter α is adjustable, the connection criterion of the angle difference threshold graph is flexible. By adjusting α, a complex network that better characterizes the characteristics of the data sequence can be constructed.
[0082] Figure 2 Taking the three-point sequence as an example, the connection relationship between the three sequence points of the six sequences is shown when the angle difference threshold parameter α takes different values. Assuming that i, p, j are 1, 2, and 3 respectively, the six sequences of θ1, θ2, and θ Δ The calculations are as follows:
[0083] (1) Sequence 1: (1,2), (2,3.5), (3,4)
[0084]
[0085] (2) Sequence 2: (1,2), (2,2.5), (3,4)
[0086]
[0087] (3) Sequence 3: (1,2), (2,1.5), (3,4)
[0088]
[0089] (4) Sequence 4: (1,4), (2,2.5), (3,2)
[0090]
[0091] (5) Sequence 5: (1,4), (2,3.5), (3,2)
[0092]
[0093] (6) Sequence 6: (1,4), (2,4.5), (3,2)
[0094]
[0095] According to expressions (1) and (2), when the angle difference threshold parameter α changes, the connection rule between sequence points also changes. Figure 2 The connection relationship between the three sequence points of the six sequences is shown when α takes different values. Figure 2In the figure, (a) shows the connection relationship between the sequence points of the six sequences when α≤-71.6°; (b) shows the connection relationship between the sequence points of the six sequences when -71.6°<α≤-18.4°; (c) shows the connection relationship between the sequence points of the six sequences when -18.4°<α≤-11.3°; (d) shows the connection relationship between the sequence points of the six sequences when -11.3°<α≤11.3°; (e) shows the connection relationship between the sequence points of the six sequences when 11.3°<α≤18.4°; (f) shows the connection relationship between the sequence points of the six sequences when 18.4°<α≤71.6°; (g) shows the connection relationship between the sequence points of the six sequences when α>71.6°.
[0096] For each sequence, adjacent sequence points are connected, and whether x(1) and x(3) are connected depends on θ Δ < whether α is satisfied. Figure 2 It is shown that when the angle difference threshold parameter α changes, the connection relationship between the sequence points also changes.
[0097] Figure 3 It shows the use of the angle difference threshold graph algorithm to construct a complex network for a 10-point sequence, x(n) = [1,8,3,10,5,4,7,9,2,6]. Figure 3 The (1)(2)(3)(4)(5)(6) sub-figures show the connection relationship between the 10 sequence points and the corresponding complex network when the angle difference threshold parameter α is 0°, 10°, -30°, 30°, -180°, and 180° respectively. Figure 3 It can be seen that when α is smaller, the connection between sequence points is sparser, and when α is larger, the connection between sequence points is denser. α can be adjusted to a minimum of -180°, at which time only adjacent sequence points are connected, and α can be adjusted to a maximum of 180°, at which time all sequence points are connected.
[0098] The algorithm flow of the angle difference threshold map is as follows: Figure 4 The specific description is as follows:
[0099] For a data sequence x(n) with N points, determine the angular difference threshold parameter α (e.g., α = -5°), and set the initial values of sequence points i, j, and p: i = 1, j = i + 2, p = i + 1, where i < p < j. First, connect adjacent sequence points, that is, connect x(i) and x(i + 1). Then, according to the connection criterion of the angular difference threshold graph (expressions (1) and (2)), determine whether x(i) and x(j) are connected. The specific method is to calculate the angle θ1 between the line connecting x(i) and x(j) and the positive horizontal axis (j > i + 1), calculate the angle θ2 between the line connecting x(i) and x(p) and the positive horizontal axis (i < p < j), and determine whether the expression θ2 - θ1 < α holds. If not, then x(i) and x(j) are not connected. If so, when p < j - 1, let p = p + 1, and calculate the angle θ2 between the line connecting x(i) and x(p) and the positive horizontal axis again, and determine whether the expression θ2 - θ1 < α holds again. When p = j - 1, then x(i) and x(j) are connected. Then, determine whether j < N holds. If so, let j = j + 1, p = i + 1, calculate the angle θ1 between the line connecting x(i) and x(j) and the positive horizontal axis again, calculate the angle θ2 between the line connecting x(i) and x(p) and the positive horizontal axis again, and repeat the above steps. If not, then determine whether i < N - 2 holds. If so, let i = i + 1, j = i + 2, p = i + 1, and repeat the above steps, that is, connect x(i) and x(i + 1), calculate the angle θ1 between the line connecting x(i) and x(j) and the positive horizontal axis, calculate the angle θ2 between the line connecting x(i) and x(p) and the positive horizontal axis, and make a judgment. If not, then let i = i + 1, j = 0, p = 0, connect x(i) and x(i + 1), and the creation of the angular difference threshold graph is completed.
[0100] Step 2: Extract complex network features
[0101] The created complex network can be represented by an adjacency matrix A = [a ij N×N , where a ij is 1 indicating that node i is connected to node j, a ij is 0 indicating that node i is not connected to node j, and N represents the number of nodes. Next, extract six features of the complex network, namely the average degree D M , the degree distribution entropy D DE , the average clustering coefficient C M , the clustering coefficient distribution entropy C DE , the average local efficiency E M , and the local efficiency distribution entropy E DE . The definitions of these six features are as follows:
[0102] (1) Average degree D M
[0103] The degree of node i is the number of nodes connected to the node, as shown in formula (3):
[0104]
[0105] The mean degree is defined as the average of all node degrees, as shown in formula (4):
[0106]
[0107] (2) Degree distribution entropy D DE
[0108] Arrange the degree values of the nodes from small to large and define the degree distribution P D is the ratio of the number of nodes corresponding to each degree value to the total number of nodes, as shown in formula (5). min and D max are the minimum and maximum degree values respectively, N represents the total number of network nodes, Represents the number of nodes corresponding to each degree value. According to the information entropy formula, the degree distribution entropy D is defined DE , as shown in formula (6).
[0109]
[0110] (3) Mean value of clustering coefficient C M
[0111] The clustering coefficient of node i is defined as the number of actual connecting edges e between nodes connected to this node. i With the maximum possible number of edges D i (D i -1) / 2, which is also equal to the ratio of the number of triangles containing the node to the number of connected triples centered on the node, as shown in formula (7), where a ij The adjacency matrix A = [a ij ] N×N The corresponding value in D i is the degree of node i.
[0112]
[0113] Mean clustering coefficient C M It is defined as the average of the clustering coefficients of all nodes, as shown in formula (8):
[0114]
[0115] (4) Clustering coefficient distribution entropy C DE
[0116] The range of clustering coefficient is 0 to 1, which is divided into K intervals. Then, the clustering coefficients of all nodes are arranged from small to large, and the clustering coefficient distribution P is defined.C is the ratio of the number of nodes in each interval to the total number of nodes, as shown in formula (9), where: represents the number of nodes in the kth interval, and N represents the total number of network nodes. According to the information entropy formula, the clustering coefficient distribution entropy C is defined DE , as shown in formula (10).
[0117]
[0118]
[0119] (5) Local efficiency mean E M
[0120] Since the clustering coefficient only evaluates the direct connection between adjacent nodes, rather than the multi-level connection, the concept of local efficiency is proposed, which is defined as formula (11), where N i is the set of nodes in the subgraph formed by the adjacent nodes of node i, D i is the degree of node i, l jk is the shortest path length between nodes k and j.
[0121]
[0122] Local efficiency mean E M It is defined as the average of the local efficiencies of all nodes, as shown in formula (12):
[0123]
[0124] (6) Local efficiency distribution entropy E DE
[0125] The range of local efficiency is 0 to 1, which is divided into K intervals. Then the local efficiency of all nodes is arranged from small to large, and the local efficiency distribution P is defined. E is the ratio of the number of nodes in each interval to the total number of nodes, as shown in formula (13), where: represents the number of nodes in the kth interval, and N represents the total number of network nodes. According to the information entropy formula, the local efficiency distribution entropy E is defined DE , as shown in formula (14).
[0126]
[0127] Step 3: Machine Learning Model Classification
[0128] Based on the six extracted network features, D M , D DE , C M , C DE 、E M and EDE ,Use machine learning models, such as decision tree (DT), k-nearest neighbor classifier (KNN), support vector machine (SVM) and Bayesian classifier (NB), to train and test the data, and finally complete the classification and recognition of the data. The classification accuracy of each model is calculated through ten-fold cross validation. Figure 5 The overall flow chart of data classification and identification is shown.
[0129] EEG signal classification experiment based on angle difference threshold map algorithm:
[0130] The experimental data is selected from the general EEG dataset - the Bonn EEG dataset. The angle difference threshold map algorithm is used to construct a complex network for the EEG signals in the dataset, extract network features, and complete the classification study of normal EEG and epileptic EEG. The specific implementation methods and results are as follows:
[0131] (1) Prepare normal EEG and epileptic EEG data
[0132] The Bonn dataset is an epilepsy EEG dataset consisting of five subsets: A, B, C, D, and E. The duration of each EEG segment is 23.6 seconds, the sampling frequency is 173.61 Hz, the resolution is 12 bits, and the number of sampling points is 4097. Subsets A and B are taken from healthy subjects with eyes open and eyes closed, respectively. Subsets C / D and E are taken from epileptic patients in the interictal and ictal periods, respectively.
[0133] (2) Use the angle difference threshold map algorithm to construct a complex network for EEG data and extract network features
[0134] Since each EEG segment in the Born dataset contains 4097 points, the network constructed directly for these EEG segments will have 4097 nodes. In order to reduce the complexity of the network, each EEG segment is further divided into 8 512-point segments, so each subset A, B, C, D and E contains 800 512-point segments. Finally, 1600 normal EEG segments from healthy subjects and 2400 epileptic EEG segments from epilepsy patients were obtained.
[0135] A network was constructed for each 512-point EEG segment using the angle difference threshold map algorithm, and the degree mean D was then extracted from each network. M , degree distribution entropy D DE , mean clustering coefficient C M , Clustering coefficient distribution entropy C DE , local efficiency mean E M , local efficiency distribution entropy E DE Six network characteristics.
[0136] (3) Using machine learning models to complete normal EEG and epilepsy EEG classification experiments
[0137] Four machine learning models, decision tree (DT), k-nearest neighbor classifier (KNN), support vector machine (SVM) and Bayesian classifier (NB), are used to predict the probability of a D M , D DE , C M , C DE 、E M and E DE These six network features classify normal and epileptic EEG segments. The classification accuracy of each model was obtained by ten-fold cross validation.
[0138] (4) Experimental results
[0139] The English abbreviations ADTG (proposed by the present invention), VG, HVG, LPVG, LPHVG and WMSLPVG appearing in Tables 1-5 respectively represent: Angle Difference Threshold Graph, Visibility Graph, Horizontal Visibility Graph, Limited Penetrable Visibility Graph, Limited Penetrable Horizontal Visibility graph, and Weighted Multiscale Limited Penetrable Visibility Graph.
[0140] The data shown in Table 1 are: Under the ADTG algorithm, when the angle difference threshold α changes from -6° to 6°, based on D M , C M , or E M The accuracy of four machine learning models based on network features in distinguishing normal EEG from epileptic EEG. The data shown in Table 2 are: Under the ADTG algorithm, when the angle difference threshold α changes from -6° to 6°, based on D DE , C DE , or E DE The accuracy of the four machine learning models of network features in distinguishing normal EEG from epileptic EEG. From Tables 1 and 2, it can be seen that the angle difference threshold α affects the ability of network features to distinguish normal EEG from epileptic EEG. M The classification accuracy is the highest when α = 4°. M 、E M , D DE The classification accuracy of the feature is the highest when α = 0°, C DEThe classification accuracy is the highest when α = -4°. DE The classification accuracy is highest when α=-3°.
[0141] Table 1 Based on D M , C M , or E M Classification accuracy of four machine learning models under the ADTG algorithm (-6°≤α≤6°)
[0142]
[0143] Table 2 Based on D DE , C DE , or E DE Classification accuracy of four machine learning models under the ADTG algorithm (-6°≤α≤6°)
[0144]
[0145] The data shown in Table 3 are: ADTG, VG, HVG, LPVG, LPHVG and WMSLPVG algorithms based on D M , C M , or E M The four machine learning models based on network features have the highest accuracy in distinguishing normal EEG from epileptic EEG. The data shown in Table 4 are: ADTG, VG, HVG, LPVG, LPHVG and WMSLPVG algorithms, based on D DE , C DE , or E DE The four machine learning models of network features had the highest accuracy in distinguishing normal EEG from epileptic EEG.
[0146] In general, the network characteristics under the ADTG algorithm (especially D M , C DE and E DE The proposed algorithm is superior to the VG, HVG, LPVG, LPHVG and WMSLPVG algorithms in distinguishing normal EEG from epileptic EEG. When using the ADTG algorithm, the angle difference threshold α can be adjusted to construct a complex network that can better characterize EEG, thereby extracting more discriminative network features for EEG classification.
[0147] Table 3 Based on D M , C M , or E M Features The highest classification accuracy of the four machine learning models under ADTG, VG, HVG, LPVG, LPHVG, and WMSLPVG algorithms
[0148]
[0149] Table 4 Based on D DE , C DE , or E DE Features The highest classification accuracy of the four machine learning models under ADTG, VG, HVG, LPVG, LPHVG, and WMSLPVG algorithms
[0150]
[0151] The data shown in Table 5 are: ADTG, VG, HVG, LPVG, LPHVG and WMSLPVG algorithms based on D M , D DE , C M , C DE 、E M and E DE Six network features, DT, KNN, SVM and NB four machine learning models to distinguish the accuracy of normal EEG and epileptic EEG. It can be seen that no matter which machine learning model is used, the six network features under the ADTG algorithm have the highest accuracy in distinguishing normal EEG and epileptic EEG.
[0152] For example, under the ADTG algorithm, the classification accuracy of DT, KNN, SVM and NB are 92.38%, 92.98%, 92.88% and 92.05% respectively; while under the VG algorithm, the classification accuracy of DT, KNN, SVM and NB are 90.30%, 91.43%, 90.98% and 88.15% respectively. Compared with the VG algorithm, the classification accuracy of the four machine learning models under the ADTG algorithm is improved by 2.08%, 1.55%, 1.90% and 3.90% respectively. In addition, compared with the HVG, LPVG, LPHVG and WMSLPVG algorithms, the classification accuracy under the ADTG algorithm can be improved by 17.55%, 3.25%, 11.90% and 6.58% respectively.
[0153] The classification accuracy in Table 5 shows that the ADTG algorithm can obtain more discriminative network features, and the ability of these features to distinguish normal EEG from epileptic EEG is better than that of the other five algorithms, indicating that the ADTG algorithm can more effectively characterize the characteristics of EEG signals.
[0154] Table 5 Classification accuracy of four machine learning models based on six network features under ADTG, VG, HVG, LPVG, LPHVG, and WMSLPVG algorithms
[0155]
[0156] The data sequence complex network construction method and data classification method based on the angle difference threshold diagram disclosed in the above embodiment can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiment can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0157] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0158] As described above, although the present invention has been shown and described with reference to specific preferred embodiments, it should not be construed as limiting the present invention itself. Various changes may be made to it in form and detail without departing from the spirit and scope of the present invention as defined in the appended claims.
Claims
1. A method for constructing a complex network of data sequences based on an angular difference threshold graph, characterized in that: For a data sequence, any two adjacent sequence points are connected to each other; Based on the angular difference threshold discrimination formula, the angular differences between two non-adjacent sequence points are calculated sequentially. If the angular difference between two non-adjacent sequence points is less than the angular difference threshold parameter, then connect the two non-adjacent sequence points; Otherwise, skip the current two non-adjacent sequence points and continue to judge the next group of two non-adjacent sequence points; The angular difference threshold discrimination formula is as follows: In the formula, x represents the data sequence, x(i) and x(j) are the i-th point and the j-th point in the sequence x, x(p) represents any point between x(i) and x(j), and α is the angular difference threshold parameter; Output a complex network of data sequences containing the connection relationships of each sequence point.
2. The method for constructing a complex network of data sequences based on an angle difference threshold graph according to claim 1, characterized in that: It includes the following steps: For a data sequence x(n) with N points, determine the angular difference threshold parameter α; Set the initial values of sequence points i, j, p: i = 1, j = i + 2, p = i + 1, where i < p < j; Adjacent sequence points x(i) and x(i + 1) are connected; Judge whether two non-adjacent sequence points x(i) and x(j) are connected, specifically as follows: Calculate the angle θ1 between the line connecting x(i) and x(j) and the positive horizontal axis, calculate the angle θ2 between the line connecting x(i) and x(p) and the positive horizontal axis, and judge whether the expression θ2 - θ1 < α holds: If not, then x(i) and x(j) are not connected; If so, when p < j - 1, let p = p + 1, calculate the angle θ2 between the line connecting x(i) and x(p) and the positive horizontal axis again, and judge whether the expression θ2 - θ1 < α holds again. When p = j - 1, then x(i) and x(j) are connected; Judge whether j < N holds: If so, then let j = j + 1, p = i + 1, calculate the angle θ1 between the line connecting x(i) and x(j) and the positive horizontal axis again, calculate the angle θ2 between the line connecting x(i) and x(p) and the positive horizontal axis, and repeat the above steps; If not, then judge whether i < N - 2 holds: If so, then let i = i + 1, j = i + 2, p = i + 1, and repeat the above steps, that is, x(i) and x(i + 1) are connected, calculate the angle θ1 between the line connecting x(i) and x(j) and the positive horizontal axis, calculate the angle θ2 between the line connecting x(i) and x(p) and the positive horizontal axis, and make a judgment; If not, then let i = i + 1, j = 0, p = 0, x(i) and x(i + 1) are connected, and the angular difference threshold graph is created.
3. A data classification method, characterized in that: Create a complex network based on the method for constructing a complex network of data sequences based on an angular difference threshold graph as described in claim 1 or 2; The created complex network is represented by an adjacency matrix: A=[a ij ] N×N ; where a ij 1 means node i is connected to node j, a ij 0 means node i is not connected to node j, and N represents the number of nodes; Extract six features of complex networks, namely, degree mean D M , degree distribution entropy D DE , mean clustering coefficient C M , Clustering coefficient distribution entropy C DE , local efficiency mean E M , local efficiency distribution entropy E DE ; Based on the six extracted network features D M , D DE , C M , C DE 、E M and E DE , use machine learning models to train and test the data, and finally complete the classification and identification of the data.
4. The data classification method according to claim 3, characterized in that: Degree mean D M It is defined as the average of all node degrees, as follows: Where D i Represents the degree of node i, which is used to represent the number of nodes connected to the node; Where N is the total number of network nodes, a ij 1 means node i is connected to node j, a ij A value of 0 indicates that node i is not connected to node j.
5. The data classification method according to claim 3, characterized in that: Arrange the degree values of the nodes from small to large and define the degree distribution P D The ratio of the number of nodes corresponding to each degree value to the total number of nodes: Where D min and D max are the minimum and maximum degree values respectively, N represents the total number of network nodes, Represents the number of nodes corresponding to each degree value; According to the information entropy formula, we define the degree distribution entropy D DE :
6. The data classification method according to claim 3, characterized in that: Mean clustering coefficient C M It is defined as the average of the clustering coefficients of all nodes, and the expression is as follows: In the formula, C i represents the clustering coefficient of node i, and N represents the total number of network nodes; In the formula, a ij The adjacency matrix A = [a ij ] N×N The corresponding value in D i is the degree of node i, e i is the actual number of edges between all adjacent nodes of node i.
7. The data classification method according to claim 3, characterized in that: The range of the clustering coefficient is from 0 to 1, which is divided into K intervals, and then the clustering coefficients of all nodes are arranged in ascending order; Define the clustering coefficient distribution P C is the ratio of the number of nodes in each interval to the total number of nodes. The expression is as follows: in, represents the number of nodes in the kth interval, and N represents the total number of network nodes; According to the information entropy formula, the clustering coefficient distribution entropy C is defined DE as follows:
8. The data classification method according to claim 3, characterized in that: Local efficiency mean E M It is defined as the average of the local efficiencies of all nodes, as follows: In the formula, E i is the local efficiency value of the i-th node, and N represents the total number of network nodes; Where N i is the set of nodes in the subgraph formed by the adjacent nodes of node i, D i is the degree of node i, l jk is the shortest path length between nodes k and j.
9. The data classification method according to claim 3, characterized in that: The range of the local efficiency is from 0 to 1, which is divided into K intervals, and then the local efficiencies of all nodes are arranged in ascending order; Define the local efficiency distribution P E is the ratio of the number of nodes in each interval to the total number of nodes. The expression is as follows: in, represents the number of nodes in the kth interval, and N represents the total number of network nodes; Define the local efficiency distribution entropy E DE as follows:
10. The data classification method according to any one of claims 4 to 9, characterized in that: Based on the six extracted network features D M , D DE , C M , C DE 、E M and E DE , use a machine learning model to train and test the data, the machine learning model can be one or more of a decision tree DT, a k-nearest neighbor classifier KNN, a support vector machine SVM, and a Bayesian classifier; The classification accuracy of each machine learning model is calculated through ten-fold cross-validation.