Hematoma expansion risk prediction method based on XRLD integrated classifier
By integrating XGBoost, random forest, LightGBM and decision tree classifier, combined with VIF and VP, XRLD integrated classifier is constructed, which solves the problem of insufficient accuracy and generalization ability of a single classifier when predicting the risk of hematoma dilation after hemorrhagic stroke. More efficient risk assessment and more comprehensive factor considerations are achieved, improving prediction accuracy and stability.
Patent Information
- Application Number
- CN202311367817.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-20
- Publication Date
- 2024-12-13
AI Technical Summary
When the prior art predicts the risk of hematoma dilation after hemorrhagic stroke, a single classifier is difficult to process high-dimensional data sets, resulting in low prediction accuracy and weak generalization ability, and ignores the impact of multiple factors on hematoma dilation.
The integrated method of XGBoost, random forest, LightGBM and decision tree classifier is adopted, combined with VIF and VP, and XRLD integrated classifier is constructed, taking into account the patient's personal history, disease history and pathogenesis related factors, screening important characteristic variables, and diagnosing the risk of hematoma dilation .
It improves the prediction accuracy and stability of hematoma dilation risk, reduces redundant information, can more comprehensively evaluate the patient's hematoma dilation risk, and provides important treatment and intervention decision-making guidance.
Smart Images

Figure CN119132624A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of risk prediction of hematoma expansion after hemorrhagic stroke, and in particular relates to a method for predicting the risk of hematoma expansion based on an XRLD ensemble classifier. Background Art
[0002] Hemorrhagic stroke is a neurological disease caused by rupture of cerebral blood vessels, accounting for 10% to 20% of all stroke incidence (Chen S, Zeng L, Hu Z. Progressing haemorrhagic stroke: categories, causes, mechanisms and managements. J Neurol. 2014 Nov; 261(11): 2061-78.). Its causes involve hypertension, diabetes, rupture of cerebral aneurysms, cerebral artery abnormalities and many other aspects. In the acute phase, the mortality rate is as high as 40% (van Asch CJ, Luitse MJ, Rinkel GJ, van der Tweel I, Algra A, Klijn CJ. Incidence, case fatality, and functional outcome of intracerebral haemorrhage over time, according to age, sex, and ethnic origin: a systematic review and meta-analysis. Lancet Neurol. 2010 Feb; 9 (2): 167-76.), with high mortality and high disability, seriously endangering people's life and health. After hemorrhagic stroke, hematoma expansion is one of the important risk factors for poor prognosis. Continuous expansion of hematoma can cause a rapid increase in intracranial pressure in patients, thereby further deteriorating neurological function, and even endanger the patient's life. Therefore, accurately predicting and effectively controlling hematoma expansion after hemorrhagic stroke is an urgent problem to be solved in the current clinical medicine field.
[0003] More and more studies have shown that the patient's personal history, medical history and onset are related, especially hypertension will greatly increase the risk of hematoma expansion after hemorrhagic stroke. Its pathological process is that hypertension can cause continuous bleeding at the primary site, causing blood to penetrate into the surrounding tissue to form a hematoma. Since the bleeding will not stop quickly, the hematoma will continue to expand, causing damage and rupture of blood vessels around the hematoma. In addition to hypertension, diabetes causes blood-brain barrier damage by promoting the formation of inflammatory mediators, free radical release and internal acidosis, and also greatly increases the risk of hematoma expansion (Bahadar GA, Shah ZA. Intracerebral Hemorrhage and Diabetes Mellitus: Blood-Brain Barrier Disruption, Pathophysiology and Cognitive Impairments. CNS Neurol Disord Drug Targets. 2021; 20 (4): 312-326.).
[0004] At present, various classifiers based on machine learning have become important tools for diagnosing diseases, identifying potential risk factors for the occurrence of diseases, and predicting the risk of disease occurrence. In existing technologies, most of them use a single classifier to predict the risk of diseases. In conventional disease risk prediction, relevant information such as the patient's personal history, medical history, and behavioral habits are usually superimposed to obtain accurate disease risk prediction results, which also brings about the problem of large volume and high dimension of detection data. When a single classifier processes such a high-dimensional data set, it is difficult to extract effective feature variables, which leads to its low accuracy and poor generalization ability in disease risk prediction, which is also the biggest problem of existing technologies in disease risk prediction. At the same time, existing technologies often only consider the impact of a single factor or a few factors on the occurrence of disease risk, ignoring other possible factors. Hematoma expansion is a complex process, and its occurrence factors involve multiple aspects. If only a few factors are focused on, it is impossible to fully assess the risk of hematoma expansion in patients.
[0005] Since the method combining feature selection with integrated classifier is a new method for studying the risk prediction of hematoma expansion in patients after hemorrhagic stroke, the risk prediction method of hematoma expansion based on the XRLD integrated classifier composed of XGBoost, random forest, LightGBM and decision tree classifiers with optimal hyperparameters has not been studied. Summary of the invention
[0006] The purpose of the present invention is to provide a method for predicting the risk of hematoma expansion based on an XRLD ensemble classifier. The present invention combines XGBoost, random forest, LightGBM and decision tree classifiers with optimal hyperparameters to construct an XRLD ensemble classifier, and applies VIF and VP to propose a new diagnostic method that not only considers the feature importance score but also eliminates the feature with the lowest feature importance score ranking. At the same time, the patient's personal history, medical history and onset-related factors on the risk of hematoma expansion in patients after hemorrhagic stroke are considered, thereby effectively improving the prediction accuracy of the risk of hematoma expansion.
[0007] The inventive concept of the present invention is: the present invention proposes a hematoma expansion risk prediction method based on XRLD ensemble classifier, which is used for the potential diagnosis of the risk of hematoma expansion in patients after hemorrhagic stroke. At the same time, the present invention also takes into account the impact of the patient's personal history, medical history and disease-related factors on the risk of hematoma expansion after hemorrhagic stroke, effectively improving the prediction accuracy of hematoma expansion risk.
[0008] In order to achieve the above-mentioned purpose of the invention, the technical solution adopted by the present invention is: a method for predicting the risk of hematoma expansion based on XRLD ensemble classifier, comprising the following steps:
[0009] S1: preprocess the original data set and determine whether the first X patients have hematoma expansion events;
[0010] S2: Hypothesis testing and correlation analysis of risk characteristic variables for hematoma expansion;
[0011] S3: Build an XRLD ensemble classifier based on XGBoost, random forest, LightGBM and decision tree classifiers;
[0012] S4: Use VIF and VP to screen characteristic variables and combine them with XRLD integrated classifier to diagnose the risk of hematoma expansion.
[0013] Step S1 includes the following steps:
[0014] S11: Based on the original data set M0, extract sample data and fill in missing values;
[0015] Among them: The data contained in the original data set M0 is the time interval Δt from the onset of the patient to the first imaging examination f , the hematoma volume V of each imaging examination of the patient i and the time points t of the patient's first examination and all subsequent examinations i ;
[0016] S12: Calculate the time interval Δt from the time of the i-th imaging examination to the onset of the disease i The time interval between the jth and ith imaging examinations ΔTij ,Right now:
[0017] Δt i =t i -t0+Δt f (1)
[0018] ΔT ij =Δt j -Δt i (2)
[0019] Where: Δt f represents the time interval from the onset of the disease to the first examination in hospital, t i ,t j Respectively represent the time points of the i-th and j-th imaging examinations, and i, j = 0, 1, ..., 8. The 0th imaging examination represents the time point of the patient's first examination upon admission, and i = 0, 1, ..., 8 represents the i-th imaging examination;
[0020] S13: Calculate the absolute volume increment ΔV of the hematoma between the jth and ith imaging examinations according to the hematoma volume of each imaging examination. ij Relative volume increment RV ij ,Right now:
[0021] ΔV ij =V j -V i (3)
[0022]
[0023] Among them: V i and V j represent the hematoma volumes of the i-th and j-th imaging examinations, respectively;
[0024] S14: Assuming that the hematoma expands at a uniform speed, calculate the hematoma expansion speed v between the i+1th and ith imaging examinations i,i+1 ,Right now:
[0025]
[0026] Where: V i+1 represents the hematoma volume of the i+1th imaging examination, ΔT i,i+1 represents the time interval between the i+1th and ith imaging examinations;
[0027] S15: According to ΔV in step S13 ij The calculation formula to determine ΔV 0i Is it greater than or equal to 6 ml? If ΔV 0i <6, then according to RV in step S13 ij The calculation formula further determines RV0i Is it greater than or equal to 33%? If RV 0i <33%, the patient is considered to have no hematoma expansion event;
[0028] Where: ΔV 0i represents the absolute volume increment of hematoma between the i-th and the first imaging examination; RV 0i represents the relative volume increment of hematoma between the ith and first imaging examinations;
[0029] S16: If ΔV is satisfied 0i <6 and RV 0i ≥33% or meet ΔV 0i ≥6, indicating that the patient has or may have hematoma expansion, and it is necessary to adjust the Δt in step S12. i The calculation formula further determines Δt i Is it less than or equal to 48 hours?
[0030] S17: For patients who will or may have hematoma expansion, calculate the time t between the i-th imaging examination and the absolute volume increase of hematoma at the onset of the disease to reach 6 ml. a The time t when the relative volume increase reaches 33% b ,Right now:
[0031]
[0032]
[0033] Where: ΔV 0,i-1 represents the absolute volume increment of hematoma between the i-1th imaging examination and the first imaging examination, v i-1,i represents the hematoma expansion rate between the i-th and i-1-th imaging examinations, Δt i-1 represents the time interval between the i-1th imaging examination and the onset of the disease, RV 0,i-1 represents the relative volume increment of hematoma between the i-1th imaging examination and the first imaging examination, and V0 represents the hematoma volume of the first imaging examination;
[0034] S18: If Δt i ≤48, it means that the patient must have hematoma expansion, and the time for hematoma expansion is min{t a ,t b};
[0035] S19: If Δt i >48, it means that the patient may have hematoma expansion. Combined with the calculation formulas in step S14 and step S17, calculate t at this time a ,t b , judge t a ,t bIs the smaller value of less than or equal to 48 hours, that is:
[0036] min{t a ,t b}≤48 (8)
[0037] Where: t a ,t b They represent the time between the ith imaging examination and the onset of the hematoma when the absolute volume increase reaches 6 ml and the time when the relative volume increase reaches 33%;
[0038] S110: When min{t a ,t b}≤48, it means that the patient has hematoma expansion, and the time of hematoma expansion is min{t a ,t b}; When min{t a ,t b When the blood pressure is >48, it indicates that the patient has no hematoma expansion.
[0039] Step S2 includes the following steps:
[0040] S21: Based on the data in the original data set N0, extract x0 feature variables;
[0041] Where: x0 represents the volume, location, shape and grayscale feature variables of the patient's personal history, disease history, treatment-related, and imaging information hematoma and edema extracted from the original data set N0;
[0042] S22: Use label encoding to process the “gender” feature item;
[0043] S23: Chi-square test and U test were used to perform hypothesis tests on categorical variables and continuous variables respectively, and characteristic variables with P values greater than or equal to 0.05 were eliminated, leaving x1 characteristic variables, x1 <x0;
[0044] Among them, the P value represents the probability of the sample observation result or more extreme results when the null hypothesis is true, and x1 represents the number of characteristic variables remaining after eliminating those with a P value greater than or equal to 0.05;
[0045] S24: Use the Spearman correlation coefficient to perform correlation analysis on x1 characteristic variables and screen the characteristic variables with strong correlation with hematoma volume changes;
[0046] S25: Obtain J characteristic variables with statistical significance for the diagnosis of hematoma expansion risk in the preprocessed data set, J=x1.
[0047] Where: J represents the number of characteristic variables with statistical significance for the diagnosis of hematoma expansion risk in the preprocessed data set.
[0048] Step S3 includes the following steps:
[0049] S31: Build machine learning XGBoost classifiers, random forest classifiers, LightGBM classifiers, and decision tree classifiers;
[0050] S32: Calculate the importance scores of J feature variables respectively, and take the average of the four importance scores as the first round importance score Importance1, that is:
[0051]
[0052] Where: S c represents the feature importance score calculated by classifier c;
[0053] S33: Sort the first-round importance scores of the feature variables from high to low, retain the top 50% of the K feature variables in the first-round importance score ranking, and remove the remaining feature variables. <J;
[0054] Where: K represents the number of feature variables that retain the top 50% of the first round of importance score ranking;
[0055] S34: Based on the relevant data of the K feature variables, the optimal hyperparameters of the four classifiers, namely, XGBoost, random forest, LightGBM and decision tree, are obtained by using a random search algorithm and five-fold cross validation;
[0056] S35: Based on the AUC values of the XGBoost, random forest, LightGBM and decision tree classifiers with optimal hyperparameters, the weights of each classifier are calculated, namely:
[0057]
[0058] Where: AUC c represents the true positive rate of hematoma expansion of patients under classifier c, c = 1, 2, 3, 4, c = 1 represents XGBoost classifier, c = 2 represents random forest classifier, c = 3 represents LightGBM classifier, c = 4 represents decision tree classifier;
[0059] S36: Based on the weight of each classifier, the four classifiers of XGBoost, random forest, LightGBM and decision tree with optimal hyperparameters are integrated to construct an XRLD integrated classifier.
[0060] Step S4 includes the following steps:
[0061] S41: Based on the retained K characteristic variables, determine whether the VIF values of these characteristic variables are all less than 10;
[0062] S42: If it is not less than 10, then calculate the number n of feature variables with VP>0.8 in the same dimension, then there is multicollinearity between the n feature variables;
[0063] Where: n represents the number of feature variables with VP>0.8 in the same dimension, n≥2;
[0064] S43: Sort the n feature variables by importance score and remove the feature with the lowest score;
[0065] S44: Calculate the VIF of all features at this time. If the VIF value is not less than 10, repeat the operations of step S42 and step S43; if the VIF value of each feature is less than 10, go to step S45;
[0066] S45: Calculate the accuracy of the training set and determine whether the accuracy of the training set begins to decrease. If the accuracy of the training set does not decrease, return to step S43; if the accuracy of the training set begins to decrease, go to step S46;
[0067] S46: Use the XRLD ensemble classifier to calculate the second round importance score Importance2 of the final L feature variables, that is:
[0068]
[0069] Where: L represents the number of feature variables of the final feature data set obtained by screening, w c represents the weight of classifier c, and the specific calculation formula is shown in step S35;
[0070] S47: Sort the second round of feature importance scores of L feature variables from high to low, L <K;
[0071] S48: Based on the weights of each classifier and the importance scores of the above-screened features, the weighted average predicted probability of hematoma expansion of the patient is obtained, that is:
[0072]
[0073] Where: P m is the weighted average predicted probability under state m, p cm is the predicted probability of state m under classifier c, m = 1 indicates that hematoma expansion occurs, and m = 0 indicates that hematoma expansion does not occur;
[0074] S49: Based on the weighted average predicted probability, the weighted average predicted probabilities of hematoma expansion and no hematoma expansion are sorted to obtain the sequence number with the highest weighted average predicted probability, that is:
[0075]
[0076] Wherein: k represents the sequence number with the highest weighted average predicted probability, if k=1, it means that the patient has hematoma expansion, if k=0, it means that the patient has not had hematoma expansion.
[0077] Compared with the prior art, the present invention has the following beneficial effects:
[0078] 1. The present invention combines XGBoost classifier, random forest classifier, LightGBM classifier and decision tree classifier to construct an XRLD integrated classifier. Compared with using a single classifier, the XRLD integrated classifier can integrate the results of multiple classifiers, effectively improving the accuracy and stability of hematoma expansion risk prediction.
[0079] 2. The present invention uses VIF and VP to determine the optimal characteristic variables that affect the risk of hematoma expansion, effectively reduces the redundant information in the XRLD classifier, and greatly improves the predictive ability of the risk of hematoma expansion.
[0080] 3. The present invention not only considers the impact of the patient's personal history, medical history, and disease-related factors on the risk of hematoma expansion, but also incorporates these factors into the prediction model for analysis, which can more comprehensively assess the patient's risk of hematoma expansion.
[0081] 4. The present invention improves the prediction accuracy of the risk of hematoma expansion after hemorrhagic stroke in patients, which has important guiding significance for the treatment and intervention decisions of patients. Appropriate measures can be taken in advance to reduce the risk of hematoma expansion in patients.
[0082] 5. The present invention proposes a new diagnostic method that not only considers the feature importance score but also eliminates the feature with the lowest feature importance score ranking. It also considers the impact of the patient's personal history, medical history and onset-related factors on the risk of hematoma expansion in patients after hemorrhagic stroke, thereby effectively improving the prediction accuracy of the risk of hematoma expansion. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0084] Figure 1 The figure is a schematic diagram of the overall process of a method for predicting the risk of hematoma expansion based on an XRLD ensemble classifier according to the present invention.
[0085] Figure 2 This is a schematic diagram of the specific steps of step S1 in the present invention;
[0086] Figure 3 This is a schematic diagram of the specific steps of step S2 in the present invention;
[0087] Figure 4 This is a schematic diagram of the specific steps of step S3 in the present invention;
[0088] Figure 5 This is a schematic diagram of the specific steps of step S4 in the present invention;
[0089] Figure 6 This is a schematic diagram for comparing the top 16 feature variables with high importance scores in the first round of the present invention;
[0090] Figure 7 This is a schematic diagram for comparing the top 16 feature variables with high importance scores in the second round of the present invention;
[0091] Figure 8 : This is the ROC curve diagram of the XRLD ensemble classifier in Example 1 of the present invention. DETAILED DESCRIPTION
[0092] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. Of course, the specific embodiments described here are only used to explain the present invention and are not used to limit the present invention.
[0093] Example 1
[0094] See also Figure 1 The present embodiment provides a method for predicting the risk of hematoma expansion based on an XRLD ensemble classifier, comprising the following steps:
[0095] Step S1: preprocess the original data set and determine whether the first 100 patients have hematoma expansion events. Figure 2 , the step S1 comprises:
[0096] S11: Based on the original data set M0, extract sample data and fill in missing values.
[0097] Among them: The data contained in the original data set M0 is the time interval Δt from the onset of the patient to the first imaging examination f , the hematoma volume V of each imaging examination of the patient i and the time points t of the patient's first examination and all subsequent examinations i ;
[0098] Specifically, in this embodiment, the variable names involved in extracting sample data from the original data set are shown in Table 1, and the missing values of each patient's follow-up data are filled with the value "0".
[0099] S12: Calculate the time interval Δt from the time of the i-th imaging examination to the onset of the disease i The time interval between the jth and ith imaging examinations ΔTij ,Right now:
[0100] Δt i =t i -t0+Δt f (1)
[0101] ΔT ij =Δt j -Δt i (2)
[0102] Where: Δt f represents the time interval from the onset of the disease to the first examination in hospital, t i ,t j They represent the time points of the i-th and j-th imaging examinations, respectively, and i, j = 0, 1, ..., 8. The 0th imaging examination represents the time point of the patient's first examination upon admission to the hospital, and i = 0, 1, ..., 8 represent the i-th imaging examinations, respectively.
[0103] Specifically, the time interval from the patient's i-th imaging examination to the onset of the disease and the time interval between the j-th and i-th imaging examinations are calculated.
[0104] S13: Calculate the absolute volume increment ΔV of the hematoma between the jth and ith imaging examinations according to the hematoma volume of each imaging examination. ij Relative volume increment RV ij ,Right now:
[0105] ΔV ij =V j -V i (3)
[0106]
[0107] Among them: V i and V j Represent the hematoma volumes of the i-th and j-th imaging examinations, respectively.
[0108] Specifically, the hematoma volume change of the patient's imaging examination is calculated based on the hematoma volume of each imaging examination, including the absolute hematoma volume increment and the relative hematoma volume increment of the j-th and i-th imaging examinations.
[0109] S14: Assuming that the hematoma expands at a uniform speed, calculate the hematoma expansion speed v of the i+1th and ith imaging examinations i,i+1 ,Right now:
[0110]
[0111] Where: V i+1 represents the hematoma volume of the i+1th imaging examination, ΔT i,i+1Represents the time interval between the i+1th and ith imaging examinations.
[0112] Specifically, based on the assumption that the hematoma expands at a uniform rate, the hematoma expansion rates of the patient's i+1th and ith imaging examinations are calculated.
[0113] S15: According to ΔV in step S13 ij The calculation formula to determine ΔV 0i Is it greater than or equal to 6 ml? If ΔV 0i <6, then according to RV in step S13 ij The calculation formula further determines RV 0i Is it greater than or equal to 33%? If RV 0i If the hematoma expansion rate is less than 33%, the patient is considered to have no hematoma expansion event.
[0114] Where: ΔV 0i represents the absolute volume increment of hematoma between the i-th and the first imaging examination; RV 0i Represents the relative volume increase of hematoma between the ith and first imaging examinations.
[0115] Specifically, it is determined whether the absolute volume of the hematoma in the subsequent i-th examination of the patient is greater than or equal to 6 ml compared with the first examination. If the hematoma volume increase is less than 6 ml, it is necessary to further determine whether the relative volume increase of the hematoma is greater than or equal to 33%. If the relative volume increase of the hematoma is still less than 33%, it is considered that the patient has no hematoma expansion.
[0116] S16: If ΔV is satisfied 0i <6 and RV 0i ≥33% or meet ΔV 0i ≥6, indicating that the patient has or may have hematoma expansion, and it is necessary to adjust the Δt in step S12. i The calculation formula further determines Δt i Is it less than or equal to 48 hours?
[0117] Specifically, if the absolute volume increase of the patient's hematoma is less than 6 ml, the relative volume increase is greater than or equal to 33%, or the absolute volume increase of the patient's hematoma is greater than or equal to 6 ml, it means that the patient must have or may have hematoma expansion. At this time, it is necessary to determine whether the time interval from the i-th imaging examination to the onset is less than or equal to 48 hours.
[0118] S17: For patients who will or may have hematoma expansion, calculate the time t between the i-th imaging examination and the absolute volume increase of hematoma at the onset of the disease to reach 6 ml. a The time t when the relative volume increase reaches 33% b ,Right now:
[0119]
[0120]
[0121] Where: ΔV 0,i-1 represents the absolute volume increment of hematoma between the i-1th imaging examination and the first imaging examination, v i-1,i represents the hematoma expansion rate between the i-th and i-1-th imaging examinations, Δt i-1 represents the time interval between the i-1th imaging examination and the onset of the disease, RV 0,i-1 V0 represents the relative volume increment of hematoma between the i-1th imaging examination and the first imaging examination, and V0 represents the hematoma volume of the first imaging examination.
[0122] Specifically, for patients who will or may have hematoma expansion, it is necessary to calculate the time when the absolute volume increase of the hematoma reaches 6 ml and the time when the relative volume increase reaches 33% between the i-th imaging examination and the onset of the disease.
[0123] S18: If Δt i ≤48, it means that the patient must have hematoma expansion, and the time for hematoma expansion is min{t a ,t b}.
[0124] Specifically, if the time interval between the patient's i-th imaging examination and the onset of the disease is less than or equal to 48 hours, it means that the patient must have hematoma expansion. At this time, the time when the hematoma expansion occurs is the smaller time when the absolute volume increase of the patient's hematoma reaches 6 ml and the relative volume increase reaches 33%.
[0125] S19: If Δt i >48, it means that the patient may have hematoma expansion. Combined with the calculation formulas in step S14 and step S17, calculate t at this time a ,t b , judge t a ,t b Is the smaller value of less than or equal to 48 hours, that is:
[0126] min{t a ,t b}≤48 (8)
[0127] Where: t a ,t b They represent the time from the i-th imaging examination to the onset of the hematoma when the absolute volume increase reaches 6 ml and the time from the onset of the hematoma when the relative volume increase reaches 33%.
[0128] Specifically, if the time interval between the patient's i-th imaging examination and the onset of the disease is greater than 48 hours, it means that the patient may have hematoma expansion. At this time, it is necessary to use the hematoma expansion rate to calculate the time when the absolute volume increase of the patient's hematoma reaches 6 ml and the time when the relative volume increase reaches 33% between the i-th imaging examination and the onset of the disease, and determine whether the smaller time of the patient's hematoma absolute volume increase reaching 6 ml and the relative volume increase reaching 33% is less than or equal to 48 hours.
[0129] S110: When min{t a ,t b}≤48, it means that the patient has hematoma expansion, and the time of hematoma expansion is min{t a ,t b}; When min{t a ,t b When the blood pressure is >48, it indicates that the patient has no hematoma expansion.
[0130] Specifically, when the smaller time of the patient's hematoma absolute volume increase reaching 6 ml and the relative volume increase reaching 33% is less than or equal to 48 hours, it means that the patient has undergone hematoma expansion, and the time of hematoma expansion is the smaller of the two times; when the smaller time of the patient's hematoma absolute volume increase reaching 6 ml and the relative volume increase reaching 33% is greater than 48 hours, it means that the patient has not undergone hematoma expansion.
[0131] Step S2: Conduct hypothesis testing and correlation analysis on the risk characteristic variables of hematoma expansion. Figure 3 , the step S2 comprises:
[0132] S21: Based on the data in the original data set N0, extract x0 feature variables.
[0133] Where: x0 represents the volume, location, shape and grayscale feature variables of the patient's personal history, disease history, treatment-related, and imaging information hematoma and edema extracted from the original data set N0.
[0134] Specifically, in this embodiment, the variable names involved in extracting sample data from the original data set are shown in Table 2, and 104 original feature variables are extracted from the original data set.
[0135] S22: Use label encoding to process the “gender” feature item.
[0136] Specifically, males are marked with a value of "1" and females are marked with a value of "0".
[0137] S23: Chi-square test and U test were used to perform hypothesis tests on categorical variables and continuous variables respectively, and characteristic variables with P values greater than or equal to 0.05 were eliminated, leaving x1 characteristic variables, x1 <x0。
[0138] Among them, the P value represents the probability of the sample observation result or more extreme result when the null hypothesis is true, and x1 represents the number of characteristic variables remaining after eliminating those with a P value greater than or equal to 0.05.
[0139] Specifically, chi-square test and U test were used to conduct hypothesis tests on 16 categorical variables and 88 continuous variables, and 82 characteristic variables with P values less than 0.05 were screened.
[0140] S24: Use the Spearman correlation coefficient to perform correlation analysis on x1 characteristic variables and screen the characteristic variables with strong correlation with the change of hematoma volume.
[0141] Specifically, the Spearman correlation coefficient was used to perform correlation analysis on 82 characteristic variables to screen characteristic variables with strong correlation with hematoma volume changes.
[0142] S25: Obtain J characteristic variables with statistical significance for the diagnosis of hematoma expansion risk in the preprocessed data set, J=x1.
[0143] Where: J represents the number of characteristic variables with statistical significance for the diagnosis of hematoma expansion risk in the preprocessed data set.
[0144] Specifically, 82 characteristic variables with statistical significance for the diagnosis of hematoma expansion risk in the preprocessed data set were obtained.
[0145] Step S3: Based on XGBoost, random forest, LightGBM and decision tree classifiers, build an XRLD ensemble classifier. For details, see Figure 4 , the step S3 comprises:
[0146] S31: Build machine learning XGBoost classifiers, random forest classifiers, LightGBM classifiers, and decision tree classifiers.
[0147] Specifically, the XGBoost classifier, the random forest classifier, the LightGBM classifier and the decision tree classifier are constructed.
[0148] S32: Calculate the importance scores of J feature variables respectively, and take the average of the four importance scores as the first round importance score Importance1, that is:
[0149]
[0150] Where: S c represents the feature importance score calculated by classifier c.
[0151] Specifically, the first round importance scores of 82 feature variables are calculated.
[0152] S33: Sort the first-round importance scores of the feature variables from high to low, retain the top 50% of the K feature variables in the first-round importance score ranking, and remove the remaining feature variables. <J。
[0153] Where: K represents the number of feature variables that retain the top 50% of the first round of importance score ranking.
[0154] Specifically, the first round importance scores of 82 feature variables were ranked from high to low, the top 50% of the 41 feature variables were retained, and the remaining feature variables were eliminated.
[0155] S34: Based on the relevant data of the K feature variables, the optimal hyperparameters of the four classifiers, namely, XGBoost, random forest, LightGBM and decision tree, are obtained by using a random search algorithm and five-fold cross validation.
[0156] Specifically, based on the relevant data of 41 feature variables, a five-fold cross validation was performed on the XGBoost classifier, random forest classifier, LightGBM classifier and decision tree classifier, and the random search algorithm was used to find the optimal hyperparameters of the above four classifiers, and the XGBoost classifier, random forest classifier, LightGBM classifier and decision tree classifier with the best hyperparameters were obtained.
[0157] S35: Based on the AUC values of the XGBoost, random forest, LightGBM and decision tree classifiers with optimal hyperparameters, the weights of each classifier are calculated, namely:
[0158]
[0159] Where: AUC c represents the true positive rate of hematoma expansion of patients under classifier c, c = 1, 2, 3, 4, c = 1 represents XGBoost classifier, c = 2 represents random forest classifier, c = 3 represents LightGBM classifier, and c = 4 represents decision tree classifier.
[0160] Specifically, the weight of each classifier is calculated based on the AUC value of each classifier with the best hyperparameters.
[0161] S36: Based on the weight of each classifier, the four classifiers of XGBoost, random forest, LightGBM and decision tree with optimal hyperparameters are integrated to construct an XRLD integrated classifier.
[0162] Specifically, based on the weight of each classifier, the XGBoost classifier, random forest classifier, LightGBM classifier and decision tree classifier with the most hyperparameters are integrated to construct the XRLD classifier.
[0163] Step S4: Use VIF and VP to screen feature variables, and combine with XRLD integrated classifier to diagnose the risk of hematoma expansion. Figure 5 , the step S4 comprises:
[0164] S41: Based on the retained K feature variables, determine whether the VIF values of these feature variables are all less than 10.
[0165] Specifically, based on the 41 retained characteristic variables, it is determined whether the VIF values of the 41 characteristic variables are less than 10.
[0166] S42: If it is not less than 10, then calculate the number n of feature variables with VP>0.8 in the same dimension, then there is multicollinearity between the n feature variables.
[0167] Where: n represents the number of feature variables with VP>0.8 in the same dimension, n≥2.
[0168] Specifically, if the VIF value is not less than 10, the number of feature variables with a VP value greater than 0.8 in the same dimension is calculated, and there is multicollinearity between these feature variables.
[0169] S43: Sort the n feature variables by importance score and remove the feature with the lowest score.
[0170] Specifically, the feature variables with VP values greater than 0.8 in the same dimension are sorted from high to low according to the feature importance score, and the feature with the lowest score is eliminated.
[0171] S44: Calculate the VIF of all features at this time. If the VIF value is not less than 10, repeat steps S42 and S43. If the VIF value of each feature variable is less than 10, go to step S45.
[0172] Specifically, the feature variables with VIF values greater than or equal to 10 are directly removed from the feature set, and 25 feature variables are retained.
[0173] S45: Calculate the accuracy of the training set and determine whether the accuracy of the training set begins to decrease. If the accuracy of the training set does not decrease, return to step S43; if the accuracy of the training set begins to decrease, go to step S46.
[0174] Specifically, calculate the accuracy of the training set and determine whether the accuracy of the training set begins to decrease. Eliminate the feature variables that do not reduce the accuracy of the training set.
[0175] S46: Use the XRLD ensemble classifier to calculate the second round of importance scores Importance2 of the final L feature variables, namely:
[0176]
[0177] Where: L represents the number of feature variables of the final feature data set obtained by screening, w c Represents the weight of classifier c. The specific calculation formula is shown in step S35.
[0178] Specifically, based on the 24 optimal feature variables finally retained, the XRLD ensemble classifier is used to calculate the second round importance scores of these 24 feature variables.
[0179] S47: Sort the second round of feature importance scores of L feature variables from high to low, L <K。
[0180] Specifically, the second round feature importance scores of the 24 best feature variables are ranked from high to low.
[0181] S48: Based on the weights of each classifier and the importance scores of the above-screened features, the weighted average predicted probabilities of the patient having hematoma expansion and not having hematoma expansion are calculated, namely:
[0182]
[0183] Where: P m is the weighted average predicted probability under state m, p cm is the predicted probability of state m under classifier c, m=1 indicates that hematoma expansion occurs, and m=0 indicates that hematoma expansion does not occur.
[0184] Specifically, based on the calculated weights of each classifier, the weighted average predicted probability of the patient having hematoma expansion and not having hematoma expansion is calculated.
[0185] S49: Based on the weighted average predicted probability, the weighted average predicted probabilities of hematoma expansion and no hematoma expansion are sorted to obtain the sequence number with the highest weighted average predicted probability, that is:
[0186]
[0187] Wherein: k represents the sequence number with the highest weighted average predicted probability, if k=1, it means that the patient has hematoma expansion, if k=0, it means that the patient has not had hematoma expansion.
[0188] Specifically, the weighted average predicted probabilities of hematoma expansion and hematoma expansion not occurring are compared and sorted to obtain the sequence number with the highest weighted average predicted probability.
[0189] This embodiment combines XGBoost, random forest, LightGBM and decision tree classifiers with optimal hyperparameters to construct an XRLD ensemble classifier, and applies VIF and VP to determine feature variables with high correlation with hematoma expansion. Compared with the feature extraction method that only considers the importance score ranking of the machine learning algorithm, this patent considers the impact of the accuracy of the training set on feature screening, and proposes a new feature extraction method that considers feature importance scores and eliminates the features with the lowest feature importance score ranking, thereby obtaining a better important feature data set. At the same time, the patient's personal history, medical history and onset-related effects on the risk of hematoma expansion in patients after hemorrhagic stroke are considered, thereby effectively improving the prediction accuracy of hematoma expansion risk.
[0190] In order to verify the effect of this embodiment, MATLAB is used to perform numerical simulation verification.
[0191] In this embodiment, the variable names involved in extracting sample data from the original data set M0 are shown in Table 1:
[0192] Table 1 shows the variable names involved in the original data set M0.
[0193] serial number Variable Name serial number Variable Name 1 The serial number of the first imaging examination upon admission 3 Serial number and corresponding hematoma volume at each follow-up time point 2 Time interval from onset to first imaging examination 4 Initial imaging examination and all follow-up time points
[0194] In this embodiment, the variable names involved in extracting sample data from the original data set N0 are shown in Table 2:
[0195] Table 2 shows the variable names involved in the original data set N0.
[0196]
[0197]
[0198]
[0199] In this embodiment, the optimal hyperparameter values for finding the XGBoost classifier are shown in Table 3:
[0200] Table 3 shows the optimal hyperparameters of XGBoost classifier.
[0201] Hyperparameter Name Hyperparameter Values Hyperparameter Name Hyperparameter Values colsample_bytree 0.6247 eta 0.2 gamma 0.04 lambda 50 max_depth 1 min_child_weight 0.01 nthread 1 subsample 0.2465
[0202] In this embodiment, the optimal hyperparameter values for finding the random forest classifier are shown in Table 4:
[0203] Table 4 shows the optimal hyperparameters of the random forest classifier.
[0204] Hyperparameter Name Hyperparameter Values Hyperparameter Name Hyperparameter Values max_depth 6 min_samples_split 29 min_weight_fraction_leaf 0.2 n_estimators 80
[0205] In this embodiment, the optimal hyperparameter values for finding the LightGBM classifier are shown in Table 5: Table 5 shows the optimal hyperparameters for the LightGBM classifier.
[0206] Hyperparameter Name Hyperparameter Values Hyperparameter Name Hyperparameter Values colsample_bytree 0.6247 learning_rate 0.2 max_depth 4 min_child_samples 120 min_child_weight 100 n_estimators 2000 num_laeves 24 reg_alpha 10 reg_lambda 1 subsample 0.5674
[0207] In this embodiment, the optimal hyperparameter values for finding the decision tree classifier are shown in Table 6:
[0208] Table 6 shows the optimal hyperparameters of the decision tree classifier.
[0209] Hyperparameter Name Hyperparameter Values Hyperparameter Name Hyperparameter Values max_depth 6 min_samples_split 29 min_weight_fraction_leaf 0.2 n_estimators 80
[0210] The symbols and their descriptions involved in this embodiment are shown in Table 7:
[0211] Table 7 shows the symbols and their explanations.
[0212]
[0213]
[0214] Figure 6 These are the top 16 feature variables with high importance scores in the first round of this embodiment. These 16 feature variables are ranked in order of importance scores: hematoma sphericity, hematoma flatness, hematoma voxel volume, hematoma elongation, hematoma grayscale mean absolute deviation, edema grayscale minimum, hematoma grayscale extreme, edema grayscale kurtosis, edema voxel volume, edema grayscale maximum, edema grayscale variance, edema grayscale skewness coefficient, edema surface area to volume ratio, edema grayscale robust mean absolute deviation, edema grayscale entropy, and hematoma grayscale median.
[0215] Figure 7 These are the top 16 feature variables with high importance scores in the second round of this embodiment. These 16 feature variables are ranked in order of importance scores: hematoma elongation, edema grayscale kurtosis, edema grayscale minimum value, edema grayscale variance, hematoma maximum 2D diameter (row), hematoma grayscale entropy, edema maximum 2D diameter (column), hematoma maximum 2D diameter (slice), hematoma sphericity, edema volume, edema grayscale skewness coefficient, hematoma grayscale minimum value, hematoma grayscale robust mean deviation, edema grayscale entropy, age, and hematoma grayscale kurtosis.
[0216] Figure 8 : This is the ROC curve of the XRLD ensemble classifier constructed based on XGBoost, random forest, LightGBM and decision tree classifiers in this embodiment. The AUC value of the XRLD ensemble classifier is 0.867. It can be seen that the XRLD ensemble classifier proposed in this embodiment has an important contribution to the potential diagnosis of the risk of hematoma expansion.
[0217] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for predicting the risk of hematoma expansion based on an XRLD ensemble classifier, characterized in that: The following steps are involved: S1: preprocess the original data set and determine whether the first X patients have hematoma expansion events; S2: Hypothesis testing and correlation analysis of risk characteristic variables for hematoma expansion; S3: Build an XRLD ensemble classifier based on XGBoost, random forest, LightGBM and decision tree classifiers; S4: Use VIF and VP to screen characteristic variables and combine them with XRLD integrated classifier to diagnose the risk of hematoma expansion.
2. The method for predicting the risk of hematoma expansion based on an XRLD ensemble classifier according to claim 1, characterized in that: The step S1 comprises the following steps: S11: Based on the original data set M0, extract sample data and fill in missing values; Among them: the data contained in the original data set M0 are the time interval between the onset of the patient and the first imaging examination, the hematoma volume of each imaging examination of the patient, and the time points of the patient's first examination and all subsequent examinations; S12: Calculate the time interval from the i-th imaging examination to the onset of the disease and the time interval between the j-th and i-th imaging examinations; Where: i, j = 0, 1, ..., 8, the 0th imaging examination represents the time point of the patient's first examination upon admission; S13: according to the hematoma volume of each imaging examination, the absolute volume increment and relative volume increment of the hematoma between the j-th and i-th imaging examinations are calculated; S14: Assuming that the hematoma expands at a uniform speed, calculate the hematoma expansion speed of the i+1th and ith imaging examinations; S15: Determine whether the absolute volume increment of the hematoma between the i-th and the first imaging examination is greater than or equal to 1 ml. If it is less than 1 ml, further determine whether the relative volume increment of the hematoma between the i-th and the first imaging examination is greater than or equal to y. If it is less than y, it is considered that the patient has not experienced a hematoma expansion event. S16: If the absolute volume increment of the hematoma between the i-th and the first imaging examination is less than 1 ml and the relative volume increment of the hematoma is greater than or equal to y, or the absolute volume increment of the hematoma between the i-th and the first imaging examination is greater than or equal to 1 ml, it means that the patient must have or will have hematoma expansion, and it is necessary to further determine whether the time interval from the i-th imaging examination to the onset is less than or equal to h hours; S17: For patients who will or will have hematoma expansion, calculate the time between the i-th imaging examination and the onset of the disease when the absolute volume increment of the hematoma reaches 1 ml and the time when the relative volume increment reaches y; S18: If the time interval between the i-th imaging examination and the onset of disease is less than or equal to h hours, it means that the patient must have had hematoma expansion. The time of hematoma expansion is the smaller value of the time between the i-th imaging examination and the onset of disease when the absolute volume increment of the hematoma reaches 1 ml and the time when the relative volume increment reaches y. S19: If the time interval between the i-th imaging examination and the onset of disease is greater than h hours, it means that the patient will have hematoma expansion. Combined with the hematoma expansion speed, calculate the time between the i-th imaging examination and the onset of disease when the absolute volume increment of the hematoma reaches 1 ml and the time when the relative volume increment reaches y, and determine whether the smaller value is less than or equal to h hours; S110: When the smaller value of the time between the i-th imaging examination and the onset of the disease, when the absolute volume increment of the hematoma reaches 1 ml and the relative volume increment reaches y, is less than or equal to h hours, it means that the patient has undergone hematoma expansion, and the time when the hematoma expansion occurred is the smaller value of the two time periods; when the smaller value of the two time periods is greater than h hours, it means that the patient has not undergone hematoma expansion.
3. The method for predicting the risk of hematoma expansion based on XRLD ensemble classifier according to claim 2, characterized in that: Step S2 includes the following steps: S21: Based on the data in the original data set N0, extract x0 feature variables; Where: x0 represents the volume, location, shape and grayscale feature variables of the patient's personal history, disease history, treatment-related, and imaging information hematoma and edema extracted from the original data set N0; S22: Use label encoding to process the "gender" feature item; S23: Use chi-square test and U test to perform hypothesis tests on categorical variables and continuous variables respectively, remove characteristic variables with P value greater than or equal to p, and the remaining x1 characteristic variables, x1 <x0; Among them, the P value represents the probability of the sample observation result or more extreme results when the null hypothesis is true, and x1 represents the number of characteristic variables remaining after eliminating those with a P value greater than or equal to p; S24: Use Spearman correlation coefficient to perform correlation analysis on x1 characteristic variables and screen characteristic variables with strong correlation with hematoma volume changes; S25: Obtain J characteristic variables with statistical significance for the diagnosis of hematoma expansion risk in the preprocessed data set, J = x1; Where: J represents the number of characteristic variables with statistical significance for the diagnosis of hematoma expansion risk in the preprocessed data set.
4. The method for predicting the risk of hematoma expansion based on XRLD ensemble classifier according to claim 3, characterized in that: The step S3 comprises the following steps: S31: Build machine learning XGBoost classifiers, random forest classifiers, LightGBM classifiers, and decision tree classifiers; S32: Calculate the importance scores of J feature variables respectively, and take the average of the four importance scores as the first round importance score Importance1, that is: Where: S c represents the feature importance score calculated by classifier c; S33: Sort the first round importance scores of the feature variables from high to low, retain the top k feature variables in the first round importance score ranking, and remove the remaining feature variables, K <J; Where: K represents the number of feature variables retained before z in the first round of importance score ranking; S34: Based on the relevant data of the K feature variables, the optimal hyperparameters of the four classifiers, XGBoost, random forest, LightGBM and decision tree, are obtained by using a random search algorithm and five-fold cross validation; S35: Based on the AUC values of the XGBoost, random forest, LightGBM and decision tree classifiers with optimal hyperparameters, the weights of each classifier are calculated, namely: Where: AUC c represents the true positive rate of hematoma expansion of patients under classifier c, c = 1, 2, 3, 4, c = 1 represents XGBoost classifier, c = 2 represents random forest classifier, c = 3 represents LightGBM classifier, c = 4 represents decision tree classifier; S36: Based on the weight of each classifier, the four classifiers of XGBoost, random forest, LightGBM and decision tree with optimal hyperparameters are integrated to construct an XRLD integrated classifier.
5. The method for predicting the risk of hematoma expansion based on XRLD ensemble classifier according to claim 4, characterized in that: The step S4 comprises the following steps: S41: Based on the retained K characteristic variables, determine whether the VIF values of these characteristic variables are all less than q; S42: If it is not less than q, then calculate the number n of feature variables with VP>r in the same dimension, then there is multicollinearity between the n feature variables; Where: n represents the number of characteristic variables with VP>r in the same dimension; S43: Sort the n feature variables by importance score and remove the x2 features with the lowest scores; S44: Calculate the VIF of all features at this time. If the VIF value is not less than q, repeat the operations of step S42 and step S43; if the VIF value of each feature is less than q, go to step S45; S45: Calculate the accuracy of the training set and determine whether the accuracy of the training set begins to decrease. If the accuracy of the training set does not decrease, return to step S43; if the accuracy of the training set begins to decrease, go to step S46 for operation; S46: Use the XRLD ensemble classifier to calculate the second round importance score Importance2 of the final L feature variables, that is: Where: L represents the number of feature variables of the final feature data set obtained by screening, w c represents the weight of classifier c, and the specific calculation formula is shown in step S35; S47: Sort the second round of feature importance scores of L feature variables from high to low, L <K; S48: Based on the weights of each classifier and the importance scores of the above-screened features, the weighted average predicted probability of hematoma expansion of the patient is obtained, that is: Where: P m is the weighted average predicted probability under state m, p cm is the predicted probability of state m under classifier c, m = 1 indicates that hematoma expansion occurs, and m = 0 indicates that hematoma expansion does not occur; S49: Based on the weighted average predicted probability, the weighted average predicted probabilities of hematoma expansion and no hematoma expansion are sorted to obtain the sequence number with the highest weighted average predicted probability, that is: Wherein: k represents the sequence number with the highest weighted average predicted probability, if k=1, it means that the patient has hematoma expansion, if k=0, it means that the patient has not had hematoma expansion.
