CN109875546B - Depth model classification result visualization method for electrocardiogram data - Google Patents

Depth model classification result visualization method for electrocardiogram data Download PDF

Info

Publication number
CN109875546B
CN109875546B CN201910067724.0A CN201910067724A CN109875546B CN 109875546 B CN109875546 B CN 109875546B CN 201910067724 A CN201910067724 A CN 201910067724A CN 109875546 B CN109875546 B CN 109875546B
Authority
CN
China
Prior art keywords
model
result
electrocardiogram
value
interval
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.)
Active
Application number
CN201910067724.0A
Other languages
Chinese (zh)
Other versions
CN109875546A (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.)
Xian Jiaotong University
Original Assignee
Xian Jiaotong University
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 Xian Jiaotong University filed Critical Xian Jiaotong University
Priority to CN201910067724.0A priority Critical patent/CN109875546B/en
Publication of CN109875546A publication Critical patent/CN109875546A/en
Application granted granted Critical
Publication of CN109875546B publication Critical patent/CN109875546B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

The invention discloses a depth model classification result visualization method for electrocardiogram data, which comprises the following steps: inputting the electrocardiogram sequence into the trained depth model to obtain a reference result; erasing the information of the selected heartbeat interval through the shielding interval, comparing the output result of the depth model when the information of the heartbeat interval is not selected with the reference result output by the depth model, and calculating to obtain an influence factor delta O of each heartbeat on the depth model; and the influence factor delta O of each heartbeat is visually represented by adopting a gradient color band, so that the visualization of the depth model classification result is realized. According to the invention, by analyzing the influence of electrocardiogram data under macroscopic and microscopic granularity on the output result of the depth model, the key evidence of the classification result of the model can be displayed, and the interpretability of the classification result output by the model can be enhanced.

Description

