Fuzzy cognitive map neural network modeling method and device for multivariate time series data classification

By analyzing multivariate time series data through fuzzy cognitive map neural network and bidirectional long short-term memory network, combined with dynamic time warping and peephole connection, the classification and interpretability problems of complex data are solved, and efficient multivariate time series data classification and rule extraction are achieved. .

CN118779705AActive Publication Date: 2024-10-15DALIAN UNIV OF TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410927668.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-10-15
Estimated Expiration
2044-07-11

AI Technical Summary

Technical Problem

Existing technologies are difficult to effectively analyze and classify complex, high-dimensional, large-scale multivariate time series data, and lack in-depth understanding of data dynamic patterns and model interpretability.

Method used

The fuzzy cognitive graph neural network is used to combine the two-way long short-term memory network with dynamic time warping and peephole connection. Through temporal feature similarity analysis and concept node weight learning, a classification model for multivariate temporal data is constructed, and the AFS decision tree is used to extract dynamic semantics. rule.

Benefits of technology

It improves the accuracy of multivariate time series data classification and the interpretability of the model, reduces computational complexity, and clearly understands feature relationships and interactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779705A_ABST
    Figure CN118779705A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of data processing, and provides a fuzzy cognitive map neural network modeling method and device for multivariate time sequence data classification, and the method specifically comprises the steps: collecting multivariate time sequence intensive care data and corresponding label data, and extracting multivariate time sequence representation data with discrimination and representativeness through a representation learning model. And dividing the characterization data by adopting time windows with different lengths, and obtaining corresponding instance-level characterization data through global maximum pooling operation. And determining a multi-scale representation data set for integrated modeling based on a similarity scale screening principle. And aiming at the screening result, carrying out quantitative identification on the feature importance by utilizing a limit gradient improvement decision tree, and then carrying out reordering. And dividing the reordered data into a plurality of feature subsets, establishing a hierarchical width network model, and realizing classification prediction under a corresponding scale. And fusing classification prediction results of all the base models by using a weighted average method to obtain final decision output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of data processing technology, the field of artificial intelligence (artificial neural network) pattern data fitting, recognition and classification, and relates to a fuzzy cognitive map (FCM) neural network modeling method and device for multivariate time series data classification. Background Art

[0002] Multivariate time series data analysis and classification based on artificial intelligence methods can provide more sufficient feature correlation and reference information. Multivariate time series data has the characteristics of complex distribution, multiple associated information, and diverse data sources. The execution of classification tasks has certain requirements for the artificial intelligence model used. The present invention proposes a modeling method of fuzzy cognitive graph neural network to realize feature correlation analysis and classification processing of time series data, and extract semantic information from the classification results to achieve the purpose of auxiliary classification.

[0003] Fuzzy cognitive graph is a model used to solve the modeling and analysis of complex systems. Each feature in the system is represented as a concept node, and the relationship between concept nodes is represented by directed edges. The weight on the edge represents the degree of influence of one concept node on another concept node. Compared with the traditional neural network model, the fuzzy cognitive graph can describe the mutual influence and correlation between each concept node at different times, and can more comprehensively describe and understand the characteristics and behaviors of complex models. Therefore, it has been widely used in the interpretability analysis of machine learning and artificial intelligence.

[0004] As a special neural network, the long short-term memory network is a feasible method for processing complex, high-dimensional, and large-scale time series data. The long short-term memory network has a strong memory capacity and can more effectively process long-term dependencies. Its core components are cell states and three-gate structures: the cell state c is used to store and transmit information. It is an internal state that spans the entire sequence and is updated through iterations of time steps; the three-gate structure is the forget gate fG, the input gate inG, and the output gate outG. Through the unique gate structure, the input sequence data can be selectively forgotten and retained, thereby achieving control and regulation of information.

[0005] The application scope of multivariate time series data is becoming more and more extensive, which leads to the data showing diverse distribution, rich associated information and a wide range of data sources. These characteristics make multivariate time series data complex, high-dimensional and large in scale. For this type of data, different features influence each other, showing complex correlations and time series laws, which brings huge challenges to data analysis and processing. Faced with such a complex data set, people urgently need to effectively analyze data, perform classification tasks, and extract dynamic laws from them. By combining advanced technologies such as deep learning and machine learning, we can better explore the key features and laws hidden behind the data, and provide more accurate and reliable support for decision-making in various fields. Therefore, how to make full use of multivariate time series data and use artificial intelligence technology for effective analysis and application has become an urgent task in current research and practice. Summary of the invention

[0006] The purpose of the present invention is to provide a fuzzy cognitive graph neural network modeling method for time series data classification. While ensuring the generalization ability and modeling performance of the neural network, the concept node time series weight learning strategy established by the fuzzy cognitive graph is used to analyze the correlation of concept nodes at different times, thereby realizing the classification prediction of multivariate time series data and improving the interpretability of the model.

[0007] The technical solution of the present invention:

[0008] A fuzzy cognitive graph neural network modeling method for multivariate time series data classification includes the following steps:

[0009] S1, collect and process data to form a multivariate time series data sample set;

[0010] Collect multivariate time series data to form a multivariate time series data sample set, and express the input sequence of the data sample set as Contains characteristic information describing multivariate time series; the output sequence of the data sample set is represented as Contains label information describing and judging multivariate time series data; where n is the number of samples, t is the duration of feature observations in the multivariate time series, m is the feature dimension of the sample, and o is the number of labels;

[0011] S2. Based on the multivariate time series data sample set, dynamic time warping is used to perform similarity analysis on the time series features. According to the analysis results, the time series features are divided to form multiple time series feature groups;

[0012] Dynamic time warping is used to perform similarity analysis on time series features of multivariate time series data sample sets. For a given multivariate time series data x d,i =[x d,i,1 ,x d,i,2…,x d,i,m ], x d,i,j represents the characteristic value of the jth feature of the dth sample at the i-th time, where n is the number of samples, t is the duration of the feature observation in the multivariate time series, and m is the characteristic dimension of the sample. represents the value of the jth feature of the dth sample at all times; calculate X d Two feature univariate and Similarity between time series and The DTW distance between The calculation formula is as follows:

[0013]

[0014] dist(x d,t,,a ,x d,t,b )=|x d,t,a -x d,t,b |

[0015] where dist(x d,t,a ,x d,t,b ) represents the time point x d,t,a and x d,t,b The Euclidean distance of , and dtw(x d,1,a ,x d,1,b )=0,

[0016] The above formula can be used to calculate the dth sample X d The similarity between all time series of variables is calculated by setting the threshold θ DTW , set the threshold θ DTW Compare with the DTW distance between the feature variable sequences to get the dth sample X d Similarity matrix c d,j,k Indicates whether the jth feature in the dth sample is similar to the kth feature. The specific calculation formula is as follows:

[0017]

[0018] If the jth feature in the dth sample is similar to the kth feature, that is, c d,j,k = 1, then the features j and k of the sample are classified into one class. If the jth feature in the dth sample is not similar to the kth feature, that is, c d,d,k =0, then the features j and k of the sample are divided into different categories.

[0019] Similarly, all samples are clustered using the DTW algorithm, and the cumulative similarity matrix of multivariate time series data containing n samples is c j Indicates whether the jth feature is similar to other features after comprehensively considering the feature similarities of all samples. Specifically, c j,k Indicates whether the j-th feature is similar to the k-th feature. The cumulative similarity matrix C is calculated as follows:

[0020]

