CN116230224A - Method and system for predicting adverse events of heart failure based on time sequence model - Google Patents
Method and system for predicting adverse events of heart failure based on time sequence model Download PDFInfo
- Publication number
- CN116230224A CN116230224A CN202211704625.7A CN202211704625A CN116230224A CN 116230224 A CN116230224 A CN 116230224A CN 202211704625 A CN202211704625 A CN 202211704625A CN 116230224 A CN116230224 A CN 116230224A
- Authority
- CN
- China
- Prior art keywords
- information
- patient
- heart failure
- data
- adverse events
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 206010019280 Heart failures Diseases 0.000 title claims abstract description 59
- 238000000034 method Methods 0.000 title claims abstract description 32
- 230000002411 adverse Effects 0.000 title claims abstract description 25
- 230000006870 function Effects 0.000 claims abstract description 28
- 230000007246 mechanism Effects 0.000 claims abstract description 14
- 238000012549 training Methods 0.000 claims abstract description 12
- 230000008569 process Effects 0.000 claims abstract description 9
- 238000007781 pre-processing Methods 0.000 claims abstract description 8
- 239000013598 vector Substances 0.000 claims description 23
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 claims description 17
- 201000010099 disease Diseases 0.000 claims description 16
- 229940079593 drug Drugs 0.000 claims description 15
- 239000003814 drug Substances 0.000 claims description 15
- 238000004364 calculation method Methods 0.000 claims description 13
- 238000001514 detection method Methods 0.000 claims description 10
- 238000001356 surgical procedure Methods 0.000 claims description 9
- 239000011159 matrix material Substances 0.000 claims description 7
- 238000009533 lab test Methods 0.000 claims description 6
- 230000001502 supplementing effect Effects 0.000 claims description 6
- 238000003745 diagnosis Methods 0.000 claims description 5
- 230000002776 aggregation Effects 0.000 claims description 3
- 238000004220 aggregation Methods 0.000 claims description 3
- 238000000605 extraction Methods 0.000 claims description 3
- 238000013507 mapping Methods 0.000 claims description 3
- 238000002483 medication Methods 0.000 claims description 3
- 239000000284 extract Substances 0.000 claims 1
- 238000012545 processing Methods 0.000 abstract description 2
- 210000004027 cell Anatomy 0.000 description 8
- 238000013527 convolutional neural network Methods 0.000 description 3
- 238000004393 prognosis Methods 0.000 description 3
- 230000002123 temporal effect Effects 0.000 description 3
- 206010049418 Sudden Cardiac Death Diseases 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000000747 cardiac effect Effects 0.000 description 2
- 208000029078 coronary artery disease Diseases 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 208000019622 heart disease Diseases 0.000 description 2
- 230000002861 ventricular Effects 0.000 description 2
- 208000007848 Alcoholism Diseases 0.000 description 1
- 229940127291 Calcium channel antagonist Drugs 0.000 description 1
- 208000031229 Cardiomyopathies Diseases 0.000 description 1
- 208000024172 Cardiovascular disease Diseases 0.000 description 1
- 208000026740 Congenital cardiovascular disease Diseases 0.000 description 1
- 240000001879 Digitalis lutea Species 0.000 description 1
- 206010013654 Drug abuse Diseases 0.000 description 1
- 208000000059 Dyspnea Diseases 0.000 description 1
- 206010013975 Dyspnoeas Diseases 0.000 description 1
- 208000031226 Hyperlipidaemia Diseases 0.000 description 1
- 206010020772 Hypertension Diseases 0.000 description 1
- 206010020850 Hyperthyroidism Diseases 0.000 description 1
- 208000009525 Myocarditis Diseases 0.000 description 1
- 208000008589 Obesity Diseases 0.000 description 1
- 206010030124 Oedema peripheral Diseases 0.000 description 1
- 208000025174 PANDAS Diseases 0.000 description 1
- 208000021155 Paediatric autoimmune neuropsychiatric disorders associated with streptococcal infection Diseases 0.000 description 1
- 240000004718 Panda Species 0.000 description 1
- 235000016496 Panda oleosa Nutrition 0.000 description 1
- 208000025584 Pericardial disease Diseases 0.000 description 1
- 208000018262 Peripheral vascular disease Diseases 0.000 description 1
- 206010037368 Pulmonary congestion Diseases 0.000 description 1
- 208000001647 Renal Insufficiency Diseases 0.000 description 1
- 208000004756 Respiratory Insufficiency Diseases 0.000 description 1
- 208000009982 Ventricular Dysfunction Diseases 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 206010003119 arrhythmia Diseases 0.000 description 1
- 102000012740 beta Adrenergic Receptors Human genes 0.000 description 1
- 108010079452 beta Adrenergic Receptors Proteins 0.000 description 1
- 239000008280 blood Substances 0.000 description 1
- 210000004369 blood Anatomy 0.000 description 1
- 230000008081 blood perfusion Effects 0.000 description 1
- 239000000480 calcium channel blocker Substances 0.000 description 1
- 230000001684 chronic effect Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 208000018631 connective tissue disease Diseases 0.000 description 1
- 210000004351 coronary vessel Anatomy 0.000 description 1
- 238000007418 data mining Methods 0.000 description 1
- 238000013136 deep learning model Methods 0.000 description 1
- 206010012601 diabetes mellitus Diseases 0.000 description 1
- 238000002059 diagnostic imaging Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000010339 dilation Effects 0.000 description 1
- 208000035475 disorder Diseases 0.000 description 1
- 239000002934 diuretic Substances 0.000 description 1
- 229940030606 diuretics Drugs 0.000 description 1
- 206010014665 endocarditis Diseases 0.000 description 1
- 238000004880 explosion Methods 0.000 description 1
- 206010016256 fatigue Diseases 0.000 description 1
- 230000003862 health status Effects 0.000 description 1
- 230000001771 impaired effect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 208000017169 kidney disease Diseases 0.000 description 1
- 201000006370 kidney failure Diseases 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 150000002823 nitrates Chemical class 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 235000020824 obesity Nutrition 0.000 description 1
- 210000000056 organ Anatomy 0.000 description 1
- 238000010837 poor prognosis Methods 0.000 description 1
- 230000005180 public health Effects 0.000 description 1
- 230000004088 pulmonary circulation Effects 0.000 description 1
- 230000002685 pulmonary effect Effects 0.000 description 1
- 201000004193 respiratory failure Diseases 0.000 description 1
- 230000000391 smoking effect Effects 0.000 description 1
- 208000011117 substance-related disease Diseases 0.000 description 1
- 208000014221 sudden cardiac arrest Diseases 0.000 description 1
- 230000001839 systemic circulation Effects 0.000 description 1
- 238000002560 therapeutic procedure Methods 0.000 description 1
- 210000001519 tissue Anatomy 0.000 description 1
- 238000002627 tracheal intubation Methods 0.000 description 1
- 238000002054 transplantation Methods 0.000 description 1
- 230000006815 ventricular dysfunction Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H50/00—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
- G16H50/30—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for calculating health indices; for individual health risk assessment
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H10/00—ICT specially adapted for the handling or processing of patient-related medical or healthcare data
- G16H10/60—ICT specially adapted for the handling or processing of patient-related medical or healthcare data for patient-specific data, e.g. for electronic patient records
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/10—Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
Landscapes
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Public Health (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- Biomedical Technology (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- Epidemiology (AREA)
- Primary Health Care (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computing Systems (AREA)
- Artificial Intelligence (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Evolutionary Computation (AREA)
- Molecular Biology (AREA)
- Pathology (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a method and a system for predicting adverse events of heart failure based on a time sequence model, wherein firstly, heart failure patient data are extracted; preprocessing the extracted heart failure patient data to extract required variables; performing missing value filling on the extracted data by using a Fancyimpute tool; training the time sequence information of the patient by using Bi-LSTM; learning the importance of different variables in each visit by the patient with an attention mechanism; the contrast loss function is used as a training loss function, so that the problem of data unbalance is solved, and the prediction of adverse events of heart failure patients is realized. The invention processes the problems of data missing and data unbalance by processing the data missing value and using the contrast loss, better obtains the representation of the patient, improves the prediction performance of the model, better learns the relation between the time sequence information and the variable accessed by the heart failure patient each time, improves the system interpretability and simultaneously provides a reliable basis for judging the adverse events of doctors.
Description
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a method and a system for predicting adverse events of heart failure based on a time sequence model.
Background
Heart Failure (HF), abbreviated as Heart Failure, is a disease in which the structure or function of the Heart is abnormal. Heart failure is the end-stage of the progression of various heart diseases and manifests itself as a complex set of clinical complex phenomena. Such as impaired ventricular filling, reduced ejection function, ventricular dysfunction, insufficient cardiac output, stagnant blood in the pulmonary and/or systemic circulation, and insufficient blood perfusion in organs and tissues. Among them, dyspnea, susceptible fatigue, pulmonary congestion and peripheral edema are the main clinical manifestations of heart failure. As one of the world-recognized chronic cardiovascular diseases, heart failure has the manifestations of high prevalence, high medical cost, poor prognosis effect and the like. Heart failure has evolved into a significant public health problem worldwide.
How to evaluate the mortality rate within 5 years after the prognosis of the heart failure patient aiming at the specific condition of the heart failure patient, and according to the mortality rate condition evaluated by the patient, a doctor can assign a more reasonable and scientific prognosis improvement scheme, which is an important means for preventing the illness from being more serious, improving the prognosis effect of the patient, positively influencing the life quality of the patient and further reducing the medical expense.
There have been studies using CNN methods to predict whether adverse patient events occur, employing general health status representation learning models, using dilation convolution with a multi-scale acceptance domain to extract multi-time scale clinical features. While CNNs can effectively preserve neighborhood relationships and spatial locality of inputs, they are limited in temporal data mining due to the lack of partial and global correlation loss. Furthermore, most existing CNN-based methods assume that medical events during hospital visits are recorded strictly in chronological order, which is not typically the case in real electronic medical records. It further affects the overall performance of these methods. There have also been some studies to begin modeling different types of medical sequence building sequence hidden states and modeling their interrelationships with hidden neurons, and although these approaches take into account differences in different types of medical data, the interrelationship between heterogeneous data has not been fully explored. Furthermore, most methods do not effectively fuse multiple aspects of medical information because they simply connect related feature vectors from different types of data to construct the final patient representation.
Disclosure of Invention
The invention aims to: aiming at the problems existing in the prior art, the invention provides a method and a system for predicting adverse events of heart failure based on a time sequence model.
The technical scheme is as follows: the invention provides a method for predicting heart failure adverse events based on a time sequence model, which specifically comprises the following steps:
(1) Extracting patient data diagnosed with heart failure from a public data set MIMIMIIC-III, and preprocessing the data to extract needed information;
(2) Performing missing value filling on the extracted data by using a Biscaler in the Fancyimpute tool;
(3) Training the supplemented data to learn the time sequence information of the patient by using Bi-LSTM;
(4) Learning the importance of different variables in each visit by the patient based on an attentiveness mechanism;
(5) The contrast loss function is used as a training loss function, so that the problem of data unbalance is solved, and the prediction of adverse events of heart failure patients is realized.
Further, the implementation process of preprocessing the data in the step (1) to extract the needed information is as follows:
demographic information, laboratory tests, medications, surgery, residence time and number of ICU's closely related to heart failure are extracted;
introducing a large class of diseases, surgery and extracting only the most relevant laboratory detection, and extracting relevant disease information, medication information and surgery information;
and assigning the major diseases of the patient to 1 according to ICD9 codes of the patient to form 66-dimensional user information.
Further, the implementation process of the step (3) is as follows:
the demographics, diagnosis information, medication information, operation information, ICU stay information and laboratory detection of the patient are combined to generate 66-dimensional information x i ;
Using a corrected linear unit and linear mapping function to obtain an access representation, embedding patient information as a low-dimensional vector representation v i The calculation formula is as follows:
v i =ReLU(W v x i +b c )
wherein ,Wv ∈R m×L Is a weight matrix that can rank the importance of each medical code, m is an embedded vector v i Is of a size of (2);
using Bi-LSTM as input to learn time series information of each patient, each forward LSTM cell has a memory cell state S i Controlled by three Sigmoid gates: forgetting door F i Input door l i And an output gate O i The method comprises the steps of carrying out a first treatment on the surface of the Forgetting door F i Is used to determine that the slave storage unit S should be i Which information is discarded, and input gate l i Is used to determine which information is to be stored; output door O i Will determine the output battery state S i Information of (2); through these three gates, the hidden state of the forward LSTM cellThe calculation formula of (2) is as follows:
F i =σ(W f [h i-1 ;v i ]+b f )
I i =σ(W i [h i-1 ;v i ]+b i )
O i =σ(W o [h i-1 ;v i ]+b o )
wherein ,[hi-1 ;v i ]∈R q+m Is the previous hidden state h i-1 And current access embedding vector v i Q represents each hidden state h i Dimension, W f ,W i ,W o ,W s ∈R q×(q+m) B for the weight matrix to be learned f ,b i ,b o ,b s ∈R q For the bias vector, σ is a logical s-shaped function,representing element-level multiplication, likewise resulting in a hidden state of a backward LSTM cell>Then obtaining the hidden state h of the Bi-LSTM cell i The calculation formula is as follows:
further, the implementation process of the step (4) is as follows:
deriving a context vector C based on a location-based attention mechanism t :
wherein ,hi Represents the hidden state of the ith access, alpha ti Is from the current hidden state h i Capturing a vector of weights; alpha ti Calculated by the following formula:
α ti =W α h i +b α
α t =softmax([α t1 ,α t2 ,…,α t(t-1) ])
wherein ,Wα ∈R q and bα E, R is a parameter to be learned, and represents weight and deviation respectively;
obtaining final representation of patient through attention mechanism and Bi-LSTM aggregation time sequence information and mode information of patient accessThe calculation formula is as follows:
further, the implementation process of the step (5) is as follows:
the final patient representation vector is placed into a contrast loss function, which classifies the patient into two categories, the loss function is as follows:
wherein ,representing two sample features X 1 and X2 The euclidean distance of (2) is represented by P, Y is a label of whether two samples are matched, y=1 represents that the two samples are similar or matched, y=0 represents that the two samples are not matched, m is a set threshold value, and N is the number of samples.
Based on the same inventive concept, the invention also provides a heart failure adverse event prediction system based on a time sequence model, which comprises the following steps:
the information extraction module is used for acquiring a heart failure patient data set from the MIMIMIC-III data set, preprocessing the data, and extracting demographic information, laboratory detection information, related disease information, medication information, operation information and ICU stay information of a patient;
the information supplementing module is used for supplementing the missing value of the extracted heart failure patient information by using a Biscaler in the Fancyimpute tool;
the heart failure patient adverse event prediction module trains the supplemented data to learn time sequence information of the patient by using Bi-LSTM; learning the importance of different variables in each visit by the patient with an attention mechanism; the contrast loss function is used as a training loss function, so that the problem of data unbalance is solved, and the prediction of adverse events of heart failure patients is realized.
The beneficial effects are that: compared with the prior art, the invention has the beneficial effects that: 1. the time sequence information is considered, and the information such as demographics of the patient, laboratory detection, diagnosis results of hospitalization, patient observation record data, medication of hospitalization period, operation information of hospitalization period, ICU stay information and the like is comprehensively considered, so that multiple tasks such as mortality rate of different time windows of admission, readmission, intubation and the like of heart failure patients can be accurately predicted without any medical expert assistance; 2. the Biscaler is used for obtaining a double normalization matrix through iterative estimation of column mean values and standard deviation, so that the problem of data sparseness is solved, and the prediction capability of a model is improved; 3. according to the invention, the non-supervision study is performed through the contrast study, the samples are divided into two types, and patients do not need to be divided according to the labels, so that the problem that the heart failure patients have serious unbalance is solved.
Drawings
FIG. 1 is a flow chart of a method of predicting adverse events of heart failure based on a temporal model.
Fig. 2 is a schematic diagram of a system for predicting adverse events of heart failure based on a time series model.
Detailed Description
The invention is described in further detail below with reference to the accompanying drawings.
The invention provides a method for predicting adverse events of heart failure based on a time sequence model, which is shown in figure 1 and comprises the following steps:
step 1, extracting patient data diagnosed with heart failure from a public data set MIMIMIMIIC-III; the extracted heart failure patient data is preprocessed to extract the required information.
The MIMIC-III dataset is a multivariate time series dataset consisting of sparse and irregularly sampled physiological signals, and has two main types of underlying data: one type is clinical data extracted from EHR, including demographic information, diagnostic information, laboratory test information, medical imaging information, vital signs, etc. of the patient; the second type of data is waveform data collected by bedside monitoring equipment and related vital sign parameters and event records.
First, ICD-9 codes corresponding to heart failure in the MIMIMIIC-III dataset are determined, and the corresponding heart failure patient is extracted from the MIMIMIC-III dataset using Pandas as the initial dataset.
The extracted heart failure patient data set includes information such as demographics of the patient, laboratory tests, diagnosis results of hospitalization, patient observation record data, medication during hospitalization, operation information during hospitalization, and ICU stay information, and since adverse events of the heart failure patient are predicted, it is necessary to extract demographics information, laboratory tests, medication, operation, and ICU stay time and number closely related to heart failure.
Since there are more than 2000 disease ICD codes, and there are nearly two thousands of operations and medications, if all remain, the problem of dimensional explosions and data sparseness can occur with one-hot codes, so by introducing a large class of diseases, operations and extracting only the most relevant laboratory tests. 26 related diseases are extracted in this embodiment, including: cardiomyopathy, myocarditis, pericardial disease, coronary heart disease class I, diabetes, renal failure, congenital cardiovascular disease, drug abuse, hyperthyroidism, connective tissue disease, hyperlipidemia, other heart diseases, cardiac arrhythmias, valvular disease, endocarditis, pulmonary circulatory disorders, respiratory failure, peripheral vascular disease, hypertension, renal disease, abnormal cardiac structure, obesity, alcohol addiction, sudden cardiac arrest and sudden cardiac death, smoking, coronary heart disease class II. Class 7 medication: polycosans, sartan, beta-receptor, calcium channel blocker, digitalis, diuretics and nitrates. 6 operations: heart transplantation, heart resynchronization therapy, implantable cardioverter/defibrillator, left ventricular assist device, coronary artery surgery, valve surgery.
Since the disease and surgery are both represented using ICD9 codes, the computer is unable to recognize, and therefore, the patient's major disease needs to be assigned 1 according to the patient's ICD9 code. A 66-dimensional user information is formed.
And 2, performing missing value filling on the extracted data by using a Biscaler in a Fancyimpute tool.
The heart failure patient data extracted by the method can cause the problems of data sparseness and the like, and the model can not learn useful characteristics, so that the prediction performance is reduced. Therefore, the missing values need to be complemented, most of the complement methods are used at present to replace missing items by the average value or the median value of each column, but the data lacks individuality, the detection information of each patient is the same, the deep learning model is not capable of learning different characteristics. As shown in FIG. 2, the present invention adopts Biscaler in the Fancyimpute toolkit for data population.
Step 3: training the supplemented data with Bi-LSTM to learn the patient's timing information.
Model training is carried out by using the filled data, and each diagnosis information, medication information, operation information, ICU stay information and laboratory detection of a patient are combined to generate 66-dimensional information x i 。
Using a corrected linear unit (ReLU) and linear mapping function to obtain an access representation, patient information is embedded as a low-dimensional vector representation v i The calculation formula is as follows:
v i =ReLU(W v x i +b c )
wherein ,Wv ∈R m×L Is a weight matrix that can rank the importance of each medical code, m is an embedded vector v i Is of a size of (a) and (b).
Using Bi-LSTM as input to learn time series information of each patient, each forward LSTM cell has a memory cell state S i Controlled by three Sigmoid gates: forgetting door F i Input door l i And an output gate O i . Forgetting door F i Is used to determine that the slave storage unit S should be i Which information is discarded, and input gate l i Is used to determine which information is to be stored. Finally, output gate O i Will determine the output power
Pool state S i Is a piece of information of (a). Through these three gates, the hidden state of the forward LSTM cellThe calculation formula of (2) is as follows:
F i =σ(W f [h i-1 ;v i ]+b f )
I i =σ(W i [h i-1 ;v i ]+b i )
O i =σ(W o [h i-1 ;v i ]+b o )
wherein ,[hi-1 ;v i ]∈R q+m Is the previous hidden state h i-1 And current access embedding vector v i Is connected to the connection of (a). q represents each hidden state h i Is a dimension of (c). W (W) f ,W i ,W o ,W s ∈R q×(q+m) B for the weight matrix to be learned f ,b i ,b o ,b s ∈R q Is a bias vector. Sigma is a logical s-type function,representing element-level multiplication operations. Similarly, we can also get a hidden state of the backward LSTM cell +.>Then, the hidden state h of the Bi-LSTM cell can be obtained i The calculation formula is as follows:
step 4: the attention mechanism is used to learn the importance of the different variables in each visit by the patient.
Using only Bi-LSTM ignores some pattern information between accesses. Attention mechanisms are introduced to improve the interpretability of the model. Deriving a context vector C using a location-based attention mechanism t This helps capture more information for high risk prediction tasks and achieves higher performance in processing the temporal EHR data. Context vector C in the model used herein t The calculation method of (2) is as follows:
wherein hi Represents the hidden state of the ith access, alpha ti Is from the current hidden state h i A vector of weights is captured. Alpha ti Can be calculated by the following formula:
α n =W α h i +b α
α t =softmax([α t1 ,α t2 ,…,α t(t-1) ])
wherein ,Wα ∈R q and bα E R are parameters to be learned, which represent weights and deviations, respectively.
Obtaining final representation of patient through attention mechanism and Bi-LSTM aggregation time sequence information and mode information of patient accessThe calculation formula is as follows:
step 5: the contrast loss function is used as a training loss function, so that the problem of data unbalance is solved, and the prediction of adverse events of heart failure patients is realized.
The final patient representation vector is put into a contrast loss function, the patient is divided into two or more classes, the problem of sample imbalance is solved, and the loss function is as follows:
wherein ,representing two sample features X 1 and X2 The euclidean distance (two norms) P of the samples represents the feature dimension of the samples, Y is a label whether the two samples match, y=1 represents that the two samples are similar or match, y=0 represents no match, m is a set threshold, and N is the number of samples.
As shown in fig. 2, the present invention further provides a system for predicting adverse events of heart failure based on a time series model, which comprises: the information extraction module is used for acquiring a heart failure patient data set from the MIMIMIC-III data set, preprocessing the data, and extracting demographic information, laboratory detection information, related disease information, medication information, operation information and ICU stay information of a patient; the information supplementing module is used for supplementing the missing value of the extracted heart failure patient information by using a Biscaler in the Fancyimpute tool; the heart failure patient adverse event prediction module trains the supplemented data to learn time sequence information of the patient by using Bi-LSTM; learning the importance of different variables in each visit by the patient with an attention mechanism; the contrast loss function is used as a training loss function, so that the problem of data unbalance is solved, and the prediction of adverse events of heart failure patients is realized.
The invention has numerous methods and approaches to embodying this solution, and the above are just preferred embodiments of the invention. It should be noted that modifications and adaptations to the present invention may occur to one skilled in the art without departing from the principles of the present invention and are intended to be comprehended within the scope of the present invention.
Claims (6)
1. A method for predicting adverse events of heart failure based on a time sequence model, which is characterized by comprising the following steps:
(1) Extracting patient data diagnosed with heart failure from a public data set MIMIMIIC-III, and preprocessing the data to extract needed information;
(2) Performing missing value filling on the extracted data by using a Biscaler in the Fancyimpute tool;
(3) Training the supplemented data to learn the time sequence information of the patient by using Bi-LSTM;
(4) Learning the importance of different variables in each visit by the patient based on an attentiveness mechanism;
(5) The contrast loss function is used as a training loss function, so that the problem of data unbalance is solved, and the prediction of adverse events of heart failure patients is realized.
2. The method for predicting adverse events of heart failure based on a time sequence model according to claim 1, wherein the preprocessing of the data in step (1) extracts the required information implementation process comprises the following steps:
demographic information, laboratory tests, medications, surgery, residence time and number of ICU's closely related to heart failure are extracted;
introducing a large class of diseases, surgery and extracting only the most relevant laboratory detection, and extracting relevant disease information, medication information and surgery information;
and assigning the major diseases of the patient to 1 according to ICD9 codes of the patient to form 66-dimensional user information.
3. The method for predicting adverse events of heart failure based on a time series model as claimed in claim 1, wherein the implementation process of the step (3) is as follows:
the demographics, diagnosis information, medication information, operation information, ICU stay information and laboratory detection of the patient are combined to generate 66-dimensional information x i ;
Using a corrected linear unit and linear mapping function to obtain an access representation, embedding patient information as a low-dimensional vector representation v i The calculation formula is as follows:
v i =ReLU(W v x i +b c )
wherein ,Wv ∈R m×L Is a weight matrix that can rank the importance of each medical code, m is an embedded vector v i Is of a size of (2);
using Bi-LSTM as input to learn time series information of each patient, each forward LSTM cell has a memory cell state S i Controlled by three Sigmoid gates: forgetting door F i Input door l i And an output gate O i The method comprises the steps of carrying out a first treatment on the surface of the Forgetting door F i Is used to determine that the slave storage unit S should be i Which information is discarded, and input gate l i Is used to determine which information is to be stored; output door O i Will determine the output battery state S i Information of (2); through these three gates, the hidden state of the forward LSTM cellThe calculation formula of (2) is as follows:
F i =σ(W f [h i-1 ;v i ]+b f )
I i =σ(W i [h i-1 ;v i ]+b i )
O i =σ(W o [h i-1 ;v i ]+b o )
wherein ,[hi-1 ;v i ]∈R q+m Is the previous hidden state h i-1 And current access embedding vector v i Q represents each hidden state h i Dimension, W f ,W i ,W o ,W s ∈R q×(q+m ) B for the weight matrix to be learned f ,b i ,b o ,b s ∈R q For the bias vector, τ is a logical s-type function,representing element-level multiplication operations, likewise yielding a hidden state of a backward LSTM cellThen obtaining the hidden state h of the Bi-LSTM cell i The calculation formula is as follows: />
4. The method for predicting adverse events of heart failure based on a time series model as claimed in claim 1, wherein the implementation process of the step (4) is as follows:
deriving a context vector C based on a location-based attention mechanism t :
wherein ,hi Represents the hidden state of the ith access, alpha ti Is from the current hidden state h i Capturing a vector of weights; alpha ti Calculated by the following formula:
α ti =W α h i +b α
α t =softmax([α t1 ,α t2 ,...,α t(t-1) ])
wherein ,Wα ∈R q and bα E, R is a parameter to be learned, and represents weight and deviation respectively;
obtaining final representation of patient through attention mechanism and Bi-LSTM aggregation time sequence information and mode information of patient accessThe calculation formula is as follows:
5. the method for predicting adverse events of heart failure based on a time series model as claimed in claim 1, wherein the implementation process of the step (5) is as follows:
the final patient representation vector is placed into a contrast loss function, which classifies the patient into two categories, the loss function is as follows:
wherein ,representing two sample features X 1 and X2 The euclidean distance of (2) is represented by P, Y is a label of whether two samples are matched, y=1 represents that the two samples are similar or matched, y=0 represents that the two samples are not matched, m is a set threshold value, and N is the number of samples.
6. A time series model-based heart failure adverse event prediction system employing the method of any one of claims 1 to 5, comprising:
the information extraction module is used for acquiring a heart failure patient data set from the MIMIMIC-III data set, preprocessing the data, and extracting demographic information, laboratory detection information, related disease information, medication information, operation information and ICU stay information of a patient;
the information supplementing module is used for supplementing the missing value of the extracted heart failure patient information by using a Biscaler in the Fancyimpute tool;
the heart failure patient adverse event prediction module trains the supplemented data to learn time sequence information of the patient by using Bi-LSTM; learning the importance of different variables in each visit by the patient with an attention mechanism; the contrast loss function is used as a training loss function, so that the problem of data unbalance is solved, and the prediction of adverse events of heart failure patients is realized.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211704625.7A CN116230224A (en) | 2022-12-29 | 2022-12-29 | Method and system for predicting adverse events of heart failure based on time sequence model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211704625.7A CN116230224A (en) | 2022-12-29 | 2022-12-29 | Method and system for predicting adverse events of heart failure based on time sequence model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116230224A true CN116230224A (en) | 2023-06-06 |
Family
ID=86588267
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211704625.7A Pending CN116230224A (en) | 2022-12-29 | 2022-12-29 | Method and system for predicting adverse events of heart failure based on time sequence model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116230224A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117095811A (en) * | 2023-08-04 | 2023-11-21 | 牛津大学(苏州)科技有限公司 | Prediction method, device and storage medium based on electronic medical case data |
-
2022
- 2022-12-29 CN CN202211704625.7A patent/CN116230224A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117095811A (en) * | 2023-08-04 | 2023-11-21 | 牛津大学(苏州)科技有限公司 | Prediction method, device and storage medium based on electronic medical case data |
CN117095811B (en) * | 2023-08-04 | 2024-04-19 | 牛津大学(苏州)科技有限公司 | Prediction method, device and storage medium based on electronic medical case data |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11864944B2 (en) | Systems and methods for a deep neural network to enhance prediction of patient endpoints using videos of the heart | |
Romiti et al. | Artificial intelligence (AI) and cardiovascular diseases: an unexpected alliance | |
Lopez-Jimenez et al. | Artificial intelligence in cardiology: present and future | |
Li et al. | SLC-GAN: An automated myocardial infarction detection model based on generative adversarial networks and convolutional neural networks with single-lead electrocardiogram synthesis | |
Karatzia et al. | Artificial intelligence in cardiology: Hope for the future and power for the present | |
Xing et al. | Artificial intelligence in medicine: technical basis and clinical applications | |
Luo et al. | Multi-classification of arrhythmias using a HCRNet on imbalanced ECG datasets | |
CN110880362A (en) | Large-scale medical data knowledge mining and treatment scheme recommending system | |
US20210304855A1 (en) | Coding architectures for automatic analysis of waveforms | |
KR102439082B1 (en) | Method for predicting liver disease of ordinary perseon using ecg analysis data based on deep running | |
Sanchez de la Nava et al. | Artificial intelligence for a personalized diagnosis and treatment of atrial fibrillation | |
Yoon et al. | Discovering hidden information in biosignals from patients using artificial intelligence | |
Muthalaly et al. | Applications of machine learning in cardiac electrophysiology | |
CN114388095A (en) | Sepsis treatment strategy optimization method, system, computer device and storage medium | |
CN116230224A (en) | Method and system for predicting adverse events of heart failure based on time sequence model | |
Ullah et al. | A fully connected quantum convolutional neural network for classifying ischemic cardiopathy | |
Watson et al. | Artificial intelligence in cardiology: fundamentals and applications | |
Sengan et al. | Echocardiographic image segmentation for diagnosing fetal cardiac rhabdomyoma during pregnancy using deep learning | |
CN116525116B (en) | Real-time risk early warning and monitoring system, equipment and storable medium for cardiogenic shock | |
Andry et al. | Electronic health record to predict a heart attack used data mining with Naïve Bayes method | |
Chaturvedi et al. | An Innovative Approach of Early Diabetes Prediction using Combined Approach of DC based Bidirectional GRU and CNN | |
CN114550910A (en) | Artificial intelligence-based ejection fraction retention type heart failure diagnosis and typing system | |
Singh et al. | Classification of arrhythmia using transfer learning and its applications in smart wearables | |
Ulloa et al. | A deep neural network to enhance prediction of 1-year mortality using echocardiographic videos of the heart | |
Murthy | An efficient diabetes prediction system for better diagnosis |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |