CN114694841A - Adverse event risk prediction method based on patient electronic health record - Google Patents

Adverse event risk prediction method based on patient electronic health record Download PDF

Info

Publication number
CN114694841A
CN114694841A CN202210322129.9A CN202210322129A CN114694841A CN 114694841 A CN114694841 A CN 114694841A CN 202210322129 A CN202210322129 A CN 202210322129A CN 114694841 A CN114694841 A CN 114694841A
Authority
CN
China
Prior art keywords
data
patient
vector
representing
basic
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.)
Granted
Application number
CN202210322129.9A
Other languages
Chinese (zh)
Other versions
CN114694841B (en
Inventor
郑恒杰
刘勇国
张云
朱嘉静
李巧勤
傅翀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN202210322129.9A priority Critical patent/CN114694841B/en
Publication of CN114694841A publication Critical patent/CN114694841A/en
Priority to ZA2022/08574A priority patent/ZA202208574B/en
Application granted granted Critical
Publication of CN114694841B publication Critical patent/CN114694841B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H50/00ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
    • G16H50/30ICT 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/047Probabilistic or stochastic networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H10/00ICT specially adapted for the handling or processing of patient-related medical or healthcare data
    • G16H10/60ICT specially adapted for the handling or processing of patient-related medical or healthcare data for patient-specific data, e.g. for electronic patient records
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Public Health (AREA)
  • Mathematical Physics (AREA)
  • Epidemiology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Primary Health Care (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Pathology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Treatment And Welfare Office Work (AREA)
  • Measuring And Recording Apparatus For Diagnosis (AREA)

Abstract

The invention discloses an adverse event risk prediction method based on an electronic health record of a patient, which comprises the following steps of: s1, preprocessing data; s2, performing K-means clustering sampling processing, and dividing data into 3 clusters to obtain 3 clustering centers; s3, dividing the 3 clustering centers into P*The maximum values in the three subsets are sorted from small to large and respectively used as an uncommon coding subset, a more common coding subset and a common coding subset, then the three subsets are respectively and correspondingly input into three basic classifiers of GRAM +, Dipole + and RNN + for pre-training, and then model fusion is carried out on the three basic classifiersAnd (6) mixing. According to the method, a clustering algorithm is used for sampling proper training samples for a basic learning device, a self-adaptive combination strategy is designed, and integration weights of different basic classifiers are generated in a self-adaptive mode according to the distance from the training samples to the center of a pre-training set, so that the model has stronger self-adaptability. In addition, through the sampling after clustering, the calculation amount can be obviously reduced when the basic embedding is trained.

Description

Adverse event risk prediction method based on patient electronic health record
Technical Field
The invention relates to an adverse event risk prediction method based on an electronic health record of a patient.
Background
AIDS is a highly harmful infectious disease, is caused by infection of AIDS virus (HIV), and the main attack target of the AIDS is the most important CD4T lymphocyte in the human immune system, so that the human body loses the immune function, is easy to infect various diseases and has high fatality rate. After AIDS, if the patient is actively treated, a relatively good treatment effect can be obtained, but if adverse events such as serious complications occur, the treatment effect is affected. The method can predict adverse events such as complications which may occur in the future by combining conventional risk factors and AIDS patient specific factors, and can be used as powerful assistance for guiding the medical care of AIDS patients. Electronic Health Records (EHRs) for aids patients not only contain medical codes (including diagnosis, medication and program codes, such as 585.9 (chronic kidney disease), which refers to codes representing procedures such as intervention, treatment, etc.) for each visit of the patients, but also personalized data such as demographic data and vital signs of the patients, which can help doctors to make more reasonable decisions about their medical care by predicting possible adverse events in the future.
The chinese patent application CN109887606A, a diagnostic prediction method for bidirectional recurrent neural network based on attention, provides a prediction method for bidirectional recurrent neural network based on attention, which first embeds high-dimensional medical codes (i.e. clinical variables) into low-code layer space, and then inputs the coded representation into a bidirectional recurrent neural network based on attention to generate hidden state representation. The medical code for future visits is predicted by the softmax layer.
Edward Choi (E.Choi, M.T.Bahadori, L.Song, et al.UA-CRNN: GRAM: Graph-based assessment Model for Healthcare retrieval Learning [ C ] in: Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, London,2018, pp.249-256) et al propose a Representation Learning method based on a Knowledge Graph Attention machine, mainly use the hierarchy information inherent to the medical ontology to learn an embedded Representation containing more informative medical codes, and then use a depth Learning method to predict. However, the above-mentioned technical method has the following problems: (1) the model has dependence on the training data volume, good prediction effect is achieved when the training data is sufficient, and the prediction performance is poor when the data volume is insufficient; (2) medical ontology knowledge contained in medical codes is ignored, and the prediction performance of medical codes with low occurrence frequency and rare cases is poor.
The representation learning method based on the knowledge graph needs larger calculation cost and training difficulty in order to learn the embedded representation of the medical code containing richer information. In addition, the above methods ignore individual differences between patients, which has an effect on the accuracy of the prediction.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides an adverse event risk prediction method based on patient electronic health record, which is characterized in that a clustering algorithm is used for sampling proper training samples for a basic learner, a self-adaptive combination strategy is designed, and integration weights of different basic classifiers are generated in a self-adaptive manner according to the distance between the training samples and the center of a pre-training set, so that a model has stronger self-adaptability.
The purpose of the invention is realized by the following technical scheme: a method for adverse event risk prediction based on an electronic patient health record, comprising the steps of:
s1, preprocessing data: taking the data of each patient as a time-sequential diagnostic sequence in the electronic health record data; the diagnostic sequence was processed as follows:
s11 using C ═ C1,c2,...,cNDenotes the set of all diagnostic codes, ciRepresenting the ith diagnosis code, wherein i is more than or equal to 1 and less than or equal to N, and N represents the total number of the diagnosis codes; x ═ X1,x2,...,xT]Information representing a patient visit, wherein the tth visit information xt∈{0,1}N,{0,1}NRepresenting a vector of N elements, each element having a value of 0 or 1, i.e. xt={xt1,xt1,…,xti,…xtN}; if the diagnostic code c with serial number ii∈{c1,c2,...,cNX is present in the t-th visitti1, otherwise xti=0;
S12, using L ═ L1,l2,...,lT]Personalized data representing all visits of a patient, liA vector representation of the personalized data record representing the ith visit; the average value is obtained for each patient in T times of treatment, and the average value l of the same kind of data in different times of treatment is obtained*(ii) a Selecting missing values for numerical data, and selecting missing values to be filled by using an average value, and for non-numerical data, filling the missing values by using values with highest occurrence frequency in the patient data according to a mode principle in statistics;
s13, summing each diagnosis code in X to obtain the frequency of the unique diagnosis code in all the visit information of each patient
Figure BDA0003572143720000021
Namely, it is
Figure BDA0003572143720000022
To all the
Figure BDA0003572143720000023
Summing to obtain the frequency S of unique diagnosis codes in all data*Let P*=s*/S*Indicating that the frequency of occurrence of each diagnostic code in each patient data is allThe fraction in the partial data;
after the treatment is finished, the data of j th patient consists of three parts Xj、Lj、FjJ is more than or equal to 1 and less than or equal to M, and M represents the number of patients with collected data;
Figure BDA0003572143720000024
mean value l representing the same data from different visits of the j-th patient*
Figure BDA0003572143720000025
Representing the proportion of the occurrence frequency of each diagnosis code in the jth patient data in all the data;
s2, performing K-means clustering sampling processing: with data for each patient
Figure BDA0003572143720000026
Performing K-means clustering as sample points, dividing data into 3 clusters to obtain 3 clustering centers theta123Then calculating F for each patient datajAnd F' of each cluster center at the same sampling rate for each cluster center
Figure BDA0003572143720000027
Selecting corresponding subdata sets from the data of all patients according to the sequence of the distances from small to large to obtain D' ═ D1'∪D2'∪D3', the generated plurality of subdata sets are used for training of a basic classifier;
s3, clustering 3 centers theta123According to P*The maximum values in the three subsets are sorted from small to large and respectively used as an uncommon code subset, a more common code subset and a common code subset, then the three subsets are respectively and correspondingly input into three basic classifiers of GRAM +, Dipole + and RNN + for pre-training, and then model fusion is carried out on the three basic classifiers.
Further, the GRAM + is based on GRAM, adds a global attention mechanism by using the personalized data of the patient as a guide, and is specifically designed as follows:
in the knowledge directed acyclic graph formed by the medical ontology, the leaf node is the element in the diagnosis code set in S11, and the ancestor node thereof represents the ontology represented by the leaf node derived from the leaf node; all nodes c are assigned a basic embedding vector e, representing the final representation of a leaf node as a basic embedded convex combination of itself and its ancestor nodes:
Figure BDA0003572143720000031
wherein g isiRepresents a medical code ciA (i) represents the code ciAnd ciIndex of ancestor node, αijIs the local attention weight, calculated by the Softmax function as follows:
Figure BDA0003572143720000032
f(ei,ej) Is a scalar value, representing eiAnd ejThe compatibility between two basic embeddings is obtained by a multilayer perceptron;
by concatenating the final representations g of all medical codes1,g2,...,gNTo obtain an embedded matrix G, and a future diagnosis vector vtExpressed as a vector xtMultiplied by the embedding matrix G and passed through a nonlinear tanh () function:
v1,v2,...,vT=tanh(G[x1,x2,...,xT])
the patient's personalized data L ═ L is then utilized1,l2,...,lT]To add a global attention weight betatObtaining a global representation u comprising patient-personalized data informationt
ut=βtvt,t=1,2,...,T
βtBy the following Softmax function meterCalculating:
Figure BDA0003572143720000033
f(li,l*) Is a scalar value representing liAnd l*The compatibility between the sensors is obtained by a multilayer perceptron;
will u1,u2,...uTInputting the data into a GRU network to obtain a hidden state representation h1,h2,...,hTGenerating the first prediction information by the Softmax layer
Figure BDA0003572143720000041
Is defined as:
h1,h2,...,hT=GRU(u1,u2,...,uTr)
Figure BDA0003572143720000042
θris a super-reference to the GRU network,
Figure BDA0003572143720000043
and
Figure BDA0003572143720000044
weights and biases to be learned;
using true diagnostic information ytAnd prediction information
Figure BDA0003572143720000045
The loss is calculated as follows:
Figure BDA0003572143720000046
upper label
Figure BDA0003572143720000048
Representing a transpose; the penalty calculation is back-propagated, the error between prediction and true is calculated, and back-propagation is learned and corrected until the GRAM + model converges.
Further, the Dipole + utilizes patient-personalized data L ═ L1,l2,...,lT]As a guide, a bidirectional recurrent neural network and an attention mechanism are used simultaneously to predict the patient information; first, the visit information X is embedded into a representation vector v by a multi-layer perceptrontThen using the patient's personalized data L ═ L1,l2,...,lT]To add a global attention weight betatObtaining a global representation u comprising patient-personalized data informationt
ut=βtvt,t=1,2,...,T
βtCalculated by the following Softmax function:
Figure BDA0003572143720000047
f(li,l*) Is a scalar value;
then vector utIs input to a bi-directional recurrent neural network and finally, the bi-directional outputs are concatenated to generate a potential vector for prediction using an attention mechanism based on the data sequence position.
Further, RNN + is based on RNN using patient personalized data L ═ L1,l2,...,lT]Guiding the patient visit information representation vector X to generate a global representation vector u containing patient personalized data informationtGlobal representation vector utThe algorithm of (c) is the same as the Dipole + method, and the vector u is represented globallytAn attention model based on the data sequence position is entered and then predictions are made using unidirectional GRUs.
Further, an adaptive weighted integration strategy is adopted in the model fusion stage, and for each sample Xi=[x1,x2,...,xT]Calculating it to each cluster centerDistance di=[δi1i2i3];
For each sample, the integrated weight w is generated using the following formulai
Figure BDA0003572143720000051
The final integrated output result is expressed as:
Figure BDA0003572143720000052
wherein
Figure BDA0003572143720000053
The outputs of the three basic classifiers are shown.
The invention has the beneficial effects that: compared with the prior art, the technical scheme provided by the invention considers the difference between individuals of the patient, and utilizes the individualized data of the patient to guide the model to establish reasonable attention, thereby improving the accuracy of model prediction. In addition, the influence of different sample sizes on the model performance is considered, a proper training sample is sampled for the basic learning device through a clustering algorithm, a self-adaptive combination strategy is designed, and the integration weights of different basic classifiers are generated in a self-adaptive mode according to the distance between the training sample and the center of a pre-training set, so that the model has stronger self-adaptability. In addition, through the sampling after clustering, the calculation amount can be obviously reduced when the basic embedding is trained.
Drawings
FIG. 1 is a flow chart of an adverse event risk prediction method based on an electronic patient health record of the present invention;
FIG. 2 is a diagram illustrating the structure of the GRAM + classifier of the present invention;
FIG. 3 is a schematic diagram of the integration strategy of the present invention.
Detailed Description
The invention discloses an effective method for predicting adverse event risks of electronic health records of AIDS patients, which comprises the steps of firstly utilizing a clustering method to sample proper pre-training sets for different basic learners, integrating the prediction performances of different classifiers on codes with different frequencies, designing a self-adaptive combination strategy, and generating the integration weights of different basic classifiers in a self-adaptive manner according to the distance between a training sample and the center of the pre-training set so as to balance the difference of a single model on the prediction performances of medical codes with different frequency numbers. In addition, the model is added with an attention mechanism which takes personalized data as a guide to make up for individual differences, and the model accuracy is improved. The technical scheme of the invention is further explained by combining the attached drawings.
As shown in fig. 1, the method for predicting the risk of adverse events based on the electronic health record of the patient of the present invention comprises the following steps:
s1, preprocessing data: in the electronic health record data, the data of each patient is taken as a time sequence of diagnosis, and in each diagnosis, a plurality of diagnosis codes (including diagnosis, medication, program codes and the like) exist; the diagnostic sequence was processed as follows:
s11 using C ═ C1,c2,...,cNDenotes the set of all diagnostic codes, ciRepresenting the ith diagnosis code, wherein i is more than or equal to 1 and less than or equal to N, and N represents the total number of the diagnosis codes; x ═ X1,x2,...,xT]Representing the visit information of a patient, wherein the t-th visit information xt∈{0,1}NIs a binary vector, {0,1}NRepresenting a vector of N elements, each element having a value of 0 or 1, i.e. xt={xt1,xt1,…,xti,…xtN}; if the diagnostic code c with serial number ii∈{c1,c2,...,cNX is present in the t-th visitti1, otherwise xti=0;
S12, using L ═ L1,l2,...,lT]Personalized data representing all visits of a patient, liA vector representation of the personalized data record representing the ith visit; the average value of the T times of visits of each patient is obtained to obtain the average value of the same kind of data in different visitsValue l*(ii) a Selecting missing values for numerical data, and selecting missing values to be filled by using an average value, and for non-numerical data, filling the missing values by using values with highest occurrence frequency in the patient data according to a mode principle in statistics;
s13, summing each diagnosis code in X to obtain the frequency of the unique diagnosis code in all the clinic information of each patient
Figure BDA0003572143720000061
Namely that
Figure BDA0003572143720000062
Then to all
Figure BDA0003572143720000063
Summing to obtain the frequency S of unique diagnosis codes in all data*Let P*=s*/S*Representing the proportion of the frequency of occurrence of each diagnosis code in each patient data in all data;
after the treatment is finished, the data of j th patient consists of three parts Xj、Lj、FjJ is more than or equal to 1 and less than or equal to M, and M represents the number of patients with collected data; xjFor training classifiers, LjTo guide the attention mechanism of the classifier,
Figure BDA0003572143720000064
is used for clustering and dividing the patients,
Figure BDA0003572143720000065
mean value l representing the same data from different visits of the j-th patient*
Figure BDA0003572143720000066
Indicating the proportion of the frequency of occurrence of each diagnostic code in the jth patient data in the total data.
S2, performing K-means clustering sampling processing: with data for each patient F ═ l*,P*]Performing K-means clustering as sample points, and dividing data into 3 clusters(the number of the clusters is generally the same as that of the basic classifiers adopted later), data with similar personalized data and similar diagnostic code occurrence frequency in the diagnostic record are more likely to be gathered into the same cluster; given the number of clusters 3, the data of all patients were divided into D ═ D using the K-means algorithm in combination with D1∪D2∪D3To obtain 3 cluster centers theta123Then calculating F for each patient datajAnd F' of each cluster center at the same sampling rate for each cluster center
Figure BDA0003572143720000067
Selecting corresponding subdata sets from the data of all patients according to the sequence of the distances from small to large to obtain D' ═ D1'∪D2'∪D3' generating a plurality of subdata sets for training a basic classifier;
s3, clustering 3 centers theta123According to P*The maximum values in the three subsets are sorted from small to large and respectively used as an uncommon coding subset, a more common coding subset and a common coding subset, then the three subsets are respectively and correspondingly input into three basic classifiers of GRAM +, Dipole + and RNN + for pre-training to learn decision boundaries, and then model fusion is carried out on the three basic classifiers;
the GRAM + is based on GRAM, adds a global attention mechanism by using the personalized data of the patient as a guide, and is specifically designed as follows as shown in fig. 2:
in the knowledge directed acyclic graph formed by the medical ontology, leaf nodes and ancestor nodes are used for distinguishing, the medical ontology conforms to a tree structure when being named and coded, all the leaf nodes are elements in the diagnosis code set in S11, and the ancestor nodes represent ontologies represented by the leaf nodes and are derived from the leaf nodes; all nodes c are assigned a basic embedding vector e, representing the final representation of a leaf node as a basic embedded convex combination of itself and its ancestor nodes:
Figure BDA0003572143720000071
wherein g isiRepresents a medical code ci(i.e., leaf node) embedded representation, a (i) represents code ciAnd ciIndex of ancestor node, αijIs the local attention weight, calculated by the Softmax function as follows:
Figure BDA0003572143720000072
f(ei,ej) Is a scalar value, representing eiAnd ejCompatibility between two basic embeddings, derived by the multilayer perceptron (MLP); training basic embedding by using Glover, and learning coded representation by using a global co-occurrence matrix of all nodes c;
by concatenating the final representations g of all medical codes1,g2,...,gNTo obtain an embedded matrix G, and a future diagnosis vector vtExpressed as a vector xtMultiplied by the embedding matrix G and passed through a nonlinear hyperbolic tangent activation function tanh ():
v1,v2,...,vT=tanh(G[x1,x2,...,xT])
the patient's personalized data L ═ L is then utilized1,l2,...,lT]To add a global attention weight betatObtaining a global representation u comprising patient-personalized data informationt
ut=βtvt,t=1,2,...,T
βtCalculated by the following Softmax function:
Figure BDA0003572143720000073
f(li,l*) Is a scalar value, representing liAnd l*The compatibility between the sensors is obtained by a multilayer perceptron;
u is to be1,u2,...uTInputting the data into a GRU network to obtain a hidden state representation h1,h2,...,hTGenerating the first prediction information by the Softmax layer
Figure BDA0003572143720000081
Is defined as:
h1,h2,...,hT=GRU(u1,u2,...,uTr)
Figure BDA0003572143720000082
θris a super-reference to the GRU network,
Figure BDA0003572143720000083
and
Figure BDA0003572143720000084
weights and biases to be learned;
using true diagnostic information ytAnd prediction information
Figure BDA0003572143720000085
The loss is calculated as follows:
Figure BDA0003572143720000086
upper label
Figure BDA0003572143720000088
Representing a transposition; the loss calculation is back propagated, the error between prediction and reality is calculated, and back propagation is learned and corrected until the GRAM + model converges.
The Dipole + utilizes patient-personalized data L ═ L1,l2,...,lT]As a guide, a bidirectional recurrent neural network and an attention mechanism are used simultaneously,to predict patient visit information; first, the visit information X is embedded into a representation vector v by a multi-layer perceptrontThen using the patient's personalized data L ═ L1,l2,...,lT]To add a global attention weight betatObtaining a global representation u comprising patient-personalized data informationt
ut=βtvt,t=1,2,...,T
βtCalculated by the following Softmax function:
Figure BDA0003572143720000087
f(li,l*) Is a scalar value;
then vector utIs input to a bi-directional recurrent neural network and finally, the bi-directional outputs are concatenated to generate a potential vector for prediction using an attention mechanism based on the data sequence position.
RNN + is based on RNN using patient-specific data L ═ L1,l2,...,lT]Guiding a patient visit information representation vector X to generate a global representation vector u comprising patient personalized data informationtGlobal representation vector utThe algorithm of (c) is the same as the Dipole + method, and the vector u is represented globallytAn attention model based on the data sequence position is entered and then predictions are made using unidirectional GRUs.
Adopting a self-adaptive weighting integration strategy in a model fusion stage; as shown in FIG. 3, in the fusion phase, X is applied to each samplei=[x1,x2,...,xT]Calculating its distance d to each cluster centeri=[δi1i2i3](ii) a The distance measures the degree that the training sample data belongs to a certain cluster, the closer the center of the pre-training data subset is to the basic classifier of the training sample, the better adaptability to the sample is, and the indirect measurement measures that the classifier trained on the cluster predicts the new sample XiThe ability of the cell to perform. For each sample, the following formula was used to generateWeight w of the integrationi
Figure BDA0003572143720000091
The final integrated output result is expressed as:
Figure BDA0003572143720000092
wherein
Figure BDA0003572143720000093
The output of the three basic classifiers is shown,
Figure BDA0003572143720000094
is a prediction output which represents the probability of the occurrence of the medical code corresponding to the index in a future diagnosis, namely the risk of various adverse events which may occur in the future of the patient, thereby assisting the doctor to make more reasonable decisions on the medical care of the patient.
It will be appreciated by those of ordinary skill in the art that the embodiments described herein are intended to assist the reader in understanding the principles of the invention and are to be construed as being without limitation to such specifically recited embodiments and examples. Those skilled in the art can make various other specific changes and combinations based on the teachings of the present invention without departing from the spirit of the invention, and these changes and combinations are within the scope of the invention.

Claims (5)

1. A method for predicting risk of an adverse event based on an electronic health record of a patient, comprising the steps of:
s1, preprocessing data: taking the data of each patient as a time sequence of diagnosis in the electronic health record data; the diagnostic sequence was processed as follows:
s11 using C ═ C1,c2,...,cNDenotes all diagnostic codesSet, ciRepresenting the ith diagnosis code, wherein i is more than or equal to 1 and less than or equal to N, and N represents the total number of the diagnosis codes; x ═ X1,x2,...,xT]Representing the visit information of a patient, wherein the t-th visit information xt∈{0,1}N,{0,1}NRepresenting a vector of N elements, each element having a value of 0 or 1, i.e. xt={xt1,xt1,…,xti,…xtN}; if the diagnostic code c with serial number ii∈{c1,c2,...,cNIn the t-th visit, then xti1, otherwise xti=0;
S12, using L ═ L1,l2,...,lT]Personalized data representing all visits of a patient, liA vector representation of the personalized data record representing the ith visit; the average value is obtained for each patient in T times of treatment, and the average value l of the same kind of data in different times of treatment is obtained*(ii) a Selecting missing values for numerical data, and selecting missing values to be filled by using an average value, and for non-numerical data, filling the missing values by using values with highest occurrence frequency in the patient data according to a mode principle in statistics;
s13, summing each diagnosis code in X to obtain the frequency S of the unique diagnosis code in all the visit information of each patient*iI.e. by
Figure FDA0003572143710000011
For all s*iSumming to obtain the frequency S of unique diagnosis codes in all data*Let P*=s*/S*Representing the proportion of the occurrence frequency of each diagnosis code in each patient data in all data;
after the treatment is finished, the data of j th patient consists of three parts Xj、Lj、FjJ is more than or equal to 1 and less than or equal to M, and M represents the number of patients with collected data; fj=[l*j,P*j],l*jMean value l representing the same data from different visits of the j-th patient*,P*jIndicating the occurrence of each diagnostic code in the jth patient dataThe ratio of the frequency to the total data;
s2, performing K-means clustering sampling processing: with data F for each patientj=[l*j,P*j]Performing K-means clustering as sample points, dividing data into 3 clusters to obtain 3 clustering centers theta123Then calculating F for each patient datajAnd F' of each cluster center at the same sampling rate for each cluster center
Figure FDA0003572143710000012
Selecting corresponding subdata sets from the data of all patients according to the sequence of the distances from small to large to obtain D' ═ D1'∪D2'∪D3' generating a plurality of subdata sets for training a basic classifier;
s3, clustering 3 centers theta123According to P*The maximum values in the three subsets are sorted from small to large and respectively used as an rare coding subset, a more common coding subset and a common coding subset, then the three subsets are respectively and correspondingly input into three basic classifiers of GRAM +, Dipole + and RNN + for pre-training, and then the three basic classifiers are subjected to model fusion.
2. The method as claimed in claim 1, wherein the GRAM + is a global attention mechanism added by using personalized data of patients as guidance based on GRAM, and is specifically designed as follows:
in the knowledge directed acyclic graph formed by the medical ontology, the leaf node is the element in the diagnosis code set in S11, and the ancestor node thereof represents the ontology represented by the leaf node derived from the leaf node; all nodes c are assigned a basic embedding vector e, representing the final representation of a leaf node as a basic embedded convex combination of itself and its ancestor nodes:
Figure FDA0003572143710000021
wherein g isiRepresents a medical code ciA (i) represents the code ciAnd ciIndex of ancestor node, αijIs the local attention weight, calculated by the Softmax function as follows:
Figure FDA0003572143710000022
f(ei,ej) Is a scalar value, representing eiAnd ejThe compatibility between two basic embeddings is obtained by a multilayer perceptron;
by concatenating the final representations g of all medical codes1,g2,...,gNTo obtain an embedded matrix G, and a diagnosis vector vtExpressed as a vector xtMultiplied by the embedding matrix G and passed through a nonlinear hyperbolic tangent activation function tanh ():
v1,v2,...,vT=tanh(G[x1,x2,...,xT])
the patient's personalized data L ═ L is then utilized1,l2,...,lT]To add a global attention weight betatObtaining a global representation u comprising patient-personalized data informationt
ut=βtvt,t=1,2,...,T
βtCalculated by the following Softmax function:
Figure FDA0003572143710000023
f(li,l*) Is a scalar value representing liAnd l*The compatibility between the sensors is obtained by a multilayer perceptron;
will u1,u2,...uTInputting the data into a GRU network to obtain a hidden state representation h1,h2,...,hTGenerating the first prediction information by the Softmax layer
Figure FDA0003572143710000024
Is defined as:
h1,h2,...,hT=GRU(u1,u2,...,uTr)
Figure FDA0003572143710000025
θris a super-reference to the GRU network,
Figure FDA0003572143710000031
and
Figure FDA0003572143710000032
weights and biases to be learned;
using true diagnostic information ytAnd prediction information
Figure FDA0003572143710000033
The loss is calculated as follows:
Figure FDA0003572143710000034
upper label
Figure FDA0003572143710000036
Representing a transpose; the loss calculation is back propagated, the error between prediction and reality is calculated, and back propagation is learned and corrected until the GRAM + model converges.
3. The method as claimed in claim 1, wherein the Dipole + utilizes the patient's personality to predict the risk of adverse eventsChange data L ═ L1,l2,...,lT]As a guide, a bidirectional recurrent neural network and an attention mechanism are used simultaneously to predict the patient information; first, the information X of the doctor is embedded into a representation vector v by a multi-layer perceptrontThen using the patient's personalized data L ═ L1,l2,...,lT]To add a global attention weight betatObtaining a global representation u comprising patient-personalized data informationt
ut=βtvt,t=1,2,...,T
βtCalculated by the following Softmax function:
Figure FDA0003572143710000035
f(li,l*) Is a scalar value;
then vector utIs input to a bi-directional recurrent neural network and finally, the bi-directional outputs are concatenated to generate a potential vector for prediction using an attention mechanism based on the data sequence position.
4. The method as claimed in claim 3, wherein RNN + is based on RNN using patient-personalized data L ═ L1,l2,...,lT]Guiding a patient visit information representation vector X to generate a global representation vector u comprising patient personalized data informationtGlobal representation vector utThe algorithm of (c) is the same as the Dipole + method, and the vector u is represented globallytAn attention model based on the data sequence position is entered and then a prediction is made using unidirectional GRUs.
5. The method of claim 1, wherein an adaptive weighted integration strategy is applied in the model fusion stage for each sample Xi=[x1,x2,...,xT]Calculating its distance d to each cluster centeri=[δi1i2i3];
For each sample, the integrated weight w is generated using the following formulai
Figure FDA0003572143710000041
The final integrated output result is expressed as:
Figure FDA0003572143710000042
wherein
Figure FDA0003572143710000043
The outputs of the three basic classifiers are shown.
CN202210322129.9A 2022-03-30 2022-03-30 Adverse event risk prediction method based on patient electronic health record Active CN114694841B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210322129.9A CN114694841B (en) 2022-03-30 2022-03-30 Adverse event risk prediction method based on patient electronic health record
ZA2022/08574A ZA202208574B (en) 2022-03-30 2022-08-01 An adverse event risk prediction method based on patients' electronic health records

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210322129.9A CN114694841B (en) 2022-03-30 2022-03-30 Adverse event risk prediction method based on patient electronic health record