[0021] Then, the hierarchical clustering method is used to cluster the features in the cumulative similarity matrix C to obtain feature groups suitable for the entire data set. First, each feature in the cumulative similarity matrix C is regarded as a separate cluster to form an initial cluster group; then the Euclidean distance is used to calculate the similarity between each cluster, and the clusters with the highest similarity are merged. At the same time, the distance between all features between the two clusters is calculated, and the average of these distances is used as the distance between the two clusters to update the similarity matrix. The number of clusters is gradually reduced through repeated calculations to form a hierarchical structure.

[0022] S3. Group by features and define the duration of feature action t 1 ,Concept nodes are generated through temporal fuzzy cognitive graph;

[0023] According to the division results of multivariate time series data, the original multivariate time series data sample set X is divided into N groups V = (V 1 ,V 2 ,…,V N ), after completing the feature division, new concept nodes are constructed by assigning different weights to different features. The weight reflects the contribution of each original feature in the concept node. At the same time, each time point in the time series data is interrelated and affects each other. In order to reveal the correlation between features at different times, it is also necessary to consider the past t 1 The influence of each concept node at a certain moment on the concept node generated at the current moment. Assume that the interaction relationship between sequences across time dimensions continues t 1 At a certain moment, the concept node with time memory is expressed as follows:

[0024]

[0025] in represents the concept node generated by sample d in the lth group at the tth time, W l Represents the generation of concept nodes The weight matrix composed of the importance of the grouped features of the original data is represents the original data of sample d in the lth group at the tth time, The concept node representing the generated sample d When 1 Concept node before time interval For the importance weight of the concept node at the current moment, the σ(x) function is a sigmoid function, which maps the output range between [0,1] and converts the predicted value into a probability:

[0026]

[0027] S4. Construct a bidirectional long short-term memory network with a peephole connection mode, use the updated concept nodes as the input of the model, and use the loss function to train the weights to form a learning model with temporal weights of concept nodes;

[0028] The classification model is designed using a bidirectional long short-term memory network that can process past and future information at the same time and a peephole long short-term memory network that can capture long-term dependencies. This model introduces peephole connections based on the traditional long short-term memory network model, introduces the cell state of the previous moment into the forget gate and the input gate, enhances the memory of historical information, and accepts the updated state of the cell in the output gate, further improving the efficiency of information transmission. At the same time, for multivariate time series data, there may be long-term dependencies between features. Subsequent data is used as another input to more deeply explore the interaction between different features. Therefore, a bidirectional idea is introduced into the model, and the output of each moment is predicted simultaneously using forward and reverse methods. The forward layer performs forward calculations from time 1 to time t, and the results are saved as the output of the forward hidden layer. When the reverse layer performs reverse calculations from time t to time 1, the results are saved as the output of the backward hidden layer. Finally, the final output of each moment is obtained by weighting the output of the forward layer and the output of the reverse layer. As the input of the model, the forward layer and the reverse layer are input respectively, and the final prediction result is obtained by weighting the output of the forward and reverse layers. Taking the forward layer as an example, the function of the forward layer forget gate is to use the current moment's forward input The output of the forward layer at the previous moment and the cell state of the previous moment in the forward layer Decide which information to forget from the cell state, and use the sigmoid function to control the output of the forget gate within the [0,1] interval. The function expression of the forward forget gate is:

[0029]

[0030] in, represents the weights and biases that need to be trained in the forward forget gate, σ(·) is the sigmoid activation function, and w 1is the weight between the input layer and the forward layer, The bias between the input layer and the forward layer;

[0031] The function of the positive input gate is to pass the positive input at the current moment The output of the forward layer at the previous moment and the cell state of the previous moment in the forward layer Determines whether the current input information is retained in the memory cell, that is, controls the impact of the input information at this moment on the memory cell. The function expression of the forward input gate is as follows:

[0032]

[0033] in, Represents the weights and biases that need to be trained in the forward forget gate;

[0034] At the same time, construct the current cell state Candidate vectors to be added The value of the candidate vector is mapped to [-1,1] through the hyperbolic tangent function. The specific calculation formula is:

[0035]

[0036] in, Represents the weights and biases that need to be trained when generating forward candidate vectors;

[0037] According to the current forget gate output and the cell state at the previous moment The product of , and the input gate output and the current candidate vector The product of can get the memory cell at this moment, which is the core of the LSTM structure responsible for storing and transmitting information:

[0038]

[0039] The last gate structure is the output gate, which first determines what information to output through a sigmoid transformation. Combined with tanh transformation to process the cell state, a certain output is obtained The function expression of the output gate is:

[0040]

[0041] in, Represents the weights and biases that need to be trained in the forward output gate;

[0042] In summary, the output of the hidden layer at the i-th moment can be obtained from the input at the current moment And the hidden state output of the previous moment And the cell state output at the previous moment The internal operation process of the peephole LSTM at the i-th moment is summarized by using F(·):

[0043]

[0044] Therefore, the output of the reverse layer at time i The calculation formula is as follows:

[0045]

[0046] where w 2 and are the weights and biases between the input layer and the reverse layer.

[0047] There is no connection between the forward layer and the reverse layer. The information transmission directions of each layer are different. The states calculated in the two layers are passed to the output layer to obtain the final output y at the current moment. d,i .

[0048]

[0049] where w 3 is the weight between the forward layer and the output, w 4 is the weight between the backward layer and the output, b y is bias;

[0050] The final prediction value of the classification model is the output y at time t d,t The error between it and the true value is calculated through the proposed loss function to minimize the objective function OF training to determine the model parameters.

[0051]

[0052] Among them, γ is the focus factor, which is used to adjust the weight of difficult and easy samples. The larger the value, the more attention is paid to difficult-to-classify samples; α is the balance parameter, which is used to balance the weight of positive and negative samples. It is usually set to the ratio between the number of samples of few categories and the number of samples of many categories. d,t is the final predicted value of sample d after the classification model, Y d Then it is the true label of sample d;

[0053] Let θ represent the parameters that need to be trained in the model, including W i (i=1,2,…,N),w, w 1 , w 2 , w 3、w 4 、b y The adaptive moment estimation algorithm (Adam) is used as the parameter optimization algorithm to update the parameters in the classification model.

[0054] S5. Based on the time series weight, different feature importance thresholds and moment importance thresholds are set to select important moment features and construct an AFS decision tree, thereby forming dynamic semantic rules for multivariate time series data;

[0055] Extracting rules during model building can help explain the model's prediction process. In many applications, especially when it comes to decision-making scenarios for human life or health, it is necessary to understand how the model makes predictions. By extracting rules, the complex operation process of the model can be converted into easy-to-understand rules or laws, which can improve the interpretability of the model. This patent uses the AFS decision tree to extract dynamic semantic rules from dynamic multivariate data.

[0056] In multivariate time series data analysis, the most recent data often plays a key role in data prediction and intervention. Based on the above considerations, it is particularly important to focus on the influence weight of the current moment concept node on the subsequent moment concept node obtained in the time series fuzzy cognitive graph, so as to screen out the moments and features with important significance in the multivariate time series.

[0057] Setting rule thresholds and in is the feature importance threshold, The most recent concept node. The input data grouped by each feature at time t and the past t 1 The concept nodes at the most recent moment work together to obtain. For the i-th concept node v at the most recent moment d,t , if the feature weight satisfies the following conditions, it means that the feature j at the most recent moment is Selected:

[0058]

[0059] in represents the important weight of the g-th feature in the l-th concept node, g l Represents the number of features that make up the lth concept node.