Depth model classification result visualization method for electrocardiogram data
Technical Field
The invention belongs to the technical field of depth model classification result visualization, and particularly relates to a depth model classification result visualization method for electrocardiogram data.
Background
According to the definition of wikipedia, electrocardiographic data refers to data that is captured and recorded by electrodes on the skin, and records the electrophysiological activity of the heart in time units through the thorax. In practice, to improve efficiency and reduce the burden and work intensity of doctors, some deep learning-based models are applied to feature extraction and classification on electrocardiogram data. However, the existing models can only give the final classification result, and the generation basis of the classification result cannot be explained; in practice, the classification result prediction which is not clearly explained is difficult to accept and apply, so that the application scene is greatly limited, and the classification result output by a doctor by using a model is not facilitated.
In summary, a method for visualizing classification results of a depth model for electrocardiographic data is needed.
Disclosure of Invention
The invention aims to provide a depth model classification result visualization method for electrocardiogram data, so as to solve the existing technical problems. The method can display the key evidence of the final result, and can enhance the interpretability of the classification result output by the model.
In order to achieve the purpose, the invention adopts the following technical scheme:
a depth model classification result visualization method oriented to electrocardiogram data comprises the following steps:
step 1, processing acquired electrocardiogram data into an electrocardiogram sequence, and inputting the electrocardiogram sequence into a trained depth model to obtain a reference result;
step 2, taking the heartbeat interval as a basic unit, dynamically adjusting an occlusion interval according to heartbeat information in electrocardiogram data, erasing information of a selected heartbeat interval through the occlusion interval, comparing an output result of the depth model without the heartbeat interval information with a reference result output by the depth model containing the heartbeat information, and calculating to obtain an influence factor delta O of each heartbeat on the depth model;
and 3, visually expressing the influence factor delta O of each heartbeat by adopting a gradient color band to realize the visualization of the depth model classification result.
Further, still include:
step 4, setting a movable shielding interval, and sequentially shielding each point in the electrocardiogram data; comparing the depth model output result of each point shielded by the electrocardiogram data with the reference result output by the depth model respectively to obtain the influence factor of each point on the depth model output result on the electrocardiogram data;
and 5, visually representing the influence factors of each point obtained in the step 4.
Further, step 2 specifically includes:
step 2.1, acquiring the length of each heartbeat interval according to the original electrocardiogram data, dynamically setting a shielding interval according to the length, and sequentially shielding each heartbeat interval;
step 2.2, the electrocardiogram sequence vectors added with the shielding intervals are respectively input into the depth model to obtain a new depth model output result;
and 2.3, respectively calculating the difference value between each new depth model output result obtained in the step 2.2 and the reference result obtained in the step 1, and obtaining the influence factor of each heartbeat interval on the depth model output result.
Further, step 3 specifically includes:
step 3.1, encoding the delta O value corresponding to each heartbeat interval to obtain a corresponding color sequence; the rule is as follows: when Δ O >0, encode it as a preset color, the larger the value, the deeper the color depth; when Δ O <0, encode it as another different preset color, the smaller the value, the deeper the color depth;
step 3.2, dividing the electrocardiogram data sequence into a plurality of rectangles by taking the length of each heartbeat interval as the width of the rectangle and the height of the highest R peak on the electrocardiogram as the length of the rectangle, wherein each rectangle comprises a heartbeat interval; filling the color generated by each heartbeat interval code obtained in the step 3.1 into a rectangle corresponding to each heartbeat interval;
and 3.3, overlaying the color-filled rectangles corresponding to the heartbeat intervals obtained in the step 3.2 on an electrocardiogram data background, so as to realize the visualization of the depth model classification result.
Further, in step 3.2, the center of the rectangle is set to be transparent, the two ends are set to be filled with color, and the rectangle is adjusted to be a gradient color band.
Further, step 1 specifically includes:
the representation form after processing the electrocardiogram data into an electrocardiogram sequence is as follows:
S=[s1,s2,…,si,…,sn]
wherein S is n-dimensional vector, i is 1,2, …, n, SiData representing the ith point in the sequence;
inputting the electrocardiogram sequence into the trained depth model, and obtaining the result data with the format as follows:
Y=[y1,y2,…,yj,…,yN]
in the formula, Y is an N-dimensional vector, and N represents the number of labels of model classification; j ═ 1, 2., N, yjRepresents the classification value of the model on the label j, and is more than or equal to 0 and less than or equal to yj≤1;
Wherein, yjTaking the label corresponding to the maximum value as the prediction classification result of the depth model, and taking the y corresponding to the labeljThe value is set as a reference value O, the label serial number is set as I, and the expression of the reference value O is as follows:
O=max{y1,y2,…,yj,…,yN}
in the formula, yjRepresents the classification value of the model on the label j, and is more than or equal to 0 and less than or equal to yj≤1。
Further, step 2.1, dynamically determining the length of the shielding interval;
obtaining an R peak position label of each heartbeat from original electrocardiogram data, wherein an RR interval of one heartbeat is considered between two R peaks; setting the length of the kth shielding interval as follows:
Lengthk=xk+1-xk
in the formula, L engthkIndicates the length, x, of the occlusion section provided in the k-th RR sectionkX is 0. ltoreq. x representing the abscissa of the kth R peak positionkL en ≦ L en indicating the total length of the ECG sequence;
step 2.2, calculating influence factors of each heartbeat interval information on the output result of the depth model;
step 2.2.1, aligning the starting position of the shielding interval with the R peak position of the kth heartbeat, and setting the interval length as L engthkEnabling the shielding section to cover the kth heartbeat section information;
step 2.2.2, uniformly assigning the vector values in the shielding intervals to be 0, keeping the vector values of the rest positions unchanged, and modifying the electrocardiogram sequence as follows:
Sk=[s1,s2,…,0,…,0,…,sn]
wherein s isiData representing the ith point in the sequence, the region assigned a value of 0 starting from the R peak of the kth beat and having a length of L engthk
Step 2.2.3, adding the electrocardiogram sequence S with the shielded intervalkInputting the vector into the depth model to obtain a new depth model output result Yk,YkIs an N-dimensional vector, and the expression is:
Yk=[y′1,y′2,…,y′N]
of formula (II) to (III)'1,y′2,…,y′NRepresent the output values on the 1,2, …, N labels, respectively;
step 2.2.4, calculating to obtain a depth model result O for shielding the information of the kth heartbeat intervalkDifference from baseline result Δ Ok;ΔOkFor the impact factor of the kth heartbeat interval, the expression is:
ΔOk=yI-y′I
wherein I represents the label number of the reference value O calculated in step 1, and yIAnd y'IA depth model output value represented on the tag number; delta OkRepresenting the influence factor of the kth heartbeat interval on the output result of the depth model; delta Ok>0 represents that the heartbeat interval has positive influence on the model classification result and is a support evidence of the model, and the larger the value is, the more the heartbeat interval is fit with the model classification result; delta Ok<0 indicates that the heartbeat interval has a negative impact on the final classification result, and is the negative evidence of the model, and the value is negativeValues, smaller values indicate more deviation from the model classification results;
and through the numerical value of the delta O, the influence of different heartbeat intervals on the model classification result is distinguished, and the explanation of the model classification result is realized.
Further, step 4 specifically includes:
step 4.1, starting from the first data of the electrocardiogram sequence S vector, setting the data of the next L vector values as 0, keeping the vector values of the rest positions unchanged, and forming an occlusion interval;
an electrocardiogram sequence S with an occlusion interval added in the mth cyclemThe vector data expression is:
Sm=[s1,s2,…,sm-1,0,0,…,0,sm+L,…,sn]
wherein s is1,s2,…,snRepresenting the individual data constituting the ECG sequence, as can be seen from the formula, sm,sm+1,…,sm+L-1The shielding sections are added, and the data in the sections are all assigned to be 0;
step 4.2, calculating the difference value between the output result of the depth model and the reference result after the shielding interval is set point by point to obtain the value of an influence factor delta O of each point on the electrocardiogram;
the method comprises the following specific steps:
step 4.2.1, adding the electrocardiogram sequence S with the shielding section in the mth circulationmInputting the vector into the depth model to obtain the output result Y of the modelmThe expression is:
Ym=[y′1,y′2,…,y′N]
of formula (II) to (III)'1,y′2,…,y′NRepresent the output values on the 1,2, …, N labels, respectively;
step 4.2.2, calculating the difference value delta O between the new model output result obtained in step 4.2.1 and the model reference resultmThe value reflecting the individualThe influence of the points on the output result of the model is calculated by the following formula:
ΔOm=yI-y′I
wherein I represents the label number of the calculated reference value O, yIAnd y'IA depth model output value represented on the tag number; delta OmRepresenting the influence factor of the mth data in the heartbeat sequence on the output result of the depth model; delta Om>0 represents that the point has positive influence on the final classification result and is a supporting evidence of the model, and the larger the value is, the more the point is fit with the final result of the model; delta Om<0 indicates that the point has a negative effect on the final classification result and is the negative evidence of the model, and a negative value indicates that the value deviates from the final result;
and obtaining the influence factor of each point on the electrocardiogram on the classification result of the model through the value of the delta O, and realizing the explanation of the detail information in the electrocardiogram data.
Further, the step 5 specifically comprises the following steps:
step 5.1, encoding the delta O value of each point obtained in the step 4.2 into height, determining a point P on an electrocardiogram plane according to the position and the height of the point, wherein the delta O is greater than 0, the point P is in the upper area of the electrocardiogram, and the corresponding point on the electrocardiogram is displayed as a preset color; Δ O ═ 0, which indicates that point P falls on the zero axis, and the corresponding point on the electrocardiogram is displayed as another preset color; Δ O <0, indicating that point P is in the lower region of the electrocardiogram, displaying the corresponding point on the electrocardiogram as another preset color; the preset colors are different;
step 5.2, connecting points formed by using the serial number as an abscissa and the delta O value as an ordinate by using a smooth curve, and enclosing a plurality of areas together with a zero axis; the height of the curve reflects the magnitude of the absolute value of delta O, and the peak and the valley of the curve reflect the key basis for supporting the model result and violating the model result;
and 5.3, filling the area surrounded by the curve of the step 5.2 by using preset different colors, and realizing the visualization of the classification result of the depth model.
Furthermore, in step 4, the length L of the occlusion interval is in the range of 10 ≦ L ≦ 20.
Compared with the prior art, the invention has the following beneficial effects:
according to the depth model classification result visualization method for the electrocardiogram data, a visualization result display process from the whole situation to the details is designed, and a key basis influencing the result obtained by the model can be completely displayed. Firstly, inputting acquired original electrocardiogram data into a depth model to obtain output data of the depth model, analyzing and determining a predicted classification result according to the output data, storing the output data as a reference result and participating in subsequent comparison to obtain an influence factor; then, dynamically setting parameters of the shielding intervals by combining heartbeat information, obtaining the influence of each heartbeat interval on the final result prediction of the model, and visually displaying the influence by a visual method; and further designing a movable shielding interval, calculating a deviation value of each point and a reference, overlapping the deviation value with the original electrocardiogram data, and displaying the detail characteristics in the electrocardiogram data through the peak value and the area, so that the detail area with abnormity is conveniently searched. According to the method, the influence of the specific area on the final result is calculated by setting the shielding area, and the key evidence of the final result obtained by the model can be displayed by analyzing the influence of the electrocardiogram data under macroscopic and microscopic granularities on the final model result, so that the interpretability of the model result can be enhanced.
The visualization method can enhance the interpretability of the model result; the model result in the traditional method is a specific classification result label, and no way for explaining the result is provided, so that the result is difficult to adopt and use. The method of the invention explains the model result, finds the supporting evidence and the resisting evidence of the model result, shows the influence of each detail on the model result, and can greatly improve the interpretability of the model result.
The invention visually displays the interpretation process from the macroscopic and microscopic angles; the electrocardiogram data under the traditional method is messy and long, and time and labor are wasted in distinguishing key information from the electrocardiogram data. The area with large influence on the model result is very likely to be a critical abnormal area, for example, there is an abnormal phenomenon such as P-wave disappearance. The method provided by the invention discovers the region from the electrocardiogram data and displays the region through visual elements such as color, height and the like on macroscopic granularity and microscopic granularity, so that the operation process of the model is more visual, and the interpretability of the model result is further improved.
The method is suitable for various deep learning models, and has strong expandability; model results are explained under the traditional method by referring to a model structure, and the model results cannot be expanded to other models. The method of the invention is not dependent on a specific model, and all depth model classification results suitable for electrocardiogram data can be explained and displayed by adopting the method, and can be conveniently expanded to the infinite improved models at present.
Drawings
FIG. 1 is a schematic block diagram of a process for visualizing classification results of a depth model for electrocardiographic data according to the present invention;
FIG. 2 is a schematic block diagram of a flow of a method for visualizing the influence of a heartbeat interval in a method for visualizing classification results of a depth model for electrocardiogram data according to the present invention;
FIG. 3 is a schematic block diagram of a flow of a point-by-point influence visualization method in the depth model classification result visualization method for electrocardiogram data according to the present invention;
FIG. 4 is a schematic diagram of a visualization result of the influence of a heartbeat interval in the method for visualizing the classification result of the depth model oriented to the electrocardiogram data according to the present invention;
fig. 5 is a schematic diagram of a point-by-point influence visualization result in the electrocardiogram data-oriented depth model classification result visualization method of the present invention.
Detailed Description
The invention is described in further detail below with reference to the figures and specific examples.
The invention discloses a depth model classification result visualization method for electrocardiogram data, which specifically comprises the following steps:
step 1, acquiring and obtaining a preset number of diagnosed electrocardiogram data, processing each electrocardiogram data into electrocardiogram sequences, inputting each electrocardiogram sequence into a selected trained depth model, obtaining an output result of the depth model, and determining the output result at the moment as a reference result output by the depth model.
The representation form after the original electrocardiogram data is processed into an electrocardiogram sequence is as follows:
S=[s1,s2,…,si,…,sn]
wherein S is n-dimensional vector, i is 1,2, …, n, SiAnd (3) representing data of the ith point in the sequence, inputting the data sequence into a preset trained depth model, and obtaining a result data format as follows:
Y=[y1,y2,…,yj,…,yN]
in the formula, Y is an N-dimensional vector, and N represents the number of labels of model classification; j ═ 1, 2., N, yjRepresents the classification value of the model on the label j, and is more than or equal to 0 and less than or equal to yj1 or less, wherein yjTaking the label corresponding to the maximum value as the prediction classification result of the depth model, and taking the y corresponding to the labeljThe value is set as a reference value O, the label serial number is set as I, and the expression of the reference value O is as follows:
O=max{y1,y2,…,yj,…,yN}
in the formula yjRepresents the classification value of the model on the label j, and is more than or equal to 0 and less than or equal to yj≤1。
And 2, macroscopically displaying the influence of different heartbeat intervals on the output result of the depth model.
Taking the heartbeat interval as a basic unit, dynamically adjusting the shielding interval according to heartbeat information in electrocardiogram data, and calculating the influence factor of each heartbeat interval on the final model. This effect is then visualized using a gradient color band.
The step 2 specifically comprises the following steps:
and 2.1, dynamically determining the length of the shielding interval.
From the original electrocardiogram data, an R peak position label of each heartbeat can be obtained, and an RR interval between two R peaks is considered as one heartbeat. Therefore, the length of the occlusion interval of the kth heartbeat is set as:
Lengthk=xk+1-xk
in the formula, L engthkIndicates the length, x, of the occlusion section provided in the k-th RR sectionkX is 0. ltoreq. x representing the abscissa of the kth R peak positionkL en ≦ L en indicating the total length of the ECG sequence;
and 2.2, calculating the influence of each heartbeat interval on the output result of the depth model.
Obtaining the length of the kth heartbeat interval from the step 2.1, and then dynamically setting a shielding interval according to the length of the heartbeat interval; the method comprises the following specific steps:
step 2.2.1, aligning the starting position of the shielding interval with the R peak position of the kth heartbeat, and setting the length of the shielding interval to L engthkEnabling the shielding section to just cover the information of the RR section of the kth heartbeat;
step 2.2.2, uniformly assigning the vector values in the shielding intervals to be 0, keeping the vector values of the rest positions unchanged, and modifying the electrocardiogram sequence as follows:
Sk=[s1,s2,…,0,…,0,…,sn]
wherein s isiData representing the ith point in the sequence, the region assigned a value of 0 starting from the R peak of the kth beat and having a length of L engthk
Step 2.2.3, in step 2.2.2 we set the occlusion interval on the kth heartbeat interval, now the electrocardiogram sequence S to which the occlusion interval is addedkInputting the vector into the depth model to obtain a new depth model output result Yk,YkIs an N-dimensional vector, and the expression is:
Yk=[y′1,y′2,…,y′N]
of formula (II) to (III)'1,y′2,…,y′NRepresent the output values on the 1,2, …, N labels, respectively;
step 2.2.4, calculating to obtain a depth model result O for shielding the information of the kth heartbeat intervalkDifference from baseline result Δ Ok;ΔOkFor the impact factor of the kth heartbeat interval, the expression is:
ΔOk=yI-y′I
wherein I represents the label number of the reference value O calculated in step 1, and yIAnd y'IA depth model output value represented on the tag number; delta OkRepresenting the influence factor of the kth heartbeat interval on the output result of the depth model; delta Ok>0 represents that the heartbeat interval has positive influence on the model classification result and is a support evidence of the model, and the larger the value is, the more the heartbeat interval is fit with the model classification result; delta Ok<0 indicates that the heartbeat interval has negative influence on the final classification result and is the anti-evidence of the model, the value is a negative value, and the smaller the value is, the more deviation from the classification result of the model is indicated;
and through the numerical value of the delta O, the influence of different heartbeat intervals on the model classification result is distinguished, and the explanation of the model classification result is realized.
And 2.2.5, moving the shielding interval, and repeating the process until the influence factors of all the heartbeat intervals on the result are calculated.
The purpose of setting the shielding interval is to erase the information of the heartbeat, and the result of the model without the heartbeat is compared with the result of the model with the heartbeat, so that the influence factor of the heartbeat on the model can be calculated. The operation is repeatedly executed, and the influence factor of each heartbeat on the model result can be obtained.
And 2.3, visually displaying the influence factors of each heartbeat.
In step 2.2, the obtained difference Δ O can be used to represent the influence of the heartbeat interval on the final result of the model. However, electrocardiogram data is long, comprises a plurality of heartbeat intervals, and is not intuitive enough in a numerical mode, so that a corresponding visualization method needs to be designed. By mapping the values to the colors of the rectangles, the representation of each heartbeat interval can be visually displayed in the electrocardiogram data.
The specific method of step 2.3 is as follows:
(1) encoding Δ O as a color; each heartbeat interval corresponds to a delta O value, and a color sequence can be obtained after coding
In order to visually display the meaning of Δ O, it is coded as color in the present invention, and the rule is:
when Δ O >0, it is coded as red, the larger the value, the deeper the red depth;
when Δ O <0, it is coded as blue, the smaller the value, the deeper the blue depth.
(2) Generating a gradient rectangle
The length of each heartbeat interval is a rectangular width, the height of the highest R peak on the electrocardiogram is a rectangular length, the electrocardiogram data sequence can be divided into a plurality of rectangles, and each rectangle contains a heartbeat interval. And filling the color generated by the heartbeat interval coding into a rectangle. In order to not shield the electrocardiogram information, the center of the rectangle is set to be transparent, the two ends of the rectangle are set to be filled with colors, and the rectangle is adjusted to be a gradual color band.
(3) Superimposing a rectangle onto the electrocardiogram background
And superposing the gradually-changed rectangles corresponding to the heartbeat intervals on the background of the electrocardiogram, so that the visualization effect can be generated.
Obtaining a support evidence and an objection evidence of the model by checking the color on each heartbeat interval, and judging the influence strength of the evidence on the final classification result through the color depth; by the method, the classification result of the model can be explained at the heartbeat level.
And 3, microscopically displaying the influence of the details of the electrocardiogram data on the model result.
In step 2, the influence of different heartbeats on the model result is found by taking the heartbeats as intervals, and the classification result of the model is preliminarily explained. However, some details in the heartbeat interval also have important influence on the classification result of the model, and if the details are not processed, the details are easy to lose. Therefore, the detail in the electrocardiogram sequence data needs to be visualized, the basis of model classification is explained in more detail, and the model interpretability is enhanced.
The step 3 specifically comprises the following steps:
and 3.1, setting a movable shielding interval.
The influence of the whole shielding interval on the model result is regarded as the influence factor of the first point in the interval, so that the influence of each single point on the model result can be obtained by moving the shielding interval point by point.
And 3.2, calculating the difference point by point.
After step 3.1, the length of the occlusion region is determined. Then, using the shielding interval to calculate the point-by-point difference, and the step 3.2 comprises the following steps:
step 3.2.1, starting from the first data of the electrocardiogram sequence S vector, setting the data of the next L vector values as 0, keeping the vector values of the other positions unchanged, and forming an occlusion interval;
an electrocardiogram sequence S with an occlusion interval added in the mth cyclemThe vector data expression is:
Sm=[s1,s2,…,sm-1,0,0,…,0,sm+L,…,sn]
wherein s is1,s2,…,snRepresenting the individual data constituting the ECG sequence, as can be seen from the formula, sm,sm+1,…,sm+L-1The shielding sections are added, and the data in the sections are all assigned to be 0;
step 3.2.2, adding the electrocardiogram sequence S with the shielding section in the mth circulationmInputting the vector into the depth model to obtain the output of the modelGive the result YmThe expression is:
Ym=[y′1,y′2,…,y′N]
of formula (II) to (III)'1,y′2,…,y′NRepresent the output values on the 1,2, …, N labels, respectively;
step 3.2.3, calculating the difference Δ O between the new model output result obtained in step 3.2.2 and the model reference resultmThis value reflects the influence of an individual point on the model output result, and the calculation formula is:
ΔOm=yI-y′I
wherein I represents the label number of the reference value O calculated in step 1, and yIAnd y'IA depth model output value represented on the tag number; delta OmRepresenting the influence factor of the mth data in the heartbeat sequence on the output result of the depth model; delta Om>0 represents that the point has positive influence on the final classification result and is a supporting evidence of the model, and the larger the value is, the more the point is fit with the final result of the model; delta Om<0 indicates that the point has a negative effect on the final classification result and is the negative evidence of the model, and a negative value indicates that the value deviates from the final result;
and obtaining the influence factor of each point on the electrocardiogram on the classification result of the model through the value of the delta O, and realizing the explanation of the detail information in the electrocardiogram data.
And 3.2.4, moving the shielding interval backwards for one grid, and repeating the process until the calculation of the last point is completed. Finally, the value of delta O at each point on the electrocardiogram can be obtained.
And 3.3, visually displaying the point-by-point contribution.
In step 3.2, a Δ O value is calculated for each point, which reflects the effect of the individual points on the final classification of the model. But looking at the value of each point is not intuitive, so it is also necessary to design a visualization method for each point. The point value is different from the heartbeat interval value, and the color of the single point is difficult to see, so that the visualization method of the previous link cannot be adopted, and the point-by-point data characteristics must be displayed.
Step 3.3 the concrete steps are as follows:
step 3.3.1, encode the Δ O value for each point as height.
After step 3.2, each piece of data in the electrocardiogram data sequence corresponds to a Δ O value, the Δ O value is further encoded as a height, and a point P on the electrocardiogram plane is determined by the abscissa of the piece of data and the height encoded by Δ O: Δ O >0, indicating that point P is in the upper region of the electrocardiogram and the corresponding point on the electrocardiogram is shown in red; Δ O ═ 0, indicating that point P falls on the zero axis, and the corresponding point on the electrocardiogram is shown in black; Δ O <0, indicating that point P is in the lower region of the electrocardiogram, and the corresponding point on the electrocardiogram is shown in blue.
Thus each point on the electrocardiogram is colored and presents their contribution to the classification result of the model. While each datum in the sequence of electrocardiographic data corresponds to a point P generated by Δ O.
And 3.3.2, connecting points P corresponding to each datum in the electrocardiogram data sequence by using a smooth curve.
Since the point P is too dense to visually reflect its information by color and height, a smooth curve is required to connect the points P and enclose several regions together with the zero axis. The height of the curve reflects the magnitude of the absolute value of Δ O, and the peaks and valleys of the curve reflect the key basis for supporting and violating model results.
Step 3.3.3, fill the area enclosed by the curve with color.
In order to make the information of the local detail area more intuitive, several areas formed in step 3.3.2 are filled with colors, so that the properties thereof are more obvious. Filling red in the area above the zero axis, and representing the final classification result of the support model of the local area; the area below the zero axis is filled with blue color, representing the final classification result of the local area violating the model. The raw electrocardiogram curve has been divided into several segments, each represented using a different color. Meanwhile, local detail information of the electrocardiogram can be known according to the filling area near the zero axis, the larger the area is, the higher the peak is, the higher the possibility of abnormality occurrence is, and the larger the influence of the area on the formation of the final result of the model is. The visualization display of the details of the electrocardiogram data further illustrates the forming basis of the classification result of the model, and the interpretability of the model is enhanced.
In summary, the invention provides a depth model classification result visualization method for electrocardiogram data, which is used for solving the defects of simple and abstract results and insufficient interpretability of the existing depth model, mainly calculating the influence of a specific area on a final result by setting a shielding interval, and respectively designing a scheme from a macroscopic view and a microscopic view to visually display the influence. Compared with the prior art, the method enhances the interpretability of the model result; the model result in the traditional method is a specific classification result label, and no way for explaining the result exists, so that the result is difficult to be adopted by doctors in the medical field. The method explains the model result, finds the supporting evidence and the resisting evidence of the result obtained by the model, shows the influence of each detail on the final result obtained by the model, and greatly improves the interpretability of the model result; the invention visually displays the explanation process from the macroscopic and microscopic angles: the electrocardiogram data under the traditional method is messy and long, and the distinguishing of key information is a time-consuming and labor-consuming work. The area with large influence on the model result is very likely to be a critical abnormal area, for example, there is an abnormal phenomenon such as P-wave disappearance. The method discovers the region from the electrocardiogram data and displays the region through visual elements such as color, height and the like on macroscopic granularity and microscopic granularity, so that the operation process of the model is more visual, and the interpretability of the model result is improved; the method of the invention is suitable for various models, and has strong expandability: model results are explained under the traditional method by referring to a model structure, and the model results cannot be expanded to other models. The method is not dependent on a specific model, and all depth model classification results suitable for electrocardiogram data can be explained and displayed by the method and can be conveniently expanded to the existing infinite improved models.
Examples
Referring to fig. 1, in order to achieve the final visualization effect, the visualization method of the present invention includes the following steps:
s101, determining a reference result.
In this embodiment, the representation form of the original electrocardiogram data processed into the electrocardiogram sequence is:
S=[s1,s2,…,si,…,sn]
wherein S is n-dimensional vector, i is 1,2, …, n, SiAnd (3) representing data of the ith point in the sequence, inputting the data sequence into a preset trained depth model, and obtaining a result data format as follows:
Y=[y1,y2,…,yj,…,yN]
in the formula, Y is an N-dimensional vector, and N represents the number of labels of model classification; j ═ 1, 2., N, yjRepresents the classification value of the model on the label j, and is more than or equal to 0 and less than or equal to yj1 or less, wherein yjTaking the label corresponding to the maximum value as the prediction classification result of the depth model, and taking the y corresponding to the labeljThe value is set as a reference value O, the label serial number is set as I, and the expression of the reference value O is as follows:
O=max{y1,y2,…,yj,…,yN}
in the formula yjRepresents the classification value of the model on the label j, and is more than or equal to 0 and less than or equal to yj≤1;
S102, designing a visualization method of the influence of the heartbeat interval on the model result.
Referring to fig. 2, a method for visualizing the influence of a heartbeat interval on a model result is designed, which specifically includes the following steps:
1) and dynamically determining the length of the occlusion interval.
From the original electrocardiogram data, an R peak position label of each heartbeat can be obtained, and an RR interval between two R peaks is considered as one heartbeat. Therefore, the length of the occlusion interval of the kth heartbeat is set as:
Lengthk=xk+1-xk
in the formula, L engthkIndicates the length, x, of the occlusion section provided in the k-th RR sectionkX is 0. ltoreq. x representing the abscissa of the kth R peak positionkL en ≦ L en indicating the total length of the ECG sequence;
2) the influence of each heartbeat on the model result is calculated.
From the previous step we obtain the length of the kth heartbeat interval, and then need to set the occlusion interval according to the length.
S1, aligning the starting position of the shielding interval with the R peak position of the kth heartbeat, and setting the interval length to L engthkSo that the occlusion interval covers exactly the kth heartbeat.
S2, uniformly assigning the vector values in the occlusion intervals as 0, keeping the vector values at the rest positions unchanged, and modifying the electrocardiogram sequence as follows:
Sk=[s1,s2,…,0,…,0,…,sn]
wherein s isiData representing the ith point in the sequence, the region assigned a value of 0 starting from the R peak of the kth beat and having a length of L engthk
S3, in S2 we set the occlusion region in the kth heartbeat region, now add the electrocardiogram sequence S with the occlusion regionkInputting the vector into the depth model to obtain a new depth model output result Yk,YkIs an N-dimensional vector, and the expression is:
Yk=[y′1,y′2,…,y′N]
of formula (II) to (III)'1,y′2,…,y′NRepresent the output values on the 1,2, …, N labels, respectively;
s4, calculating a depth model result O for obtaining information of the occlusion k-th heartbeat intervalkDifference from baseline result Δ Ok;ΔOkFor the impact factor of the kth heartbeat interval, the expression is:
ΔOk=yI-y′I
wherein I represents the label number of the reference value O calculated in step 1,yIand y'IA depth model output value represented on the tag number; delta OkRepresenting the influence factor of the kth heartbeat interval on the output result of the depth model; delta Ok>0 represents that the heartbeat interval has positive influence on the model classification result and is a support evidence of the model, and the larger the value is, the more the heartbeat interval is fit with the model classification result; delta Ok<0 indicates that the heartbeat interval has negative influence on the final classification result and is the anti-evidence of the model, the value is a negative value, and the smaller the value is, the more deviation from the classification result of the model is indicated;
and through the numerical value of the delta O, the influence of different heartbeat intervals on the model classification result is distinguished, and the explanation of the model classification result is realized.
And S5, moving the shielding interval, repeating the process, and calculating the influence of the (k + 1) th heartbeat on the result.
The purpose of setting the shielding interval in the embodiment of the invention is to erase the information of the heartbeat, and the result of the model without the heartbeat is compared with the result of the model with the heartbeat, so that the influence value of the heartbeat on the model can be calculated. The operation is repeatedly executed, and the influence value of each heartbeat on the model result can be obtained.
3) The effect of each heartbeat is visually shown.
In step 2), the obtained difference Δ O can be used to represent the influence of the heartbeat interval on the final result of the model. However, the electrocardiogram data is long, contains a plurality of heartbeat intervals, and is not intuitive enough in a numerical mode, so that a corresponding visualization method needs to be designed. By mapping the values to the colors of the rectangles, the representation of each heartbeat interval can be visually displayed in the electrocardiogram data. The specific method comprises the following steps:
s1, encoding Δ O as a color. To visually display the meaning of Δ O, it can be coded as a color, with the rule: when Δ O >0, it is coded as red, the larger the value, the deeper the red depth; when Δ O <0, it is coded as blue, the smaller the value, the deeper the blue depth. Each heartbeat interval corresponds to a delta O value, and a color sequence can be obtained after coding.
And S2, generating a gradient rectangle.
The length of each heartbeat interval is a rectangular width, the height of the highest R peak on the electrocardiogram is a rectangular length, the electrocardiogram can be divided into a plurality of rectangles, and each rectangle contains one heartbeat interval. And filling the color generated by the heartbeat interval coding into a rectangle.
Meanwhile, in order to not shield the electrocardiogram information, the center of the rectangle is set to be transparent, the two ends of the rectangle are set to be filled with colors, and the rectangle is adjusted to be a gradient color band.
S3, the rectangle is superimposed on the electrocardiogram background.
And finally, superimposing the gradually-changed rectangles corresponding to the heartbeat intervals on the background of the electrocardiogram, so that the visualization effect can be generated. And obtaining supporting evidence and resisting evidence of the model according to the color of each heartbeat interval, and explaining the classification result of the model.
In this example, we chose the actual electrocardiogram data donated by alivec to illustrate the implementation of the method. It should be noted that, as an example, this example only lists a data segment to illustrate the implementation of the method, and the actual electrocardiogram data far exceeds the listed range.
In an embodiment of the present invention, the electrocardiogram data segments are:
S=[...0bff 02ff fbfe f7fe f4fe f4fe f5fe f7fe f9fe fcfe 00ff 03ff07ff 09ff 0bff 0dff...];
in order to obtain a reference value, S is input into the model, and the classification result of the model is as follows:
Y=[0.1215,0.9877,0.1010];
from the classification result, it can be seen that the classification value corresponding to the AF label is the largest among all classification values, which is 0.9877, i.e. the model classification result is considered as AF, which represents Atrial Fibrillation. From the foregoing definitions, we can derive the reference value yI=0.9877;
The labels of two electrocardiogram R peaks are obtained from the data, and the data in the RR interval is changed into 0 to form a shielding interval. After modification, S is:
S=[...0000 0000 0000 0000 0000 0000f5fe f7fe f9fe fcfe 00ff 03ff07ff 09ff 0bff 0dff...]
re-inputting the classification result into the model to obtain a new classification result:
Y=[0.2011,0.6856,0.1317]
at this time, the classification value y 'corresponding to the label AF'I0.6856, the influence factor Δ O is given by the formulaI-y′I=0.3021。
Since Δ O >0, that is, after the heartbeat segment is shielded, the significance of the model classification result is reduced, so that it can be considered that the heartbeat interval supports the model classification result and is a positive basis for the model to obtain the result.
And repeating the above processes, and calculating the influence factor of each heartbeat interval. The impact factor values are then encoded into colors, and a gradient rectangle is generated and superimposed on the electrocardiogram waveform.
Referring to fig. 4, the final visualization effect is shown in fig. 4, and it can be seen from the figure that, for each heartbeat interval, the color of the gradient rectangle shows the influence of the interval on the model final result, the red part represents the support model classification result, the blue part represents the object model classification result, and the depth of the color reflects the magnitude of the influence. The visualization explains the effect of each heartbeat interval on the final classification result of the model.
S103, designing a point-by-point visualization method for the influence of the model result.
Referring to fig. 3, an implementation flow of a method for visualizing the influence of a single point on a model classification result is shown in fig. 3, and the specific steps include:
1) setting a movable shielding interval.
Since point-by-point differences need to be calculated, the occlusion interval starts at the first point and moves backwards one at a time, the length L of the occlusion interval being 15.
2) The difference is calculated point by point.
After the first step, the length of the occlusion interval has been determined. Then, calculating a point-by-point difference value by using the shielding interval, and specifically comprising the following steps:
s1, starting from the first data of the electrocardiogram sequence S vector, setting the data of L vector values as 0, keeping the vector values of other positions unchanged, and forming an occlusion interval;
an electrocardiogram sequence S with an occlusion interval added in the mth cyclemThe vector data expression is:
Sm=[s1,s2,…,sm-1,0,0,…,0,sm+L,…,sn]
wherein s is1,s2,…,snRepresenting the individual data constituting the ECG sequence, as can be seen from the formula, sm,sm+1,…,sm+L-1The shielding sections are added, and the data in the sections are all assigned to be 0;
s2, adding the electrocardiogram sequence S with the occlusion sections in the mth cyclemInputting the vector into the depth model to obtain the output result Y of the modelmThe expression is:
Ym=[y′1,y′2,…,y′N]
of formula (II) to (III)'1,y′2,…,y′NRepresent the output values on the 1,2, …, N labels, respectively;
s3, calculating the difference value delta O between the new model output result obtained in the step S2 and the model reference resultmThis value reflects the influence of an individual point on the model output result, and the calculation formula is:
ΔOm=yI-y′I
wherein I represents the label number of the reference value O calculated in step 1, and yIAnd y'IA depth model output value represented on the tag number; delta OmRepresenting the influence factor of the mth data in the heartbeat sequence on the output result of the depth model; delta Om>0 represents that the point has positive influence on the final classification result and is a supporting evidence of the model, and the larger the value is, the more the point is fit with the final result of the model; delta Om<0 indicates that the point has a negative effect on the final classification result and is the negative evidence of the model, and a negative value indicates that the value deviates from the final result;
and obtaining the influence factor of each point on the electrocardiogram on the classification result of the model through the value of the delta O, and realizing the explanation of the detail information in the electrocardiogram data.
And S4, moving the shielding interval backwards one grid, repeating the process, and finally calculating to obtain the delta O value of each point on the electrocardiogram.
3) And visually displaying the point-by-point contribution.
In the previous step, a Δ O value is calculated for each point, which reflects the effect of the individual point on the final classification of the model. But looking at the value of each point is not intuitive, so it is also necessary to design a visualization method for each point. The point value is different from the heartbeat interval value, and the color of the single point is difficult to see, so that the visualization method of the previous link cannot be adopted, and the point-by-point data characteristics must be displayed. The method comprises the following specific steps:
s1, encoding the Δ O value of each point as height.
After the previous step, in the sequence of electrocardiographic data, each datum corresponds to a Δ O value, further the Δ O value is encoded as a height, and a point P on the electrocardiographic plane is determined by the abscissa of the datum and the height encoded by Δ O: Δ O >0, indicating that point P is in the upper region of the electrocardiogram and the corresponding point on the electrocardiogram is shown in red; Δ O ═ 0, indicating that point P falls on the zero axis, and the corresponding point on the electrocardiogram is shown in black; Δ O <0, indicating that point P is in the lower region of the electrocardiogram, and the corresponding point on the electrocardiogram is shown in blue.
Thus each point on the electrocardiogram is colored and presents their contribution to the classification result of the model. While each datum in the sequence of electrocardiographic data corresponds to a point P generated by Δ O.
S2, connecting the points P corresponding to each data in the electrocardiogram data sequence by using a smooth curve.
Since the points are too dense to visually reflect their information by color and height, a smooth curve is needed to connect the points P and enclose several areas together with the zero axis. The height of the curve reflects the magnitude of the absolute value of Δ O, and the peaks and valleys of the curve reflect the key basis for supporting and violating model results.
S3, filling the area enclosed by the curve with color.
In order to make the information of the local detail area more intuitive, colors are filled in the plurality of areas formed in the last step, so that the attributes of the areas are more obvious. Filling red in the area above the zero axis, and representing the final classification result of the support model of the local area; the area below the zero axis is filled with blue color, representing the final classification result of the local area violating the model. The raw electrocardiogram curve has been divided into several segments, each represented using a different color. Meanwhile, local detail information of the electrocardiogram can be known according to the filling area near the zero axis, the larger the area is, the higher the peak is, the higher the possibility of abnormality occurrence is, and the greater the influence on the formation of the final result of the model is. The visualization display of the details of the electrocardiogram data further illustrates the forming basis of the classification result of the model, and the interpretability of the model is enhanced.
In the present embodiment, as an example, the idea illustrated in S102 continues as it is. The difference is that in S102, in order to obtain the influence of each heartbeat interval on the classification result, the length and the moving distance of the occlusion window are dynamically adjusted according to the length of the heartbeat interval, and the effect is to occlude exactly one heartbeat interval. In this step, in order to obtain the influence of each point on the classification result, the occlusion interval needs to adopt a fixed length, and at the same time, the occlusion interval is moved backward one point at a time until the influence factors of all the points are calculated.
For example, a real electrocardiogram data segment is:
S=[...2cff 2dff 2eff 2fff 32ff 35ff 37ff 3aff...];
setting the length of the occlusion interval to be 15 and the moving distance to be 1, and in order to find the influence factor of the first point, we can set the occlusion interval from the point:
S=[...0000 0000 0000 000f 32ff 35ff 37ff 3aff...]
inputting the data with the shielding interval into the model, and obtaining a new classification value y 'according to a new output result of the model'I=0.9903。
The influence factor Δ O ═ y of the first point can be derived from the formulaI-y′I=-0.0026。
Since Δ O <0, we can consider this point to be against the model classification result, giving the model a negative basis for this classification result.
Then the length of the shielding interval is unchanged, and a point is moved backwards:
S=[...2000 0000 0000 0000 32ff 35ff 37ff 3aff...];
and repeating the above processes to obtain the influence factor of each point.
Points on the electrocardiogram plane are then generated according to a visualization method, connected by curves, which with the zero axis may form several bounding regions. And filling the surrounding area with corresponding colors according to the positive and negative of the influence factor.
Referring to fig. 5, the resulting visualization effect is shown in fig. 5. As can be seen from the figure, the original waveform of the electrocardiogram is divided into three colors of red, blue and black, which represent the influence of the waveform on the final classification result of the model. Meanwhile, the points determined by the influence factors are connected into a curve, the curve and the zero axis jointly surround to form a plurality of areas, and the areas explain the detailed basis of the model for obtaining the final classification result. For example, the boxed portion of FIG. 5 shows an up-spike region, suggesting that there may be an anomaly in this region. From medical knowledge, it is here that P-wave disappearance abnormalities appear, and it is this detail that is of interest that the model ultimately yields a classification of Atrial Fibrillation (AF). The region is difficult to find intuitively in the common electrocardiogram, but a strong peak appears in the region by means of the visualization method, so that the depth model classification result can be interpreted more intuitively by the method compared with the common method, namely, the interpretability of the depth model classification result is improved.
And S104, forming a final visualization result.
Through the steps, the macroscopic visualization effect and the detail visualization effect are superposed, and finally, the comprehensive visualization effect from the macroscopic view to the detail view is established. The macroscopic effect is shown in fig. 4 and the detailed effect is shown in fig. 5. The visualization effect completely explains the model classification result, highlights the key basis for the model to make the classification result, and enhances the interpretability of the model classification result. In practical application, a doctor can determine a heartbeat interval which is possibly abnormal according to macroscopic information and quickly position the heartbeat interval to a specific heartbeat interval to check details; and the possible abnormal phenomenon can be judged according to the detail information, and the key information can be found from the waveform details, so that the diagnosis efficiency is improved.
In summary, the invention discloses a depth model classification result visualization method for electrocardiogram data, which comprises the following steps: firstly, inputting original electrocardiogram data into a model to obtain original output data of the model, analyzing a final prediction result, and storing the original data as a reference to participate in subsequent comparison; and then, dynamically setting a shielding interval according to the heartbeat interval to obtain an influence factor of each heartbeat on a final classification result, coding the influence factor into colors, generating a gradually changing rectangle to be superposed on the original electrocardiogram information, and visually displaying the influence of each heartbeat interval on the final classification result of the model by a visual method. And then, resetting parameters of the movable shielding interval, moving the shielding interval, calculating a deviation value of each point and a reference, overlapping the value with original data, displaying detail characteristics of the electrocardiogram through a peak value and an area, expressing the influence of a micro area on a model classification result, and revealing a key basis of the model to obtain the result. According to the invention, the influence of electrocardiogram data on the final model classification result under macroscopic and detailed granularities is displayed, the model classification result is explained, the key evidence of the model for obtaining the final result is displayed, and the problem of insufficient interpretability of the model result is solved; meanwhile, the visual display method deeply excavates key information in electrocardiogram data, visually expresses the operation process of the model, and further improves the interpretability of the depth model classification result.
Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art can make modifications and equivalents to the embodiments of the present invention without departing from the spirit and scope of the present invention, which is set forth in the claims of the present application.