Publications (2)

Publication Number Publication Date
CN114694841A true CN114694841A (en) 2022-07-01
CN114694841B CN114694841B (en) 2023-04-07

Family

ID=82140727

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210322129.9A Active CN114694841B (en) 2022-03-30 2022-03-30 Adverse event risk prediction method based on patient electronic health record

Country Status (2)

Country Link
CN (1) CN114694841B (en)
ZA (1) ZA202208574B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118016225A (en) * 2024-04-09 2024-05-10 山东第一医科大学附属省立医院(山东省立医院) Intelligent management method for electronic health record data after kidney transplantation

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106778014A (en) * 2016-12-29 2017-05-31 浙江大学 A kind of risk Forecasting Methodology based on Recognition with Recurrent Neural Network
EP3622882A1 (en) * 2018-09-14 2020-03-18 Fundació Institut de Ciències Fotòniques System and computer-implemented method for detecting and categorizing pathologies through an analysis of pulsatile blood flow
CN113871021A (en) * 2021-09-29 2021-12-31 曲阜师范大学 Graph and attention machine mechanism-based circRNA and disease association relation prediction method
CN114175173A (en) * 2019-07-24 2022-03-11 杨森制药公司 Learning platform for patient history mapping

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106778014A (en) * 2016-12-29 2017-05-31 浙江大学 A kind of risk Forecasting Methodology based on Recognition with Recurrent Neural Network
EP3622882A1 (en) * 2018-09-14 2020-03-18 Fundació Institut de Ciències Fotòniques System and computer-implemented method for detecting and categorizing pathologies through an analysis of pulsatile blood flow
CN114175173A (en) * 2019-07-24 2022-03-11 杨森制药公司 Learning platform for patient history mapping
CN113871021A (en) * 2021-09-29 2021-12-31 曲阜师范大学 Graph and attention machine mechanism-based circRNA and disease association relation prediction method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
YUN ZHANG 等: "A Core Drug Discovery Framework from Large-Scale Literature for Cold Pathogenic Disease Treatment in Traditional Chinese Medicine", 《JOURNAL OF HEALTHCARE ENGINEERING》 *
张帅: "基于时序图的医疗风险预测研究", 《中国优秀硕士学位论文全文数据库》 *
时培莹: "基于循环神经网络的预测方法及其应用研究", 《中国优秀硕士学位论文全文数据库》 *
李家辉 等: "基于特征排序特征联合算法的疾病危险因素分析", 《计算机应用研究》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118016225A (en) * 2024-04-09 2024-05-10 山东第一医科大学附属省立医院(山东省立医院) Intelligent management method for electronic health record data after kidney transplantation