[0060] If the historical concept node satisfies the following conditions, it means that the value of the concept node v(e) at the time tt′ is Select:

[0061]

[0062] in The concept node representing the generated sample d When 1 Concept node before time interval The importance weight of the concept node at the current moment, t 1 Indicates the duration of the characteristic effect.

[0063] For the selected historical concept node The current feature values ​​and historical nodes that meet the threshold and affect the concept node can still be selected according to the above formula, and this process is iterated until no new historical concept nodes are selected.

[0064] Thus, we can get a total of Q concept node features that influence the most recent time, and construct the rule feature U = [U 1 ,U 2 ,…,U Q ], each factor of feature U contains the characteristic value of time series information, that is, U j The meaning is a certain feature value at a certain moment, so according to the rule feature U, a new feature set D for extracting rules can be obtained from the data set D A and sample set u.

[0065] D A ={(u 1 ,Y 1 ),(u 2 ,Y 2 ),…,(u n ,Y n )}

[0066]

[0067] Where (u d ,Y d )(d=1,…,n) represents the dth sample, u d =[U d,1 ,U d,2 ,…,U d,Q ] represents the regular features of this sample, U d,j represents the jth regular feature of this sample, Y d Represents the class label of this sample, and n represents the dataset D A The number of samples in .

[0068] Before building a decision tree, the continuous attributes are fuzzified, that is, the continuous attributes are conceptualized to obtain semantic information. q (q=1,…,Q), taking “small”, “medium” and “large” as simple concepts of features, respectively expressed as The simple concept set F after all continuous features are fuzzified can be expressed as:

[0069]

[0070] Feature q The expression of the membership degree of (q=1,…,kQ) to the kth (k=1,2,3) simple concept is as follows:

[0071]

[0072] where f q (u k ) represents sample u k Features of U q Value, Representation feature U q The maximum value obtained among all samples, Representation feature U q The minimum value obtained among all samples, Representation feature U q Get the mean value among all samples, Representation feature U q The maximum difference between the average value and the average value, which is used to measure the dispersion or deviation of the data. Representation feature U q The smallest difference from its average level, used to measure the concentration or stability of the data.

[0073] Use multiple single attributes to logically connect to form more complex attributes, and use AFS logical operation rules to generate a set of complex concepts EM * , which is defined as follows:

[0074]

[0075] Where I is a non-empty index set of simple concepts. represents f q The disjunction of Indicates all The conjunction of .

[0076] Based on simple concepts and AFS structure, we can get the consistent membership function. Assume ξ=∑ i∈I (f q )∈EM * It is a complex concept, and its membership function A ξ (u) is expressed as:

[0077]

[0078] in, For simple concepts q The weight function can be determined according to the data distribution, N u is the number of times the sample is observed.

[0079] The core of constructing an AFS decision tree is to always select the node with the largest information gain for splitting, so as to maximize the growth rate of the amount of complex concept information. Split the current node Ω and find the most suitable simple concept combination to ensure that the node after splitting The difference in information gain from node Ω before segmentation is the largest, that is:

[0080]

[0081] in, represents the information gain of the current node Ω, I Ω is the amount of information of the current node Ω, for The weighted information after splitting the current node Ω, based on which the simple concept F of splitting the current node is obtained max , where I Ω and The calculation method is as follows:

[0082]

[0083] Among them, β Ω For the set EM * The complex concepts in is the u in the Nth layer node d The membership degree of v c ∈D c represents the set of output samples of the cth category, Indicates that when the fuzzy concept f q The consistent membership of samples belonging to the cth class when splitting the current node Ω.

[0084] This can be used to Maximize the fuzzy concept of removing F from F max ,Right now:

[0085] F=F\F max

[0086] If the consistent membership function of the fuzzy concept satisfies δ is the set threshold, then a new tree node Ω∧F is constructed according to the AFS logical operation “∧” max If the information gain of the current node is negative, that is Or in the fuzzy attribute f q When the subset obtained by splitting Ω is an empty set, Stop expanding the child nodes and get the AFS decision tree. At this point, the fuzzy attribute from the root node to the leaf node is a semantic rule ξ.

[0087] Tab.1 Confusion matrix

[0088]

[0089]

[0090] The main purpose of the designed model is to perform classification tasks and dynamic rule extraction for multivariate time series data. Therefore, in order to examine the effect of the binary classification algorithm, TP is used to represent the number of samples where both the predicted value and the true value are positive, TN is used to represent the number of samples where both the predicted value and the true value are negative, FN is used to represent the number of samples where the predicted value is negative and the true value is positive, and FP is used to represent the number of samples where the predicted value is positive and the true value is negative. Table 1 is the confusion matrix of different attributes of the predicted value and the true value. In Table 1, only the above four situations will occur in the binary classification problem, so the following indicators are defined based on these four results.

[0091] (1) Accuracy: The percentage of correct predictions.

[0092]

[0093] (2) Precision: The ratio of samples that are actually positive and predicted to be positive to all samples that are predicted to be positive.

[0094]

[0095] (3) Recall: The ratio of samples that are actually positive and predicted to be positive to all samples that are actually positive. The purpose of recall is to make all positive classes predicted as much as possible, and it is often used in medical data classification.

[0096]

[0097] (4) F1-score: The harmonic mean of precision and recall, used to comprehensively evaluate the performance of the model.

[0098]

[0099] (5) ROC curve and AUROC

[0100] The ROC curve (Receiver Operating Characteristic Curve) is drawn with the False Positive Rate (FPR) as the horizontal axis and the True Positive Rate (TPR) as the vertical axis. The ROC curve is a visual display of the model performance under different classification thresholds. AUROC (Area Under the ROC Curve) is the area under the ROC curve, which is used to quantify the classification performance of the model. The larger the AUROC value, the better the performance of the model.

[0101] (6) PRC curve and AUPRC

[0102] The PRC curve is plotted with recall as the horizontal axis and precision as the vertical axis. The closer the PRC curve is to the upper right corner, the better the model performance. AUPRC (Area Under the Precision-Recall Curve) is the area under the PRC curve, which is used to comprehensively evaluate the average precision of the model at different recall rates. The higher the AUPRC value, the better the performance of the model. Unlike AUC, AUPRC is more suitable for processing unbalanced data sets and tasks that focus on positive example recognition.

[0103] The present invention also provides a device for multivariate time series data analysis and modeling method, comprising:

[0104] The acquisition unit is used to acquire data and process the data to form a multivariate time series data sample.

[0105] The first construction unit is used for a multivariate time series data sample set, performs similarity analysis on time series features using dynamic time warping, and divides the features according to the analysis results to form multiple feature groups.

[0106] The second construction unit is used to generate concept nodes according to feature grouping and define the feature action duration t 1 ,update the concept nodes through the temporal fuzzy cognitive graph;

[0107] The third construction unit is used to construct a bidirectional long short-term memory network with a peephole connection mode, take the updated concept nodes as the input of the model, and use the loss function to train the weights to form a learning model with the temporal weights of the concept nodes;

[0108] The rule extraction unit sets different feature importance thresholds and moment importance thresholds based on the time series weight to select important moment features and construct an AFS decision tree, thereby forming dynamic semantic rules for multivariate time series data.