Claims (10)

1. A depth model classification result visualization method oriented to electrocardiogram data is characterized by comprising the following steps:
step 1, processing acquired electrocardiogram data into an electrocardiogram sequence, and inputting the electrocardiogram sequence into a trained depth model to obtain a reference result;
step 2, taking the heartbeat interval as a basic unit, dynamically adjusting an occlusion interval according to heartbeat information in electrocardiogram data, erasing information of a selected heartbeat interval through the occlusion interval, comparing an output result of the depth model without the heartbeat interval information with a reference result output by the depth model containing the heartbeat information, and calculating to obtain an influence factor delta O of each heartbeat on the depth model;
and 3, visually expressing the influence factor delta O of each heartbeat by adopting a gradient color band to realize the visualization of the depth model classification result.
2. The method for visualizing the classification result of the depth model based on the electrocardiographic data according to claim 1, further comprising:
step 4, setting a movable shielding interval, and sequentially shielding each point in the electrocardiogram data; comparing the depth model output result of each point shielded by the electrocardiogram data with the reference result output by the depth model respectively to obtain the influence factor of each point on the depth model output result on the electrocardiogram data;
and 5, visually representing the influence factors of each point obtained in the step 4.
3. The method for visualizing the classification result of the depth model oriented to the electrocardiographic data according to claim 1, wherein the step 2 specifically comprises:
step 2.1, acquiring the length of each heartbeat interval according to the original electrocardiogram data, dynamically setting a shielding interval according to the length, and sequentially shielding each heartbeat interval;
step 2.2, the electrocardiogram sequence vectors added with the shielding intervals are respectively input into the depth model to obtain a new depth model output result;
and 2.3, respectively calculating the difference value between each new depth model output result obtained in the step 2.2 and the reference result obtained in the step 1, and obtaining the influence factor of each heartbeat interval on the depth model output result.
4. The method for visualizing the classification result of the depth model oriented to the electrocardiographic data according to claim 1, wherein the step 3 specifically comprises:
step 3.1, encoding the delta O value corresponding to each heartbeat interval to obtain a corresponding color sequence; the rule is as follows: when the delta O is more than 0, the delta O is coded into a preset color, and the larger the value is, the deeper the color depth is; when the delta O is less than 0, the delta O is coded into another different preset color, and the smaller the value is, the deeper the color depth is;
step 3.2, dividing the electrocardiogram data sequence into a plurality of rectangles by taking the length of each heartbeat interval as the width of the rectangle and the height of the highest R peak on the electrocardiogram as the length of the rectangle, wherein each rectangle comprises a heartbeat interval; filling the color generated by each heartbeat interval code obtained in the step 3.1 into a rectangle corresponding to each heartbeat interval;
and 3.3, overlaying the color-filled rectangles corresponding to the heartbeat intervals obtained in the step 3.2 on an electrocardiogram data background, so as to realize the visualization of the depth model classification result.
5. The method for visualizing the classification result of the depth model based on the electrocardiographic data according to claim 4, wherein in step 3.2, the center of the rectangle is set to be transparent, the two ends are set to be filled with color, and the rectangle is adjusted to be a gradient color band.
6. The method for visualizing the classification result of the depth model oriented to the electrocardiographic data according to claim 1, wherein the step 1 specifically comprises:
the representation form after processing the electrocardiogram data into an electrocardiogram sequence is as follows:
S=[s1,s2,...,si,...,sn]
wherein S is an n-dimensional vector, i is 1,2iData representing the ith point in the sequence;
inputting the electrocardiogram sequence into the trained depth model, and obtaining the result data with the format as follows:
Y=[y1,y2,...,yj,...,yN]
in the formula, Y is an N-dimensional vector, and N represents the number of labels of model classification; j ═ 1, 2., N, yjRepresents the classification value of the model on the label j, and is more than or equal to 0 and less than or equal to yj≤1;
Wherein, yjTaking the label corresponding to the maximum value as the prediction classification result of the depth model, and taking the y corresponding to the labeljThe value is set as a reference value O, the label serial number is set as I, and the expression of the reference value O is as follows:
O=max{y1,y2,...,yj,...,yN}
in the formula, yjRepresents the classification value of the model on the label j, and is more than or equal to 0 and less than or equal to yj≤1。
7. The method for visualizing the classification result of the depth model oriented to the electrocardiographic data according to claim 6, wherein the step 2 specifically comprises:
step 2.1, dynamically determining the length of an occlusion interval;
obtaining an R peak position label of each heartbeat from original electrocardiogram data, wherein an RR interval of one heartbeat is considered between two R peaks; setting the length of the kth shielding interval as follows:
Lengthk=xk+1-xk
in the formula, L engthkIndicates the length, x, of the occlusion section provided in the k-th RR sectionkX is 0. ltoreq. x representing the abscissa of the kth R peak positionkL en ≦ L en indicating the total length of the ECG sequence;
step 2.2, calculating influence factors of each heartbeat interval information on the output result of the depth model;
step 2.2.1, aligning the starting position of the shielding interval with the R peak position of the kth heartbeat, and setting the interval length as L engthkEnabling the shielding section to cover the kth heartbeat section information;
step 2.2.2, uniformly assigning the vector values in the shielding intervals to be 0, keeping the vector values of the rest positions unchanged, and modifying the electrocardiogram sequence as follows:
Sk=[s1,s2,...,0,...,0,...,sn]
wherein s isiData representing the ith point in the sequence, the region assigned a value of 0 starting from the R peak of the kth beat and having a length of L engthk
Step 2.2.3, adding the electrocardiogram sequence S with the shielded intervalkInputting the vector into the depth model to obtain a new depth model output result Yk,YkIs an N-dimensional vector, and the expression is:
Yk=[y′1,y′2,...,y′N]
of formula (II) to (III)'1,y′2,...,y′NRepresent the output values on the 1, 2., N labels, respectively;
step 2.2.4, calculating to obtain a depth model result O for shielding the information of the kth heartbeat intervalkDifference from baseline result Δ Ok;ΔOkFor the impact factor of the kth heartbeat interval, the expression is:
ΔOk=yI-y′I
in the formula, I representsLabel serial number, y of reference value O calculated in step 1IAnd y'IA depth model output value represented on the tag number; delta OkRepresenting the influence factor of the kth heartbeat interval on the output result of the depth model; delta OkIf the value is more than 0, the heartbeat interval has positive influence on the model classification result and is a support evidence of the model, and the larger the value is, the more the heartbeat interval is fit with the model classification result; delta OkThe heartbeat interval is less than 0, which indicates that the heartbeat interval has negative influence on the final classification result and is the anti-evidence of the model, the value is a negative value, and the smaller the value is, the more deviation from the classification result of the model is indicated;
and through the numerical value of the delta O, the influence of different heartbeat intervals on the model classification result is distinguished, and the explanation of the model classification result is realized.
8. The method for visualizing the classification result of the depth model oriented to the electrocardiographic data according to claim 2, wherein the step 4 specifically comprises:
step 4.1, starting from the first data of the electrocardiogram sequence S vector, setting the data of the next L vector values as 0, keeping the vector values of the rest positions unchanged, and forming an occlusion interval;
an electrocardiogram sequence S with an occlusion interval added in the mth cyclemThe vector data expression is:
Sm=[s1,s2,...,sm-1,0,0,...,0,sm+L,...,sn]
wherein s is1,s2,...,snRepresenting the individual data constituting the ECG sequence, as can be seen from the formula, sm,sm+1,...,sm+L-1The shielding sections are added, and the data in the sections are all assigned to be 0;
step 4.2, calculating the difference value between the output result of the depth model and the reference result after the shielding interval is set point by point to obtain the value of an influence factor delta O of each point on the electrocardiogram;
the method comprises the following specific steps:
step 4.2.1, adding the electrocardiogram sequence S with the shielding section in the mth circulationmInputting the vector into the depth model to obtain the output result Y of the modelmThe expression is:
Ym=[y′1,y′2,...,y′N]
of formula (II) to (III)'1,y′2,...,y'NRepresent the output values on the 1, 2., N labels, respectively;
step 4.2.2, calculating the difference value delta O between the new model output result obtained in step 4.2.1 and the model reference resultmThis value reflects the influence of an individual point on the model output result, and the calculation formula is:
ΔOm=yI-y′I
wherein I represents the label number of the calculated reference value O, yIAnd y'IA depth model output value represented on the tag number; delta OmRepresenting the influence factor of the mth data in the heartbeat sequence on the output result of the depth model; delta OmThe value is more than 0, the point has positive influence on the final classification result and is the supporting evidence of the model, and the larger the value is, the more the point is fit with the final result of the model; delta Om<0 indicates that the point has a negative effect on the final classification result and is the negative evidence of the model, and the value is negative, and the smaller the value is, the more deviation from the final result is indicated;
and obtaining the influence factor of each point on the electrocardiogram on the classification result of the model through the value of the delta O, and realizing the explanation of the detail information in the electrocardiogram data.
9. The method for visualizing the classification result of the depth model oriented to the electrocardiographic data according to claim 8, wherein the specific steps in the step 5 comprise:
step 5.1, encoding the delta O value of each point obtained in the step 4.2 into height, determining a point P on an electrocardiogram plane according to the position and the height of the point, wherein the delta O is more than 0, the point P is in the upper area of the electrocardiogram, and the corresponding point on the electrocardiogram is displayed as a preset color; Δ O ═ 0, which indicates that point P falls on the zero axis, and the corresponding point on the electrocardiogram is displayed as another preset color; Δ O <0, indicating that point P is in the lower region of the electrocardiogram, displaying the corresponding point on the electrocardiogram as another preset color; the preset colors are different;
step 5.2, connecting points formed by using the serial number as an abscissa and the delta O value as an ordinate by using a smooth curve, and enclosing a plurality of areas together with a zero axis; the height of the curve reflects the magnitude of the absolute value of delta O, and the peak and the valley of the curve reflect the key basis for supporting the model result and violating the model result;
and 5.3, filling the region surrounded by the curve of the step 5.2 and the zero axis by using preset different colors, and realizing the visualization of the classification result of the depth model.
10. The method as claimed in claim 8, wherein in step 4, the length L of the occlusion region is in the range of 10 ≦ L ≦ 20.
CN201910067724.0A 2019-01-24 2019-01-24 Depth model classification result visualization method for electrocardiogram data Active CN109875546B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910067724.0A CN109875546B (en) 2019-01-24 2019-01-24 Depth model classification result visualization method for electrocardiogram data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910067724.0A CN109875546B (en) 2019-01-24 2019-01-24 Depth model classification result visualization method for electrocardiogram data

Publications (2)

Publication Number Publication Date
CN109875546A CN109875546A (en) 2019-06-14
CN109875546B true CN109875546B (en) 2020-07-28

Family

ID=66926716

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910067724.0A Active CN109875546B (en) 2019-01-24 2019-01-24 Depth model classification result visualization method for electrocardiogram data

Country Status (1)

Country Link
CN (1) CN109875546B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111161789B (en) * 2019-12-11 2023-10-31 深圳先进技术研究院 Analysis method and device for key areas of model prediction
CN112587148B (en) * 2020-12-01 2023-02-17 上海数创医疗科技有限公司 Template generation method and device comprising fuzzification similarity measurement method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004032741A1 (en) * 2002-10-09 2004-04-22 Bang & Olufsen Medicom A/S A procedure for extracting information from a heart sound signal
CN101263510A (en) * 2004-11-08 2008-09-10 依德西亚有限公司 Method and apparatus for electro-biometric identity recognition
CN102542283A (en) * 2010-12-31 2012-07-04 北京工业大学 Optimal electrode assembly automatic selecting method of brain-machine interface
CN105960200A (en) * 2014-02-25 2016-09-21 圣犹达医疗用品心脏病学部门有限公司 Systems and methods for using electrophysiology properties for classifying arrhythmia sources
CN108478209A (en) * 2018-02-24 2018-09-04 乐普(北京)医疗器械股份有限公司 Ecg information dynamic monitor method and dynamic monitor system
CN108937912A (en) * 2018-05-12 2018-12-07 鲁东大学 A kind of automatic arrhythmia analysis method based on deep neural network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6669455B2 (en) * 2015-09-10 2020-03-18 日本光電工業株式会社 Electrocardiogram analysis method, electrocardiogram analyzer, electrocardiogram analysis program, and computer-readable storage medium storing electrocardiogram analysis program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004032741A1 (en) * 2002-10-09 2004-04-22 Bang & Olufsen Medicom A/S A procedure for extracting information from a heart sound signal
CN101263510A (en) * 2004-11-08 2008-09-10 依德西亚有限公司 Method and apparatus for electro-biometric identity recognition
CN102542283A (en) * 2010-12-31 2012-07-04 北京工业大学 Optimal electrode assembly automatic selecting method of brain-machine interface
CN105960200A (en) * 2014-02-25 2016-09-21 圣犹达医疗用品心脏病学部门有限公司 Systems and methods for using electrophysiology properties for classifying arrhythmia sources
CN108478209A (en) * 2018-02-24 2018-09-04 乐普(北京)医疗器械股份有限公司 Ecg information dynamic monitor method and dynamic monitor system
CN108937912A (en) * 2018-05-12 2018-12-07 鲁东大学 A kind of automatic arrhythmia analysis method based on deep neural network

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Nonparametric models for characterizing the topical communities in social network;Ziqi Liu et al.;《Neurocomputing》;20161205;439-450 *
面向网络舆情数据的异常行为识别;郝亚洲等;《计算机研究与发展》;20160315;611-620 *