Also Published As

Publication number Publication date
CN114694841B (en) 2023-04-07
ZA202208574B (en) 2022-11-30

Similar Documents

Publication Publication Date Title
Qiao et al. Mnn: multimodal attentional neural networks for diagnosis prediction
CN111192680B (en) Intelligent auxiliary diagnosis method based on deep learning and collective classification
Davoodi et al. Mortality prediction in intensive care units (ICUs) using a deep rule-based fuzzy classifier
Che et al. Interpretable deep models for ICU outcome prediction
WO2023202508A1 (en) Cognitive graph-based general practice patient personalized diagnosis and treatment scheme recommendation system
Badawy et al. Healthcare predictive analytics using machine learning and deep learning techniques: a survey
Beaulieu-Jones et al. Mapping patient trajectories using longitudinal extraction and deep learning in the MIMIC-III critical care database
Bashir et al. An ensemble based decision support framework for intelligent heart disease diagnosis
Wasan et al. The impact of data mining techniques on medical diagnostics
Lee et al. Machine learning in relation to emergency medicine clinical and operational scenarios: an overview
WO2004016218A2 (en) Medical decision support systems utilizing gene expression and clinical information and method for use
Gupta et al. A novel deep similarity learning approach to electronic health records data
CN116364299A (en) Disease diagnosis and treatment path clustering method and system based on heterogeneous information network
Rongjun et al. Collaborative extreme learning machine with a confidence interval for P2P learning in healthcare
Asogbon et al. Enhanced neuro-fuzzy system based on genetic algorithm for medical diagnosis
CN114694841B (en) Adverse event risk prediction method based on patient electronic health record
Assaf et al. 30-day hospital readmission prediction using MIMIC data
Murad et al. AI powered asthma prediction towards treatment formulation: An android app approach
Reddy et al. Prediction of heart disease using decision tree approach
Ohno-Machado Medical applications of artificial neural networks: connectionist models of survival
Lin et al. Research on Disease Prediction Model Construction Based on Computer AI deep Learning Technology
CN117194604A (en) Intelligent medical patient inquiry corpus construction method
CN116913459A (en) Medicine recommendation method and system based on deep convolution network control gate model
Awotunde et al. An Enhanced Medical Diagnosis System for Malaria and Typhoid Fever Using Genetic Neuro-Fuzzy System
Settouti et al. Interpretable classifier of diabetes disease

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
GR01 Patent grant
GR01 Patent grant