[0109] Beneficial effects of the invention: The invention proposes a novel modeling method of a long short-term memory network variant based on a temporal fuzzy cognitive graph, which can realize classification tasks and dynamic rule extraction through temporal feature similarity analysis, feature learning, and important feature selection of multivariate temporal data. In view of the complex distribution, diverse associated data, and diverse data channels of multivariate temporal data, a complex, high-dimensional, and large-scale sample set is formed. The proposed LSTM network variant based on temporal fuzzy cognitive graph can group multi-dimensional temporal features through temporal feature similarity analysis, reduce redundant features, improve the efficiency and performance of the model, and generate input for subsequent models; the features of different groups are fused into new concept nodes, and the concept nodes are updated using the temporal weights of the temporal fuzzy authentication graph, aiming to reduce the scale of the fuzzy cognitive graph, reduce the number of concept nodes and the computational complexity of processing, better utilize the correlation and similarity between features, more clearly understand the relationship and interaction between similar features, and enhance the interpretability of the model prediction results; the updated concept nodes are used as the input of a bidirectional LSTM network with peephole connections, and are input into the forward layer and the reverse layer respectively. The final prediction result is obtained by weighting the outputs of the forward and reverse layers, and the classification accuracy of the model and the weights related to the temporal concept nodes are trained using the loss function S-FL. At the same time, since this method includes the influence weight of the concept node of the current moment on the concept node of the subsequent moment, it can screen out the moments and features of great significance in the multivariate time series. By extracting rules, the complex operation process of the model can be converted into easy-to-understand rules, which can improve the interpretability of the multivariate time series data classification model and provide a feasible solution for multivariate time series data classification and model interpretability. BRIEF DESCRIPTION OF THE DRAWINGS

[0110] Figure 1 It is a flow chart of a fuzzy cognitive graph neural modeling method for multivariate time series data classification provided by the present invention;

[0111] Figure 2 It is a structural schematic diagram of a long short-term memory network variant based on a temporal fuzzy cognitive map provided by the present invention;

[0112] Figure 3 This is a dynamic rule extraction process based on the AFS decision tree provided by the present invention; DETAILED DESCRIPTION

[0113] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0114] In view of this, an embodiment of the present invention provides a fuzzy cognitive graph neural network modeling method for sepsis data classification. Figure 1 , which is a flow chart of a fuzzy cognitive graph neural network provided by an embodiment of the present invention, including:

[0115] S1. Collecting and processing data to form a sepsis data sample set;

[0116] S2. Based on the sepsis data sample set, dynamic time warping is used to perform similarity analysis on time series features. According to the analysis results, the features are divided to form multiple feature groups.

[0117] S3. Generate concept nodes based on feature grouping and define feature action duration t 1 ,update the concept nodes through the temporal fuzzy cognitive graph;

[0118] S4. Construct a bidirectional long short-term memory network with a peephole connection mode, use the updated concept nodes as the input of the model, and use the loss function to train the weights to form a learning model with temporal weights of concept nodes;

[0119] S5. Based on the temporal weight, different feature importance thresholds and moment importance thresholds are set to select important moment features and construct an AFS decision tree to form dynamic semantic rules for sepsis data.

[0120] Specifically, S1 includes:

[0121] Taking the German sepsis dataset Sepsisexp( https: / / www.cl.uniheidelberg.de / statnlpgroup / sepsisexp) as an example. This dataset is collected based on the data management system running at the University Medical Center Mannheim (UMM) in Germany. 43 features are extracted from the intensive care and anesthesia systems, namely: respiratory minute volume (MVV), platelets (PLT), blood glucose (GLU), heart rate (HR), Horowitz index (HOR), base excess (BE), white blood cells (WBC), blood urea / creatinine ratio (BUN / CR), chloride ion (CL), body temperature (TEMP), temperature difference (TEMPDIFF), calcium (CA), carbon dioxide partial pressure (PaCO2), lactate (LAC), potassium (K), respiratory rate (RR), bicarbonate ion (HCO3), mixed venous oxygen saturation (SvO2), arterial pH (pH), C-reactive protein (CRP), urine volume (VOL), bilirubin (BIL), hemoglobin (HB), blood urea nitrogen (BUN), cardiac minute volume (CI), alanine aminotransferase (ALT), creatinine (CREA), lymphocytes (LYM), aspartate aminotransferase (AST), diastolic blood pressure (DBP), sodium (NA), ejection fraction (EF), inspired oxygen fraction (FiO2), pancreatic lipase (AMYL), ejection resistance index (SVRI), mean arterial pressure (MAP), procalcitonin (PT), age (Age), the timeline of the patient's hospitalization in the ICU was discretized into a uniform step of 30 minutes, all values ​​were standardized by calculating z-scores, and a disease label (0 or 1) was given. Four training files are provided in the database, and the number of samples in each file is 319, of which 64 are sick and 255 are not sick, with an imbalance rate of 3.98. The biochemical index detection data associated with sepsis are collected to form a data sample set, and the input sequence of the data sample set is represented as It contains characteristic information describing sepsis, and the output sequence is represented as It contains label information describing the judgment of sepsis; where n is the number of samples, t is the duration of feature observations in the multivariate time series, m is the feature dimension of the sample, and o is the number of labels.

[0122] Furthermore, S2 is used to perform similarity analysis on the time series features. According to the analysis results, the features are divided to form multiple feature groups, including:

[0123] Based on the sepsis data sample set described in S1, dynamic time warping is used to perform similarity analysis on time series features. For a given multivariate time series data x d,i =[x d,i,1 ,x d,i,2 …,x d,i,m ], x d,i,jrepresents the characteristic value of the jth feature of the dth sample at the i-th time, where n is the number of samples, t is the duration of the feature observation in the multivariate time series, and m is the characteristic dimension of the sample. represents the value of the jth feature of the dth sample at all times. Calculate X d Two feature univariate and Similarity between time series and The DTW distance between The calculation formula is as follows.

[0124]

[0125] dist(x d,t,a ,x d,t,b )=|x d,t,a -x d,t,b |

[0126] where dist(x d,t,a ,x d,t,b ) represents the time point x d,t,a and x d,t,b The Euclidean distance of , and dtw(x d,1,a ,x d,1,b )=0,

[0127] The d-th sample X can be calculated by d The similarity between all time series of variables is calculated by setting the threshold θ DTW , set the threshold θ DTW Compare with the DTW distance between the feature variable sequences to get the dth sample X d Similarity matrix c d,j,k Indicates whether the jth feature in the dth sample is similar to the kth feature. The specific calculation formula is as follows:

[0128]

[0129] If the jth feature in the dth sample is similar to the kth feature, that is, c d,j,k = 1, then the features j and k of the sample are classified into one class. If the jth feature in the dth sample is not similar to the kth feature, that is, c d,j,k =0, then the features j and k of the sample are divided into different categories.

[0130] Similarly, all samples are clustered using the DTW algorithm, and the cumulative similarity matrix of multivariate time series data containing n samples is c jIndicates whether the jth feature is similar to other features after comprehensively considering the feature similarities of all samples. Specifically, c j,k Indicates whether the j-th feature is similar to the k-th feature. The cumulative similarity matrix C is calculated as follows:

[0131]

[0132] Then, the hierarchical clustering method is used to cluster the features in the cumulative similarity matrix C to obtain feature groups suitable for the entire data set. First, each feature in the cumulative similarity matrix C is regarded as a separate cluster to form an initial cluster group; then the Euclidean distance is used to calculate the similarity between each cluster, and the clusters with the highest similarity are merged. At the same time, the distance between all features between the two clusters is calculated, and the average of these distances is used as the distance between the two clusters to update the similarity matrix. The number of clusters is gradually reduced through repeated calculations to form a hierarchical structure.

[0133] Furthermore, S3 generates concept nodes based on feature grouping and defines the feature action duration t 1 , the concept nodes are updated through the temporal fuzzy cognitive graph, including:

[0134] According to the partitioning results of the sepsis data set obtained by S2, the original multivariate time series data sample set X is divided into N groups V = (V 1 ,V 2 , … ,V N ), after completing the feature division, new concept nodes are constructed by assigning different weights to different features. The weight reflects the contribution of each original feature in the concept node. At the same time, each time point in the time series data is interrelated and affects each other. In order to reveal the correlation between features at different times, it is also necessary to consider the past t 1 The influence of each concept node at a certain moment on the concept node generated at the current moment. Assume that the interaction relationship between sequences across time dimensions continues t 1 At a certain moment, the concept node with time memory is expressed as follows:

[0135]

[0136] in represents the concept node generated by sample d in the lth group at the tth time, W l Represents the generation of concept nodes The weight matrix composed of the importance of the grouped features of the original data is represents the original data of sample d in the lth group at the tth time, The concept node representing the generated sample d When 1 Concept node before time interval For the importance weight of the concept node at the current moment, the σ(x) function is a sigmoid function, which maps the output range between [0,1] and converts the predicted value into a probability:

[0137]

[0138] Furthermore, a bidirectional long short-term memory network with peephole connection is constructed through S4, the updated concept nodes are used as the input of the model, and the weights are trained using the loss function to form a learning model with temporal weights of concept nodes. For the detailed process, please refer to Figure 2 , specifically including:

[0139] According to S3, the updated concept node v d,i As the input of the model, a classification model is designed using a bidirectional long short-term memory network that can process past and future information at the same time and a peephole long short-term memory network that can capture long-term dependencies. This model introduces peephole connections based on the traditional long short-term memory network model, introduces the cell state of the previous moment into the forget gate and the input gate, enhances the memory of historical information, and accepts the updated state of the cell in the output gate part, further improving the efficiency of information transmission. At the same time, for multivariate time series data, there may be long-term dependencies between features. Subsequent data is used as another input to more deeply explore the interaction between different features. Therefore, a bidirectional idea is introduced into the model, and the output of each moment is predicted simultaneously using forward and reverse methods. The forward layer performs forward calculations from time 1 to time t, and the results are saved as the output of the forward hidden layer. When the reverse layer performs reverse calculations from time t to time 1, the results are saved as the output of the backward hidden layer. Finally, the final output of each moment is obtained by weighting the output of the forward layer and the output of the reverse layer. As the input of the model, the forward layer and the reverse layer are input respectively, and the final prediction result is obtained by weighting the output of the forward and reverse layers. Taking the forward layer as an example, the function of the forward layer forget gate is to use the current moment's forward input The output of the forward layer at the previous moment and the cell state of the previous moment in the forward layer Decide which information to forget from the cell state, and use the sigmoid function to control the output of the forget gate within the [0,1] interval. The function expression of the forward forget gate is:

[0140]

[0141] in, represents the weights and biases that need to be trained in the forward forget gate, σ(·) is the sigmoid activation function, and w 1 is the weight between the input layer and the forward layer, The bias between the input layer and the forward layer;

[0142] The function of the positive input gate is to pass the positive input at the current moment The output of the forward layer at the previous moment and the cell state of the previous moment in the forward layer Determines whether the current input information is retained in the memory cell, that is, controls the impact of the input information at this moment on the memory cell. The function expression of the forward input gate is as follows:

[0143]

[0144] in, Represents the weights and biases that need to be trained in the forward forget gate;

[0145] At the same time, construct the current cell state Candidate vectors to be added The value of the candidate vector is mapped to [-1,1] through the hyperbolic tangent function. The specific calculation formula is:

[0146]

[0147] in, Represents the weights and biases that need to be trained when generating forward candidate vectors;

[0148] According to the current forget gate output and the cell state at the previous moment The product of , and the input gate output and the current candidate vector The product of can get the memory cell at this moment, which is the core of the LSTM structure responsible for storing and transmitting information:

[0149]

[0150] The last gate structure is the output gate, which first determines what information to output through a sigmoid transformation. Combined with tanh transformation to process the cell state, a certain output is obtained The function expression of the output gate is:

[0151]

[0152] in, Represents the weights and biases that need to be trained in the forward output gate;

[0153] In summary, the output of the hidden layer at the i-th moment can be obtained from the input at the current moment And the hidden state output of the previous moment And the cell state output at the previous moment The internal operation process of the peephole LSTM at the i-th moment is summarized by using F(·):

[0154]

[0155] Therefore, the output of the reverse layer at time i The calculation formula is as follows:

[0156]

[0157] where w 2 and are the weights and biases between the input layer and the reverse layer.

[0158] There is no connection between the forward layer and the reverse layer. The information transmission directions of each layer are different. The states calculated in the two layers are passed to the output layer to obtain the final output y at the current moment. d,i .

[0159]

[0160] where w 3 is the weight between the forward layer and the output, w 4 is the weight between the backward layer and the output, b y is bias;

[0161] The final prediction value of the classification model is the output y at time t d,t The error between it and the true value is calculated through the proposed loss function to minimize the objective function OF training to determine the model parameters.

[0162]

[0163] Among them, γ is the focus factor, which is used to adjust the weight of difficult and easy samples. The larger the value, the more attention is paid to difficult-to-classify samples; α is the balance parameter, which is used to balance the weight of positive and negative samples. It is usually set to the ratio between the number of samples of few categories and the number of samples of many categories. d,t is the final predicted value of sample d after the classification model, Y d Then it is the true label of sample d;

[0164] Let θ represent the parameters that need to be trained in the model, including W i (i=1,2,…,N),w, w 1 , w 2 , w 3 、w 4 、b y The adaptive moment estimation algorithm (Adam) is used as the parameter optimization algorithm to update the parameters in the classification model.

[0165] Specifically, the main steps of the Adam algorithm are as follows:

[0166] (1) Initialization parameters: First, initialize the model parameters θ and the initial first-order moment estimate m 0 and the second-order moment estimate v 0 All are set to 0;

[0167] (2) Calculate gradient: Back-propagating the parameters through the loss function is one of the key steps in optimizing model parameters. The chain rule is used to calculate the gradient g of the loss function with respect to the model parameters. t ;

[0168]

[0169] where θ t-1 represents the model parameters before the tth iteration, J(θ t-1 ) indicates that the parameter θ t-1 The loss function below.

[0170] (3) Calculate the first-order moment estimate m t and the second-order moment estimate ν t : Calculate the first-order moment estimate m of the gradient of each parameter t and the second-order moment estimate v t ;

[0171] m t =β 1 m t-1 +(1-β 1 ) t (θ t-1 )

[0172]

[0173] Where t represents the current iteration number, β 1 represents the coefficient of the partial first-order moment estimate, β 2 represents the coefficient of the partial second moment estimate, β 1 and β 2 The values ​​of are all between 0 and 1, and g represents the parameter gradient;

[0174] (4) Update parameters: unbiased first-order matrix value of the parameters And the unbiased second-order matrix value Perform calculations to update the model's training parameters, dynamically adjust the learning rate, and update each parameter.

[0175]

[0176] Where δ is a constant set to avoid the denominator being 0, η is the learning rate, and the parameter update for the tth iteration is θ t .

[0177] (5) Repeat steps 2 to 4 until the set number of iterations T is reached. max , the weights are no longer updated and the model training ends.

[0178] In this way, the Adam algorithm can adaptively adjust the learning rate during the training process, which helps to accelerate convergence and improve the training effect of the model. The designed S-FL loss function and Adam algorithm can finally obtain the classification result y d,t And the parameters θ that need to be trained in the model.

[0179] Furthermore, based on S5 and using the time series weight, different feature importance thresholds and moment importance thresholds are set to select important moment features, and an AFS decision tree is constructed to form dynamic semantic rules for sepsis data, which are specifically described as follows:

[0180] Setting rule thresholds and in is the feature importance threshold, The most recent concept node. The input data grouped by each feature at time t and the past t 1 The concept nodes at the most recent moment work together to obtain. For the i-th concept node v at the most recent moment d,t , if the feature weight satisfies the following conditions, it means that the feature j at the most recent moment is Selected:

[0181]

[0182] in represents the important weight of the g-th feature in the l-th concept node, g l Represents the number of features that make up the lth concept node.

[0183] If the historical concept node satisfies the following conditions, it means that the value of the concept node v(e) at the time tt′ is Select:

[0184]

[0185] in The concept node representing the generated sample d When 1 Concept node before time interval The importance weight of the concept node at the current moment, t 1 Indicates the duration of the characteristic effect.

[0186] For the selected historical concept node The current feature values ​​and historical nodes that meet the threshold and affect the concept node can still be selected according to the above formula, and this process is iterated until no new historical concept nodes are selected.

[0187] Thus, we can get a total of Q concept node features that influence the most recent time, and construct the rule feature U = [U 1 ,U 2 ,…,U Q ], each factor of feature U contains the characteristic value of time series information, that is, U j The meaning is a certain feature value at a certain moment, so according to the rule feature U, a new feature set D for extracting rules can be obtained from the data set D A and sample set u.

[0188] D A ={(u 1 ,Y 1 ),(u 2 ,Y 2 ), … ,(u n ,T n )}

[0189]

[0190] Where (u d ,Y d )(d=1,…,n) represents the dth sample, u d =[U d,1 ,U d,2 ,…,U d,q ] represents the regular features of this sample, U d,j represents the jth regular feature of this sample, Y d Represents the class label of this sample, and n represents the dataset D A The number of samples in .

[0191] Before building a decision tree, the continuous attributes are fuzzified, that is, the continuous attributes are conceptualized to obtain semantic information. q (q=1,…,Q), taking “small”, “medium” and “large” as simple concepts of features, respectively expressed as The simple concept set F after all continuous features are fuzzified can be expressed as:

[0192]

[0193] Feature q The expression of the membership degree of (q=1,…,Q) to the kth (k=1,2,3) simple concept is as follows:

[0194]

[0195] where f q (u k ) represents sample u k Features of U i Value, Representation feature U q The maximum value obtained among all samples, Representation feature U q The minimum value obtained among all samples, Representation feature U q Get the mean value among all samples, Representation feature U q The maximum difference between the average value and the average value, which is used to measure the dispersion or deviation of the data. Representation feature U q The smallest difference from its average level, used to measure the concentration or stability of the data.

[0196] Use multiple single attributes to logically connect to form more complex attributes, and use AFS logical operation rules to generate a set of complex concepts EM * , which is defined as follows:

[0197]

[0198] Where I is a non-empty index set of simple concepts. represents f q The disjunction of Indicates all The conjunction of .

[0199] For example, the important time series features related to sepsis selected are {Horowitz index at the most recent moment, systemic vascular resistance index at the most recent moment, calcium value at the most recent moment, potassium value at the previous two moments, creatinine value at the previous three moments}, then the simple concept set is F = {Horowitz index at the most recent moment is small, Horowitz index at the most recent moment is medium, Horowitz index at the most recent moment is large, systemic vascular resistance index at the most recent moment is small, systemic vascular resistance index at the most recent moment is medium, systemic vascular resistance index at the most recent moment is large, calcium value at the most recent moment is small, calcium value at the most recent moment is medium, calcium value at the most recent moment is large, potassium value at the previous two moments is small, potassium value at the previous two moments is medium, potassium value at the previous two moments is large, creatinine value at the previous three moments is small, creatinine value at the previous three moments is medium, creatinine value at the previous three moments is large}, record where γ 1 Indicates "patients whose Horowitz index at the most recent moment is small and whose systemic vascular resistance index at the most recent moment is moderate", γ 2 It means "patients whose systemic vascular resistance index is low and whose calcium value is moderate at the most recent moment", and γ 3 =γ 1 +γ 2 = Here, “+” indicates disjunction, so γ 3 It can mean “a patient whose Horowitz index at the most recent moment is small and whose systemic vascular resistance index at the most recent moment is medium” or “a patient whose systemic vascular resistance index at the most recent moment is small and whose calcium value at the most recent moment is medium”.

[0200] Based on simple concepts and AFS structure, we can get the consistent membership function. Assume ξ=∑ i∈I (f q )∈EM * It is a complex concept, and its membership function A ξ (u) is expressed as:

[0201]

[0202] in, For simple concepts q The weight function can be determined according to the data distribution, N u is the number of times the sample is observed.

[0203] The core of constructing an AFS decision tree is to always select the node with the largest information gain for splitting, so as to maximize the growth rate of the amount of complex concept information. Split the current node Ω and find the most suitable simple concept combination to ensure that the node after splitting The difference in information gain from node Ω before segmentation is the largest, that is:

[0204]

[0205] in, represents the information gain of the current node Ω, I Ω is the amount of information of the current node Ω, for The weighted information after splitting the current node Ω, based on which the simple concept F of splitting the current node is obtained max , where I Ω and The calculation method is as follows:

[0206]

[0207]

[0208] Among them, β Ω For the set EM * The complex concepts in is the u in the Nth layer node d The membership degree of v c ∈D c represents the set of output samples of the cth category, Indicates that when the fuzzy concept f q The consistent membership of samples belonging to the cth class when splitting the current node Ω.

[0209] This can be used to Maximize the fuzzy concept of removing F from F max ,Right now:

[0210] F=F\f max

[0211] If the consistent membership function of the fuzzy concept satisfies δ is the set threshold, then a new tree node Ω∧f is constructed according to the AFS logical operation “∧” max If the information gain of the current node is negative, that is Or in the fuzzy attribute F q When the subset obtained by splitting Ω is an empty set, Stop expanding the child nodes and get the AFS decision tree. At this point, the fuzzy attribute from the root node to the leaf node is a semantic rule ξ.

[0212] Please refer to the detailed process Figure 3 , which is a dynamic rule extraction process based on AFS decision tree provided by the present invention.

[0213] The various embodiments of the present invention are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other. The focus of each embodiment is to highlight the differences from other embodiments. In particular, in the system embodiment, since it is basically similar to the method embodiment, its description is relatively brief, and relevant information can refer to the detailed description of the method embodiment.

[0214] It should be clear that the above content only represents the embodiments of the present invention and does not limit the present invention. For those skilled in the art, the present invention has the possibility of multiple modifications and variations. Any modification, equivalent substitution, improvement, etc. that conforms to the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims

1. A fuzzy cognitive graph neural network modeling method for multivariate time series data classification, It is characterized in that The following steps are involved: S1, collect and process data to form a multivariate time series data sample set; Collect multivariate time series data to form a multivariate time series data sample set, and express the input sequence of the data sample set as Contains characteristic information describing multivariate time series; the output sequence of the data sample set is represented as Contains label information describing and judging multivariate time series data; where n is the number of samples, t is the duration of feature observations in the multivariate time series, m is the feature dimension of the sample, and o is the number of labels; S2. Based on the multivariate time series data sample set, dynamic time warping is used to perform similarity analysis on the time series features. According to the analysis results, the time series features are divided to form multiple time series feature groups; Dynamic time warping is used to perform similarity analysis on time series features of multivariate time series data sample sets. For a given multivariate time series data x d,i =[x d,i,1 ,x d,i,2 …,x d,i,m ], x d,i,j represents the characteristic value of the jth feature of the dth sample at the i-th time, where n is the number of samples, t is the duration of the feature observation in the multivariate time series, and m is the characteristic dimension of the sample. represents the value of the jth feature of the dth sample at all times; calculate X d Two feature univariate and Similarity between time series and The DTW distance between The calculation formula is as follows: dist(x d,t,a ,x d,t,b )=|x d,t,a -x d,t,b | Among them, dist(x d,t,a ,x d,t,b ) represents the time point x d,t,a and x d,t,b The Euclidean distance of , and dtw(x d,1,a ,x d,1,b )=0, Calculate the dth sample X by the above formula d The similarity between all time series of variables is calculated by setting the threshold θ DTW , set the threshold θ DTW Compare with the DTW distance between the feature variable sequences to get the dth sample X d Similarity matrix c d,j,k Indicates whether the jth feature in the dth sample is similar to the kth feature. The specific calculation formula is as follows: If the jth feature in the dth sample is similar to the kth feature, that is, c d,j,k = 1, then the features j and k of the sample are classified into one class. If the jth feature in the dth sample is not similar to the kth feature, that is, c d,j,k =0, then the features j and k of the sample are divided into different categories; Similarly, all samples are clustered using the DTW algorithm, and the cumulative similarity matrix of multivariate time series data containing n samples is c j Indicates whether the jth feature is similar to other features after comprehensively considering the feature similarities of all samples. Specifically, c j,k Indicates whether the j-th feature is similar to the k-th feature. The cumulative similarity matrix C is calculated as follows: Then, the hierarchical clustering method is used to cluster the features in the cumulative similarity matrix C to obtain the feature grouping suitable for the entire data set; first, each feature in the cumulative similarity matrix C is regarded as a separate cluster to form an initial cluster grouping; then the Euclidean distance is used to calculate the similarity between each cluster, and the clusters with the highest similarity are merged. At the same time, the distance between all features between two clusters is calculated, and the average of these distances is used as the distance between the two clusters to update the similarity matrix; the number of clusters is gradually reduced through repeated calculations to form a hierarchical structure; S3. Group by features and define the duration of feature action t 1 ,Concept nodes are generated through temporal fuzzy cognitive graph; According to the division results of multivariate time series data, the original multivariate time series data sample set X is divided into N groups V = (V 1 ,V 2 , … ,V N ), after completing the feature division, new concept nodes are constructed by assigning different weights to different features. The weight reflects the contribution of each original feature in the concept node. At the same time, each time point in the time series data is interrelated and affects each other. In order to reveal the correlation between features at different times, it is also necessary to consider the past t 1 The influence of each concept node at the moment on the concept node generated at the current moment; assuming that the interaction relationship between sequences across time dimensions continues t 1 At a certain moment, the concept node with time memory is expressed as follows: in, represents the concept node generated by sample d in the lth group at the tth time, W l Represents the generation of concept nodes The weight matrix composed of the importance of the grouped features of the original data is represents the original data of sample d in the lth group at the tth time, The concept node representing the generated sample d When 1 Concept node before time interval For the importance weight of the concept node at the current moment, the σ(x) function is a sigmoid function, which maps the output range between [0,1] and converts the predicted value into a probability: S4. Construct a bidirectional long short-term memory network with a peephole connection mode, use the updated concept nodes as the input of the model, and use the loss function to train the weights to form a learning model with temporal weights of concept nodes; The classification model is designed by using a bidirectional long short-term memory network that can process past and future information at the same time and a peephole long short-term memory network that can capture long-term dependencies. The model introduces peephole connections based on the traditional long short-term memory network model, introduces the cell state of the previous moment into the forget gate and the input gate, enhances the memory of historical information, and accepts the updated state of the cell in the output gate part, further improving the efficiency of information transmission. At the same time, for multivariate time series data, there may be long-term dependencies between features. Subsequent data is used as another input to more deeply explore the interaction between different features. Therefore, a bidirectional idea is introduced into the model, and the output of each moment is predicted simultaneously using forward and reverse methods. The forward layer performs forward calculations from time 1 to time t, and the results are saved as the output of the forward hidden layer. When the reverse layer performs reverse calculations from time t to time 1, the results are saved as the output of the backward hidden layer. Finally, the final output of each moment is obtained by weighting the output of the forward layer and the output of the reverse layer. The concept nodes are As the input of the model, the forward layer and the reverse layer are input respectively, and the final prediction result is obtained by weighting the output of the forward and reverse layers; for the forward layer, the role of the forward layer forget gate is to use the current moment's forward input The output of the forward layer at the previous moment and the cell state of the previous moment in the forward layer Decide which information to forget from the cell state, and use the sigmoid function to control the output of the forget gate within the [0,1] interval. The function expression of the forward forget gate is: in, represents the weights and biases that need to be trained in the forward forget gate, σ(·) is the sigmoid activation function, and w 1 is the weight between the input layer and the forward layer, The bias between the input layer and the forward layer; The function of the positive input gate is to pass the positive input at the current moment The output of the forward layer at the previous moment and the cell state of the previous moment in the forward layer Determines whether the current input information is retained in the memory cell, that is, controls the impact of the input information at this moment on the memory cell; the function expression of the forward input gate is as follows: in, Represents the weights and biases that need to be trained in the forward forget gate; At the same time, construct the current cell state Candidate vectors to be added The value of the candidate vector is mapped to [-1,1] through the hyperbolic tangent function. The specific calculation formula is: in, Represents the weights and biases that need to be trained when generating forward candidate vectors; According to the current forget gate output and the cell state at the previous moment The product of , and the input gate output and the candidate vector at the current moment The product of , we get the memory cell at this moment, which is the core of the LSTM structure responsible for storing and transmitting information: The last gate structure is the output gate, which first determines what information to output through a sigmoid transformation. Combined with tanh transformation to process the cell state, a certain output is obtained The function expression of the output gate is: in, Represents the weights and biases that need to be trained in the forward output gate; In summary, the output of the hidden layer at the i-th moment can be obtained from the input at the current moment And the hidden state output of the previous moment And the cell state output at the previous moment The internal operation process of the peephole LSTM at the i-th moment is summarized by using F(·): Therefore, the output of the reverse layer at time i The calculation formula is as follows: where w 2 and is the weight and bias between the input layer and the reverse layer; There is no connection between the forward layer and the reverse layer. The information transmission directions of each layer are different. The states calculated in the two layers are passed to the output layer to obtain the final output y at the current moment. d,i ; where w 3 is the weight between the forward layer and the output, w 4 is the weight between the backward layer and the output, b y is bias; The final prediction value of the classification model is the output y at time t d,t , the error between it and the true value is calculated through the proposed loss function to minimize the objective function OF training to determine the model parameters; Among them, γ is the focus factor, which is used to adjust the weight of difficult and easy samples. The larger the value, the more attention is paid to difficult-to-classify samples. α is the balance parameter, which is used to balance the weight of positive and negative samples. It is set to the ratio between the number of samples with few categories and the number of samples with many categories. d,t is the final predicted value of sample d after the classification model, Y d Then it is the true label of sample d; Let θ represent the parameters that need to be trained in the model, including W i (i=1,2,…,N),w, w 1 , w 2 , w 3 、w 4 、b y ; Adaptive moment estimation algorithm is used as parameter optimization algorithm to update the parameters in the classification model; S5. Based on the time series weight, different feature importance thresholds and moment importance thresholds are set to select important moment features and construct an AFS decision tree, thereby forming dynamic semantic rules for multivariate time series data; Setting rule thresholds and in is the feature importance threshold, is the moment importance threshold; the concept node of the most recent moment The input data grouped by each feature at time t and the past t 1 The concept nodes at the most recent moment work together to obtain; for the i-th concept node v d,t , if the feature weight satisfies the following conditions, it means that the feature j at the most recent moment is Selected: in, represents the important weight of the g-th feature in the l-th concept node, g l Indicates the number of features that make up the lth concept node; If the historical concept node satisfies the following conditions, it means that the value of the concept node v(e) at the time tt′ is Select: in, The concept node representing the generated sample d When 1 Concept node before time interval The importance weight of the concept node at the current moment, t 1 Indicates the duration of the characteristic effect; For the selected historical concept node The current feature value and historical nodes that meet the threshold and affect the concept node can still be selected according to the above formula, and this process is iterated until no new historical concept node is selected; Thus, we can get a total of Q concept node features that influence the most recent time, and construct the rule feature U = [U 1 ,U 2 ,…,U Q ], each factor of feature U contains the characteristic value of time series information, that is, U j The meaning is a certain feature value at a certain moment, so according to the rule feature U, a new feature set D for extracting rules can be obtained from the data set D. A and sample set u; D A ={(u 1 ,Y 1 ),(u 2 ,Y 2 ),…,(u n ,Y n )} Where (u d ,Y d )(d=1,…,n) represents the dth sample, u d =[U d,1 ,U d,2 ,…,U d,Q ] represents the regular features of this sample, U d,j represents the jth regular feature of this sample, Y d Represents the class label of this sample, and n represents the dataset D A The number of samples in ; Before building a decision tree, the continuous attributes are fuzzified, that is, the continuous attributes are conceptualized to obtain semantic information; q (q=1,…,Q), taking "small", "medium", and "large" as simple concepts of features, respectively expressed as The simple concept set F after all continuous features are fuzzified can be expressed as: Feature q The expression of the membership degree of (q=1,…,Q) to the kth (k=1,2,3) simple concept is as follows: where f q (u k ) represents sample u k Features of U q Value, Representation feature U q The maximum value obtained among all samples, Representation feature U q The minimum value obtained among all samples, Representation feature U q Get the mean value among all samples, Representation feature U q The maximum difference between the average value and the average value, which is used to measure the dispersion or deviation of the data. Representation feature U q The minimum difference from its average level, used to measure the concentration or stability of the data; Use multiple single attributes to logically connect to form more complex attributes, and use AFS logical operation rules to generate a set of complex concepts EM * , which is defined as follows: Where I is a non-empty index set of simple concepts; represents f q The disjunction of Indicates all conjunction of; Based on simple concepts and AFS structure, the consistent membership function can be obtained; assuming ξ=∑ i∈I (f q )∈EM * It is a complex concept, and its membership function A ξ (u) is expressed as: in, For simple concepts q The weight function can be determined according to the data distribution, N u is the number of times the sample is observed; The core of constructing an AFS decision tree is to always select the node with the largest information gain for splitting, so as to maximize the growth rate of the amount of complex concept information. Split the current node Ω and find the most suitable simple concept combination to ensure that the node after splitting The difference between the information gain of node Ω before segmentation is the largest, that is: in, represents the information gain of the current node Ω, I Ω is the amount of information of the current node Ω, for The weighted information after splitting the current node Ω, based on which the simple concept F of splitting the current node is obtained max , where I Ω and The calculation method is as follows: Among them, β Ω For the set EM * The complex concepts in is the u in the Nth layer node d The membership degree of v c ∈D c represents the set of output samples of the cth category, Indicates that when the fuzzy concept f q When splitting the current node Ω, the consistency membership of the samples belonging to the cth class; This can be used to Maximizing the fuzzy concept of removing F from F max ,Right now: F=F\F max If the consistent membership function of the fuzzy concept satisfies δ is the set threshold, then a new tree node Ω∧F is constructed according to the AFS logical operation "∧" max ; If the information gain of the current node is negative, that is Or in the fuzzy attribute f q When the subset obtained by splitting Ω is an empty set, Stop expanding the child nodes and get the AFS decision tree; at this time, the fuzzy attribute from the root node to the leaf node is a semantic rule ξ; Table 1 Confusion matrix The main purpose of the designed model is to perform classification tasks and dynamic rule extraction for multivariate time series data. Therefore, in order to examine the effect of the binary classification algorithm, TP is used to represent the number of samples where both the predicted value and the true value are positive, TN is used to represent the number of samples where both the predicted value and the true value are negative, FN is used to represent the number of samples where the predicted value is negative and the true value is positive, and FP is used to represent the number of samples where the predicted value is positive and the true value is negative. Table 1 is the confusion matrix of different attributes of the predicted value and the true value. In Table 1, only the above four situations will appear in the binary classification problem, so the following indicators are defined based on these four results. (1) Accuracy: the percentage of correct predictions; (2) Precision: The ratio of samples that are actually positive and predicted to be positive to all samples that are predicted to be positive. (3) Recall: The ratio of samples that are actually positive and predicted to be positive to all samples that are actually positive. (4) F1-score: The harmonic mean of precision and recall, used to comprehensively evaluate the performance of the model; (5) ROC curve and AUROC The ROC curve is drawn with the false positive rate as the horizontal axis and the true positive rate as the vertical axis. The ROC curve is a visual display of the model performance under different classification thresholds. AUROC is the area under the ROC curve, which is used to quantify the classification performance of the model. The larger the AUROC value, the better the performance of the model. (6) PRC curve and AUPRC The PRC curve is drawn with recall as the horizontal axis and precision as the vertical axis; the closer the PRC curve is to the upper right corner, the better the model performance; AUPRC is the area under the PRC curve, which is used to comprehensively evaluate the average precision of the model at different recall rates; the higher the AUPRC value, the better the model performance.