Also Published As

Publication number Publication date
CN109875546A (en) 2019-06-14

Similar Documents

Publication Publication Date Title
EP1527422B1 (en) Image processing method for displaying information relating to wall motions of a deformable 3-d object
CN109875546B (en) Depth model classification result visualization method for electrocardiogram data
US8970581B2 (en) System and method for interactive contouring for 3D medical images
CN105263405A (en) Multi-parameter physiological mapping
CN106600596A (en) Dynamic display method and system for heart cavity
EP3545500B1 (en) System and method for rendering complex data in a virtual reality or augmented reality environment
CN108403105B (en) Display method and display device for electrocardio scatter points
JP6288676B2 (en) Visualization device, visualization method, and visualization program
CN111047610A (en) Focal region presenting method and device
US20200258274A1 (en) Interpolation of dynamic three-dimensional maps
CN114881975A (en) System, method, electronic device, and medium for predicting aneurysm rupture potential
US8986215B2 (en) Image processing apparatus, image processing method, and image processing program
CN110403598A (en) The processing method and processing device of three-dimensional electrocardio scatter plot
CN100577107C (en) Function image display method and device
EP2907450B1 (en) Medical image display control apparatus and operation method of the same, and medium
Kaufman et al. New interface metaphors for complex information space visualization: an ECG monitor object prototype
US9443329B2 (en) Systems and methods for graphic visualization of ventricle wall motion
KR20230048298A (en) Video stream processing related to surgical operations
CN108937978A (en) A kind of Layering manifestation method of blood flow complete alternation imaging algorithm
Sheharyar et al. Visual Analysis of Regional Anomalies in Myocardial Motion.
CN111105872A (en) Interaction method and device of medical image artificial intelligence auxiliary diagnosis system and PACS
Hellar et al. Manifold Approximating Graph Interpolation of Cardiac Local Activation Time
CN116784862A (en) Processing method and device of dynamic electrocardiographic scatter diagram, medical equipment and storage medium
KR102503723B1 (en) Method of searching for similar medical image and similar image search device for performing method
CN116803345A (en) Target area dividing method, device, equipment and medium of dynamic electrocardiograph scatter diagram

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