2. A device for multivariate time series data analysis and modeling method, It is characterized in that include: A collection unit, used for collecting data and processing the data to form a multivariate time series data sample; The first construction unit is used for a multivariate time series data sample set, performs similarity analysis on time series features using dynamic time warping, and divides the features according to the analysis results to form multiple feature groups; The second construction unit is used to generate concept nodes according to feature grouping and define the feature action duration t 1 ,update the concept nodes through the temporal fuzzy cognitive graph; The third construction unit is used to construct a bidirectional long short-term memory network with a peephole connection mode, take the updated concept nodes as the input of the model, and use the loss function to train the weights to form a learning model with the temporal weights of the concept nodes; The rule extraction unit sets different feature importance thresholds and moment importance thresholds based on the time series weight to select important moment features and construct an AFS decision tree, thereby forming dynamic semantic rules for multivariate time series data.

Citation Information

Patent Citations

  • Dynamic intuitionistic fuzzy cognitive map construction method, time sequence prediction method and time sequence prediction system.

    CN110084359A

  • Prediction method for improving LSTM based on fuzzy clustering algorithm

    CN110348608A

  • Incomplete depth multi-view semi-supervised classification method based on graph neural network

    CN116778233A

  • System and Method for Extremely Efficient Image and Pattern Recognition and Artificial Intelligence Platform

    US20220121884A1