Method and system for evaluating the risk of gastrointestinal bleeding in patients with subarachnoid hemorrhage

CN123017470APending Publication Date: 2026-10-30BEIJING TIANTAN HOSPITAL AFFILIATED TO CAPITAL MEDICAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611089549.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-22
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0003]现有通用评分如Rockall或Glasgow-Blatchford评分主要面向普通上消化道出血患者,未能充分整合SAH特有的神经源性应激、意识障碍程度(如WFNS分级)、颅内压变化、血管痉挛风险及重症监护相关干预(如机械通气、肾替代治疗)等因素

Benefits of technology

[0014]本发明提供的一种蛛网膜下腔出血患者消化道出血风险评估方法,包括以下步骤:获取蛛网膜下腔出血患者的临床信息记录和消化道出血结局标签,并对临床信息记录进行变量解析,得到多维临床特征;对所述多维临床特征进行缺失值过滤与连续变量标准化处理,得到标准特征矩阵;对所述标准特征矩阵和所述消化道出血结局标签施加绝对值惩罚约束项进行回归拟合,生成系数收缩轨迹,并基于所述系数收缩轨迹进行交叉验证误差计算,得到最优惩罚参数;基于所述最优惩罚参数对所述标准特征矩阵进行非零系数特征提取,得到核心风险因子;将所述核心风险因子与所述最优惩罚参数对应的非零回归系数进行加权求和计算,再加上截距项,得到线性预测值,并对所述线性预测值进行对数几率逆变换计算,得到出血风险概率,解决了如何基于蛛网膜下腔出血患者的临床信息,客观量化地评估其发生消化道出血的风险的技术问题,实现了对高危患者早期识别、个体化风险分层及精准预防干预的临床决策支持,显著提升并发症预警能力与重症管理效率的技术效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123017470A_ABST
    Figure CN123017470A_ABST
Patent Text Reader

Abstract

The application relates to a subarachnoid hemorrhage patient digestive tract hemorrhage risk assessment method and system, relates to the technical field of risk assessment, and comprises the following steps: obtaining clinical information and a digestive tract hemorrhage outcome label of a subarachnoid hemorrhage patient, and analyzing the clinical information and the digestive tract hemorrhage outcome label into multi-dimensional clinical characteristics; after filtering missing values and standardizing continuous variables, a standard characteristic matrix is constructed; an absolute value penalty term is introduced to perform regression fitting, a coefficient shrinkage track is generated, and an optimal penalty parameter is determined through cross validation; accordingly, core risk factors corresponding to non-zero coefficients are extracted; the core factors and regression coefficients are weighted and summed, and an intercept term is added, so that linear prediction values are obtained; after logarithmic probability inverse transformation calculation, the risk probability of individual digestive tract hemorrhage is obtained, and the technical problem of how to objectively and quantitatively evaluate the risk of digestive tract hemorrhage of a subarachnoid hemorrhage patient based on clinical information of the subarachnoid hemorrhage patient is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of risk assessment technology, and in particular to a method and system for assessing the risk of gastrointestinal bleeding in patients with subarachnoid hemorrhage. Background Technology

[0002] In patients with subarachnoid hemorrhage (SAH), gastrointestinal bleeding caused by stress ulcers is a common and serious complication, significantly increasing mortality and hospital stay. While clinical practice recognizes multiple risk factors in severe SAH patients, including high stress levels, sympathetic nerve excitation, insufficient gastric mucosal perfusion, and coagulation disorders, there is still a lack of objective and quantitative assessment systems specifically tailored to the gastrointestinal bleeding risk in this population.

[0003] Existing general scoring systems such as the Rockall or Glasgow-Blatchford scores primarily target patients with common upper gastrointestinal bleeding, failing to adequately integrate factors specific to subacute acute gastrointestinal (SAH) such as neurogenic stress, degree of altered consciousness (e.g., WFNS classification), intracranial pressure changes, risk of vasospasm, and intensive care interventions (e.g., mechanical ventilation, renal replacement therapy). In recent years, with the development of multimodal data fusion and machine learning technologies, it has become possible to construct specific predictive models based on electronic medical records, laboratory indicators (e.g., platelet count, prothrombin time), dynamic changes in vital signs, and disease severity scores (e.g., SOFA, SAPS II), providing a new pathway for early identification and precise prevention of gastrointestinal bleeding risk in SAH patients. Summary of the Invention

[0004] The purpose of this invention is to at least partially solve one of the technical problems existing in the prior art.

[0005] To achieve the above objectives, the present invention provides a method for assessing the risk of gastrointestinal bleeding in patients with subarachnoid hemorrhage, comprising: We obtained clinical information records and gastrointestinal bleeding outcome labels of patients with subarachnoid hemorrhage, and performed variable analysis on the clinical information records to obtain multidimensional clinical characteristics. The multidimensional clinical features were filtered for missing values ​​and standardized as continuous variables to obtain a standard feature matrix; An absolute value penalty constraint term is applied to the standard feature matrix and the gastrointestinal bleeding outcome label, and regression fitting is performed to generate a coefficient contraction trajectory. Based on the coefficient contraction trajectory, cross-validation error is calculated to obtain the optimal penalty parameter. Based on the optimal penalty parameter, non-zero coefficient features are extracted from the standard feature matrix to obtain the core risk factor. The core risk factor and the non-zero regression coefficient vector corresponding to the optimal penalty parameter are weighted and summed, and an intercept term is added to obtain a linear prediction value. The linear prediction value is then subjected to an inverse logarithmic probability transformation to obtain the bleeding risk probability.

[0006] Furthermore, the process of analyzing clinical information records to obtain multidimensional clinical features includes: The clinical information records are compared with medical lexicons to separate the medical record text fragments. The entity boundaries of the medical record text fragments are truncated to extract medical sign lexicons. The medical sign morphemes are mapped to a preset associated knowledge graph, and the knowledge graph node identifiers corresponding to the medical sign morphemes are extracted. The knowledge graph node identifiers are converted into discrete values ​​according to a preset node-value encoding mapping table to generate the multidimensional clinical features; wherein, the multidimensional clinical features include neurological deficit scale scores, coagulation function biochemical test values, stress inflammatory response index values ​​stored in continuous numerical form, and drug intervention feature quantities stored in discrete encoding form.

[0007] Furthermore, the step of applying an absolute value penalty constraint term to the standard feature matrix and the gastrointestinal bleeding outcome label and performing regression fitting to generate a coefficient contraction trajectory includes: Log-likelihood mapping is performed between the standard feature matrix and the gastrointestinal bleeding outcome label to construct a binary cross-entropy loss function, and a regression coefficient vector with the same length as the feature dimension of the standard feature matrix is ​​initialized. An absolute value penalty constraint term is applied to each component of the regression coefficient vector to generate a sparse penalty term; Arrange the gastrointestinal bleeding outcome labels according to the order of patient samples to construct a gastrointestinal bleeding outcome label vector; Calculate the absolute value of the inner product between each feature column vector in the standard feature matrix and the gastrointestinal bleeding outcome label vector, and take the maximum value among all the absolute values ​​of the inner product as the upper limit of the penalty parameter; The interval is discretized from the upper limit of the penalty parameter to zero according to the preset decay step size to generate a discrete penalty sequence; The discrete penalty sequence and the sparse penalty term are mapped to the binary cross-entropy loss function to construct a penalized optimization functional; The penalized optimization functional is subjected to coordinate descent optimization to extract sparse coefficient vectors, and the sparse coefficient vectors are concatenated according to the decay nodes of the discrete penalty sequence to generate the coefficient shrinkage trajectory.

[0008] Furthermore, the step of mapping the discrete penalty sequence and the sparse penalty term to the binary cross-entropy loss function to construct a penalized optimization functional includes: Extract the contraction adjustment scalar from the discrete penalty sequence, and inject the contraction adjustment scalar as a penalty intensity parameter into the sparse penalty term to generate a weighted penalty term sequence that corresponds one-to-one with the contraction adjustment scalar. Each weighted penalty term in the weighted penalty term sequence is substituted into the binary cross-entropy loss function, and then summed with the binary cross-entropy loss function to generate the penalized optimized functional indexed by the penalty intensity parameter.

[0009] Furthermore, the calculation of cross-validation error based on the coefficient contraction trajectory to obtain the optimal penalty parameter includes: The standard feature matrix is ​​resampled using multiple folds to separate the local training matrix and the independent verification matrix; For each fold of data, using the local training matrix as input, and according to the preset penalty parameter discrete sequence, the coordinate descent method is used to solve the binary cross-entropy loss function with absolute value penalty constraint term to obtain a set of local shrinkage coefficient vectors; wherein, the preset penalty parameter discrete sequence is the same as the penalty parameter discrete sequence used when generating the coefficient shrinkage trajectory; Based on the local shrinkage coefficient, a logarithmic loss measure is performed on the independent validation matrix to generate node validation error; The node verification error is calculated across folds to generate an expected error sequence, and a minimum search is performed on the expected error sequence to extract the node with the minimum error. Based on the minimum error node, the coefficient contraction trajectory is analyzed in reverse to extract the optimal penalty parameter.

[0010] Furthermore, the step of performing inverse analysis on the coefficient contraction trajectory based on the minimum error node to extract the optimal penalty parameter includes: The minimum error node is analyzed for location, the extreme value addressing coordinates are extracted, and the extreme value addressing coordinates are substituted into the coefficient shrinkage trajectory for tensor slicing to generate trajectory slice vector; The trajectory slice vector is decomposed dimensionally to separate the penalty scalar component, and the penalty scalar component is numerically decoded and mapped to extract the optimal penalty parameter.

[0011] Furthermore, the extraction of non-zero coefficient features from the standard feature matrix based on the optimal penalty parameter to obtain the core risk factor includes: The optimal penalty parameter is mapped to the coefficient contraction trajectory, and the target coefficient vector corresponding to the optimal penalty parameter is extracted. The absolute value of the target coefficient vector is calculated to obtain the coefficient absolute value vector, and the coordinates of the elements with values ​​greater than zero in the coefficient absolute value vector are extracted to generate a non-zero index sequence. Based on the non-zero index sequence, the standard feature matrix is ​​traversed by column dimensions to separate the target column vector set from the standard feature matrix; The target column vector set is concatenated column by column to generate the core risk factor.

[0012] Furthermore, the step of weighted summing of the non-zero regression coefficient vectors corresponding to the core risk factor and the optimal penalty parameter, adding the intercept term to obtain a linear predicted value, and then performing an inverse logarithmic probability transformation on the linear predicted value to obtain the bleeding risk probability includes: Substitute the optimal penalty parameter into the coefficient contraction trajectory for coordinate addressing, and extract the non-zero regression coefficient vector corresponding to the optimal penalty parameter; Extract the intercept scalar from the intercept term that is separately estimated and stored when the penalized optimized functional converges under the optimal penalty parameters; The core risk factors and the non-zero regression coefficient vector are summed element-wise to generate a clinical risk scalar. The clinical risk scalar and the intercept scalar are scalarly added together to generate a linear prediction value; Apply an exponential operation with the natural constant as the base to the linear predicted value to generate a positive risk index term, and divide the positive risk index term by the sum of the positive risk index term and the constant one to generate the bleeding risk probability.

[0013] This invention also provides a gastrointestinal bleeding risk assessment system for patients with subarachnoid hemorrhage, comprising: The analysis module is used to perform variable analysis on the clinical information records of patients with subarachnoid hemorrhage to obtain multidimensional clinical features. The standardization processing module is used to perform missing value filtering and continuous variable standardization on the multidimensional clinical features to obtain a standard feature matrix. The fitting module is used to apply an absolute value penalty constraint term to the standard feature matrix for regression fitting, obtain the coefficient shrinkage trajectory, and calculate the cross-validation error based on the coefficient shrinkage trajectory to obtain the optimal penalty parameter; The extraction module is used to extract non-zero coefficient features from the standard feature matrix based on the optimal penalty parameter to obtain the core risk factor; The calculation module is used to perform a weighted summation of the non-zero regression coefficient vectors corresponding to the core risk factor and the optimal penalty parameter, and add an intercept term to obtain a linear prediction value. The linear prediction value is then subjected to an inverse logarithmic probability transformation to obtain the bleeding risk probability.

[0014] This invention provides a method for assessing the risk of gastrointestinal bleeding in patients with subarachnoid hemorrhage, comprising the following steps: acquiring clinical information records and gastrointestinal bleeding outcome labels of patients with subarachnoid hemorrhage, and performing variable analysis on the clinical information records to obtain multidimensional clinical features; performing missing value filtering and continuous variable standardization on the multidimensional clinical features to obtain a standard feature matrix; applying an absolute value penalty constraint term to the standard feature matrix and the gastrointestinal bleeding outcome labels for regression fitting to generate a coefficient contraction trajectory, and calculating the cross-validation error based on the coefficient contraction trajectory to obtain the optimal penalty parameter; and applying the optimal penalty parameter to... The standard feature matrix is ​​subjected to non-zero coefficient feature extraction to obtain the core risk factor. The core risk factor and the non-zero regression coefficients corresponding to the optimal penalty parameter are weighted and summed, and an intercept term is added to obtain the linear prediction value. The linear prediction value is then subjected to log-odds transformation to obtain the bleeding risk probability. This solves the technical problem of how to objectively and quantitatively assess the risk of gastrointestinal bleeding in patients with subarachnoid hemorrhage based on their clinical information. It enables clinical decision support for early identification, individualized risk stratification, and precise prevention and intervention of high-risk patients, and significantly improves the ability to predict complications and the efficiency of critical care management. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a schematic diagram of the steps in a method for assessing the risk of gastrointestinal bleeding in patients with subarachnoid hemorrhage according to an embodiment of the present invention; Figure 2 This is one embodiment of the present invention. Figure 1 A schematic diagram of step S1; Figure 3 This is a structural block diagram of a gastrointestinal bleeding risk assessment system for patients with subarachnoid hemorrhage according to an embodiment of the present invention; The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0017] The embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention. The step numbers in the following embodiments are set only for ease of explanation, and there is no limitation on the order between the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.

[0018] Subarachnoid hemorrhage (SAH) is one of the most common acute and critical illnesses in neurology, characterized by high mortality, high disability, and high economic toxicity. It can lead to multi-organ dysfunction and various dangerous complications, including central and non-central complications. In SAH patients, gastrointestinal bleeding caused by stress ulcers is a common and dangerous complication that is difficult to observe and identify clinically. Studies have shown that the incidence of gastrointestinal bleeding in aneurysmal SAH patients can be as high as 30%–50%, with a mortality rate of approximately 4.9% due to gastrointestinal bleeding. Gastrointestinal bleeding is also prevalent in other types of traumatic brain injury, such as cerebral infarction, cerebral hemorrhage, and severe traumatic encephalopathy. Once gastrointestinal bleeding occurs, it can lead to acute anemia, hypovolemic shock, and gastrointestinal dysfunction in the acute phase, and is prone to complications such as hypoalbuminemia and pulmonary infection in the later stages, significantly prolonging ICU stay and increasing the risk of death. Therefore, early identification and accurate warning of gastrointestinal bleeding risk in SAH patients are of paramount clinical significance. Existing general scoring systems such as the Rockall or Glasgow-Blatchford scores primarily target patients with common upper gastrointestinal bleeding and fail to fully integrate SAH-specific factors such as neurogenic stress, degree of consciousness impairment (e.g., WFNS classification), intracranial pressure changes, risk of vasospasm, and intensive care-related interventions (e.g., mechanical ventilation, renal replacement therapy). In recent years, with the development of multimodal data fusion and machine learning technologies, it has become possible to construct specific predictive models based on electronic medical records, laboratory indicators (e.g., platelet count, prothrombin time), dynamic changes in vital signs, and disease severity scores (e.g., SOFA, SAPSII), providing a new pathway for early identification and accurate prevention of gastrointestinal bleeding risk in SAH patients.

[0019] Currently, commonly used clinical tools for assessing the risk of gastrointestinal bleeding, such as the Rockall score and Glasgow-Blatchford score, are primarily geared towards patients with general upper gastrointestinal bleeding. These general scoring systems exhibit significant limitations in predicting the risk of gastrointestinal bleeding in critically ill patients—studies have shown that both perform poorly in predicting ICU admission and fail to adequately integrate pathophysiological factors specific to subarachnoid hemorrhage (SAH), such as neurogenic stress, degree of altered consciousness (WFNS classification), changes in intracranial pressure, risk of cerebral vasospasm, and intensive care-related interventions (e.g., mechanical ventilation, renal replacement therapy). Furthermore, a search of existing patent technologies reveals that currently published patents related to gastrointestinal bleeding risk assessment mostly focus on general predictions of hemorrhagic diseases, general gastrointestinal bleeding risk assessments based on neural networks, or specific scenarios such as post-cerebral hemorrhage surgery. There is a lack of objective, quantitative assessment systems specifically designed for the SAH population regarding the risk of gastrointestinal bleeding.

[0020] In recent years, with the development of multimodal data fusion and machine learning technologies, it has become possible to construct specific predictive models based on electronic medical records, laboratory indicators, dynamic changes in vital signs, and disease severity scores. However, existing technologies mostly employ black-box models (such as deep learning and neural networks), and their predictive results lack clinical interpretability, making them difficult for clinicians to directly adopt for individualized decision-making. This invention addresses these technological gaps and clinical pain points by proposing a method for assessing the risk of gastrointestinal bleeding in SAH patients that integrates Lasso sparse regression and logistic regression, achieving interpretable screening of core risk factors while ensuring predictive accuracy.

[0021] Please see Figure 1 An embodiment of the present invention provides a method for assessing the risk of gastrointestinal bleeding in patients with subarachnoid hemorrhage, comprising: Step S1: Obtain the clinical information records and gastrointestinal bleeding outcome labels of patients with subarachnoid hemorrhage, and perform variable analysis on the clinical information records to obtain multidimensional clinical features.

[0022] Specifically, the clinical information records and gastrointestinal bleeding outcome labels of patients with subarachnoid hemorrhage (SAH) are obtained, and variable analysis is performed on the clinical information records to obtain multidimensional clinical features. In practice, firstly, structured and unstructured data recorded within 72 hours of admission of SAH patients are extracted from the electronic medical record system, including vital signs, laboratory tests, medication history, and imaging reports. Then, based on a pre-defined medical variable dictionary, free text or coded items are mapped to uniformly defined clinical variables. For example, descriptions such as "hematemesis," "melena," or coffee-ground material from a gastric tube are grouped into gastrointestinal bleeding outcome labels (0 / 1), while age, white blood cell count, and APACHE II score are converted into numerical or multi-category variables, forming a multidimensional clinical feature matrix covering demographic, physiological indicators, and treatment intervention dimensions. In this embodiment, the above scheme effectively achieves the standardized conversion of raw medical records into structured high-dimensional features, providing reliable input for subsequent modeling.

[0023] Step S2: The multidimensional clinical features are filtered for missing values ​​and standardized as continuous variables to obtain a standard feature matrix.

[0024] Specifically, the multidimensional clinical features are filtered for missing values ​​and standardized as continuous variables to obtain a standard feature matrix. In practice, the missing value status of each clinical feature in all patient records is first checked. If the missing value ratio of a feature exceeds a set threshold (e.g., 30%), that feature is directly removed. For any remaining missing values ​​among the retained features, continuous variables are filled with the median of that variable in the training set, while categorical variables are marked with a separate "missing" category. Subsequently, standardization is performed on all continuous variables (such as white blood cell count, platelet level, blood glucose, etc.) to center their numerical distribution and eliminate the influence of dimensions, while categorical variables maintain their original encoding form. Finally, all processed features are integrated row by row according to patient to form a standardized feature matrix with a uniform structure, no missing values, and consistent scale. In this embodiment, the above scheme effectively reduces the interference caused by missing data and variable scale differences in model training, providing high-quality input for subsequent regression modeling.

[0025] Step S3: Apply an absolute value penalty constraint term to the standard feature matrix and the gastrointestinal bleeding outcome label, perform regression fitting to generate a coefficient contraction trajectory, and calculate the cross-validation error based on the coefficient contraction trajectory to obtain the optimal penalty parameter.

[0026] Specifically, the standard feature matrix and the corresponding gastrointestinal bleeding outcome labels are input into a Lasso regression model. An absolute value L1 penalty term is introduced into the loss function to constrain the regression coefficients. As the penalty intensity decreases, the coefficients corresponding to each feature gradually increase from zero, forming a coefficient contraction trajectory that varies with the penalty parameter. Based on this, a ten-fold cross-validation strategy is employed. In each fold, the model is fitted using a subset of training data, and the prediction error on the validation subset is calculated. Finally, the average cross-validation error under each penalty parameter is summarized, and the penalty parameter corresponding to the minimum error is selected as the optimal penalty parameter. For example, in a certain modeling iteration, the cross-validation error is lowest when the penalty parameter is 0.023; this value is then determined as the optimal penalty parameter. In this embodiment, the above scheme effectively balances model complexity and prediction performance, avoids overfitting, and provides a reliable basis for subsequent feature selection.

[0027] Step S4: Extract non-zero coefficient features from the standard feature matrix based on the optimal penalty parameter to obtain the core risk factor.

[0028] Specifically, after determining the optimal penalty parameters, they are substituted into the Lasso regression model to refit the standard feature matrix. At this point, some variables in the model's output regression coefficients are compressed to strictly zero, while the remaining variables retaining non-zero estimates correspond to the effective predictors in the original clinical features. By extracting the feature columns corresponding to these non-zero coefficients, a set of core risk factors significantly associated with gastrointestinal bleeding outcomes can be obtained. For example, in a certain analysis, variables such as duration of mechanical ventilation, blood urea nitrogen level at admission, and use of heparin anticoagulation are selected, while others such as gender and body temperature are excluded because their coefficients are zero. In this embodiment, the above scheme effectively achieves sparse screening of high-dimensional clinical features, significantly reducing model complexity while preserving discriminative power, and providing interpretable key indicators for clinical decision-making.

[0029] Step S5: The non-zero regression coefficients corresponding to the core risk factor and the optimal penalty parameter are weighted and summed, and an intercept term is added to obtain a linear prediction value. The linear prediction value is then subjected to an inverse logarithmic probability transformation to obtain the bleeding risk probability.

[0030] Specifically, the core risk factors are multiplied by their corresponding non-zero regression coefficients in the Lasso regression model, corresponding to the optimal penalty parameters. All product terms are summed, and then the intercept term obtained from the model fitting is added to obtain a linear predicted value for each patient. This linear predicted value is then subjected to an inverse logistic transformation (i.e., a logistic function) to map it to the interval between 0 and 1, ultimately outputting the individual's probability of gastrointestinal bleeding. For example, if a patient's core risk factors include a blood urea nitrogen level of 28 mg / dL (coefficient 0.42) and the use of heparin (coefficient 0.65), with an intercept of -3.1, the linear predicted value is -3.1 + 0.42 × 28 + 0.65 × 1 = 9.31. After logistic transformation, the bleeding risk probability is approximately 0.999. In this embodiment, the above scheme transforms sparse regression results into clinically meaningful probability indicators, facilitating risk stratification and intervention decisions.

[0031] In a specific embodiment, such as Figure 2 As shown, the process of performing variable analysis on clinical information records to obtain multidimensional clinical features includes: S11, Perform medical terminology comparison on the clinical information records, separate the medical record text fragments, perform entity boundary truncation on the medical record text fragments, and extract medical sign words; S12, map the medical sign morphemes to a preset associated knowledge graph, and extract the knowledge graph node identifiers corresponding to the medical sign morphemes; S13, convert the knowledge graph node identifiers into discrete values ​​according to the preset node-value encoding mapping table to generate the multidimensional clinical features; wherein, the multidimensional clinical features include neurological deficit scale scores, coagulation function biochemical test values, stress inflammatory response index values ​​stored in continuous numerical form, and drug intervention feature quantities stored in discrete encoding form.

[0032] Specifically, when performing variable analysis on clinical information records, the original medical record text is first compared item by item with a standard medical terminology list to separate medical record text fragments containing clinical semantics. Then, entity boundary truncation is performed on these fragments to accurately locate and extract medical sign terms such as "confusion" and "thrombocytopenia." Subsequently, the extracted medical sign terms are matched to a pre-defined knowledge graph to obtain their unique corresponding knowledge graph node identifiers. Then, based on a pre-constructed node-value encoding mapping table, these node identifiers are converted into discrete numerical values ​​that can be processed by the machine, ultimately forming structured multidimensional clinical features. These multidimensional clinical features include both continuously stored numerical values ​​such as neurological deficit scale scores (e.g., NIHSS score), coagulation function biochemical test values ​​(e.g., INR, D-dimer), and stress inflammatory response marker values ​​(e.g., CRP, IL-6), and discretely encoded drug intervention characteristics (e.g., whether a proton pump inhibitor is used, and anticoagulant type codes). In this embodiment, the above scheme achieves a reliable transformation from unstructured medical record text to structured multidimensional clinical features, providing a semantically consistent and computable input foundation for subsequent modeling.

[0033] In a specific embodiment, the step of filtering missing values ​​and standardizing continuous variables on the multidimensional clinical features to obtain a standard feature matrix includes: For the multidimensional clinical features, count the number of missing values ​​column by column according to the feature dimension, and divide the number of missing values ​​in each column by the total sample size to obtain the dimension missing rate vector; Each element in the missing rate vector is compared with a preset missing rate threshold, and feature dimensions with missing rates greater than or equal to the missing rate threshold are removed to obtain an effective feature subset. For the remaining null value sites in each column of the effective feature subset, the median of all non-null observations in the column containing the null value site is taken as the column median filling value. The column median filling value is written into each null value site in the corresponding column to obtain the complete feature matrix. The columns of the complete feature matrix are judged for continuity according to their value types. Columns with continuous values ​​are separated into continuous feature groups, and columns with discrete codes are separated into category feature groups. For each column in the continuous feature group, calculate the arithmetic mean and sample standard deviation of all elements in the column to obtain the column-level scale parameter; Using the column-level scaling parameter as a benchmark, perform an element-by-element operation on each element in the continuous feature group by subtracting the arithmetic mean of the corresponding column and then dividing by the standard deviation of the corresponding column samples to obtain a normalized feature group. The normalized feature group and the category feature group are combined column-wise according to the original column index order to obtain the standard feature matrix.

[0034] Specifically, the multidimensional clinical features are subjected to missing value filtering and continuous variable standardization to generate the standard feature matrix. The specific implementation process is as follows: First, for each feature dimension of the multidimensional clinical features, the number of missing values ​​is counted column by column. The number of missing values ​​in each column is divided by the total sample size to calculate a dimension missing rate vector. Then, each element in the dimension missing rate vector is compared with a preset missing rate threshold (e.g., 0.3). Feature dimensions with a missing rate greater than or equal to the threshold are removed, and the remaining dimensions are retained to form an effective feature subset. On this basis, for the missing value sites still existing in the effective feature subset, a column median filling strategy is used to fill them: that is, for each column, only the median of all non-empty observations in the column is used to calculate the median, and the median is written as the filling value into all missing value positions in the column, thereby forming a complete feature matrix without missing values.

[0035] After handling missing values, the columns of the complete feature matrix are classified according to their value type for continuity. Columns with continuous values ​​(such as NIHSS scores, INR values, CRP concentrations, etc.) are assigned to the continuous feature group, while columns with discrete values ​​(such as drug intervention category codes) are assigned to the categorical feature group. Next, for each column in the continuous feature group, the arithmetic mean and sample standard deviation of all elements in that column are calculated to obtain a set of column-level scaling parameters. Using these parameters, a standardization operation is performed on each element in the group: the arithmetic mean of the corresponding column is subtracted from the original value, and then divided by the sample standard deviation of that column, resulting in a normalized feature group with zero mean and unit variance. It is important to note that this standardization process only applies to continuous features; categorical features retain their original discrete codes to avoid introducing spurious order relationships. Finally, the processed normalized feature group and the unchanged categorical feature group are horizontally concatenated according to their column index order in the original multidimensional clinical features to construct the standard feature matrix.

[0036] For example, in a gastrointestinal bleeding risk modeling task, the initial multidimensional clinical features contained 120 dimensions. After filtering with a missing rate threshold of 0.3, 37 highly missing dimensions were removed, leaving 83 dimensions as the effective feature subset. Among them, the "D-dimer" column had 12% missing values, which were filled with the median of non-null values, 0.56 mg / L. This column was subsequently identified as a continuous variable with a mean of 0.72 and a standard deviation of 0.31. After standardization, all observations were converted to the form (original value - 0.72) / 0.31. The "anticoagulant use" coding column (0 = no, 1 = heparin, 2 = warfarin) was retained in the categorical feature group without scaling. In this embodiment, the above scheme systematically solves the common problems of missing values ​​and dimensional heterogeneity in clinical data. While preserving the semantic integrity of categorical variables, it achieves scale uniformity for continuous variables, providing a numerically stable and structurally standardized input matrix for subsequent sparse regression and probability prediction.

[0037] In a specific embodiment, the step of applying an absolute value penalty constraint term to the standard feature matrix and the gastrointestinal bleeding outcome label and performing regression fitting to generate a coefficient contraction trajectory includes: Log-likelihood mapping is performed between the standard feature matrix and the gastrointestinal bleeding outcome label to construct a binary cross-entropy loss function, and a regression coefficient vector with the same length as the feature dimension of the standard feature matrix is ​​initialized. An absolute value penalty constraint term is applied to each component of the regression coefficient vector to generate a sparse penalty term; Arrange the gastrointestinal bleeding outcome labels according to the order of patient samples to construct a gastrointestinal bleeding outcome label vector; Calculate the absolute value of the inner product between each feature column vector in the standard feature matrix and the gastrointestinal bleeding outcome label vector, and take the maximum value among all the absolute values ​​of the inner product as the upper limit of the penalty parameter; The interval is discretized from the upper limit of the penalty parameter to zero according to the preset decay step size to generate a discrete penalty sequence; The discrete penalty sequence and the sparse penalty term are mapped to the binary cross-entropy loss function to construct a penalized optimization functional; The penalized optimization functional is subjected to coordinate descent optimization to extract sparse coefficient vectors, and the sparse coefficient vectors are concatenated according to the decay nodes of the discrete penalty sequence to generate the coefficient shrinkage trajectory.

[0038] Specifically, in the process of applying an absolute value penalty constraint term to the standard feature matrix and the gastrointestinal bleeding outcome labels for regression fitting to generate a coefficient contraction trajectory, the gastrointestinal bleeding outcome labels are first arranged according to the order of patient samples, constructing a gastrointestinal bleeding outcome label vector with a length equal to the number of samples, where each element takes a value of 0 or 1, corresponding to no bleeding and bleeding states, respectively. Meanwhile, the standard feature matrix contains several clinical indicators for each patient (such as hemoglobin, INR, creatinine, etc.), and its number of columns is the feature dimension. Subsequently, based on the principle of logistic regression, the standard feature matrix and the gastrointestinal bleeding outcome labels are mapped using log-likelihood, constructing a binary cross-entropy loss function, and initializing a regression coefficient vector with the same length as the feature dimension of the standard feature matrix, usually set to all zeros initially.

[0039] An absolute value penalty is applied to each component of the regression coefficient vector; that is, the absolute values ​​of each coefficient are summed to form a sparse penalty term. This operation causes some coefficients to be compressed to zero during the optimization process, thereby achieving variable selection. To reasonably set the search range of the penalty strength, the absolute value of the inner product between each column of the feature vector in the standard feature matrix and the aforementioned gastrointestinal bleeding outcome label vector needs to be calculated. For example, if a dataset has 30 clinical features, the absolute value of the inner product between each of these 30 feature columns and the outcome label vector is calculated. Assuming the calculated results are 0.12, 0.45, 0.03, etc., the maximum value (e.g., 0.45) is taken as the upper limit of the penalty parameter. When the penalty parameter is equal to or exceeds this upper limit, all regression coefficients are zero.

[0040] Starting from the upper limit of the penalty parameter, it is gradually decreased to a value close to zero (e.g., 0.001) according to a preset decay step size (e.g., dividing the logarithmic scale evenly into 60 points), thus generating a discrete penalty sequence. Each value in this sequence represents a regularization strength. Each penalty parameter in this discrete penalty sequence, together with the aforementioned sparse penalty term, is introduced into the binary cross-entropy loss function to construct a series of penalized optimized functionals. For each functional, the coordinate descent method is used for optimization: this method iterates through each regression coefficient, updates the current coefficient using a soft threshold rule while keeping the other coefficients fixed, and iterates repeatedly until convergence, thereby extracting the sparse coefficient vector under the corresponding penalty parameter.

[0041] The sparse coefficient vectors obtained from all penalty nodes are concatenated in descending order of penalty parameters to form a path in which the coefficients of each clinical feature are gradually "activated" or increase as the penalty intensity decreases—that is, the coefficient contraction trajectory. For example, the feature "blood urea nitrogen" may still be zero when the penalty parameter is 0.38, but it becomes a non-zero value of 0.27 for the first time when the penalty is reduced to 0.32, indicating that it begins to contribute to the model under this regularization intensity.

[0042] In this embodiment, the above scheme constructs a Lasso path through a system, which not only clearly shows the selection order of each clinical variable under different regularization strengths, but also provides a quantifiable and traceable basis for subsequent model optimization, effectively improving the stability and interpretability of high-dimensional medical data modeling.

[0043] In a specific embodiment, the step of mapping the discrete penalty sequence and the sparse penalty term to the binary cross-entropy loss function to construct a penalized optimization functional includes: Extract the contraction adjustment scalar from the discrete penalty sequence, and inject the contraction adjustment scalar as a penalty intensity parameter into the sparse penalty term to generate a weighted penalty term sequence that corresponds one-to-one with the contraction adjustment scalar. Each weighted penalty term in the weighted penalty term sequence is substituted into the binary cross-entropy loss function, and then summed with the binary cross-entropy loss function to generate the penalized optimized functional indexed by the penalty intensity parameter.

[0044] Specifically, in the construction of the penalized optimization functional, the first step is to extract the contraction adjustment scalars one by one from the generated discrete penalty sequence. This discrete penalty sequence is obtained in the previous step by discretizing the upper limit of the penalty parameter according to a preset decay step size. For example, if the upper limit is 0.45, dividing it into 50 points on a logarithmic scale yields 50 decreasing positive numbers, each of which is a contraction adjustment scalar. These scalars are not arbitrarily chosen but strictly correspond to the control parameters under different regularization intensities. Subsequently, each contraction adjustment scalar is used as a penalty intensity parameter and multiplied by its corresponding sparse penalty term—that is, the sum of the absolute values ​​of each component of the regression coefficient vector—to generate a set of weighted penalty terms that correspond one-to-one with the contraction adjustment scalars. For example, if a contraction adjustment scalar is 0.28, and the current regression coefficient vector contains three non-zero components (such as 0.15, -0.32, and 0.09), then the weighted penalty term is 0.28 × (|0.15| + |-0.32| + |0.09|) = 0.28 × 0.56 = 0.1568.

[0045] Each term in the above weighted penalty term sequence is summed with the same binary cross-entropy loss function. This binary cross-entropy loss function was constructed in the previous step based on the standard feature matrix and the gastrointestinal bleeding outcome label; its value reflects the model's fitting error to the bleeding outcome in the unpenalized case. By independently adding each weighted penalty term to this loss function, a series of new objective functions are formed, each indexed by a specific penalty strength parameter. In other words, when the contraction adjustment scalar is 0.45, the first penalized optimization functional is obtained; when it is 0.41, the second is obtained; and so on, until the smallest contraction adjustment scalar (e.g., 0.001) corresponds to the last functional. These functionals together constitute a family of penalized optimization functionals indexed by the penalty strength parameter, each term explicitly associated with a regularization level.

[0046] It is worth noting that this construction method ensures that the subsequent optimization process can be carried out step by step along the penalty path within a unified framework. For example, in the scenario of predicting gastrointestinal bleeding, if the feature "prothrombin time" is compressed to zero under high penalty intensity, and a non-zero coefficient first appears when the penalty intensity drops to 0.18, then the corresponding penalized optimization functional is solved at this contraction adjustment scalar. The entire process does not involve parallel computation of multiple unrelated models, but rather, by orderly embedding weighted penalty terms of different intensities, the optimization objective continuously evolves with parameter changes.

[0047] In this embodiment, the above scheme precisely maps the contraction adjustment scalar in the discrete penalty sequence to a weighted penalty term and systematically integrates it into the binary cross-entropy loss function, constructing a penalized optimized functional sequence with clear structure and traceable parameters. This provides a rigorous mathematical basis for subsequent coordinate descent solution and coefficient trajectory generation, significantly enhancing the stability and reproducibility of the model in the screening of high-dimensional clinical variables.

[0048] In a specific embodiment, the step of calculating the cross-validation error based on the coefficient contraction trajectory to obtain the optimal penalty parameter includes: The standard feature matrix is ​​resampled using multiple folds to separate the local training matrix and the independent verification matrix; For each fold of data, using the local training matrix as input, and according to the preset penalty parameter discrete sequence, the coordinate descent method is used to solve the binary cross-entropy loss function with absolute value penalty constraint term to obtain a set of local shrinkage coefficient vectors; wherein, the preset penalty parameter discrete sequence is the same as the penalty parameter discrete sequence used when generating the coefficient shrinkage trajectory; Based on the local shrinkage coefficient, a logarithmic loss measure is performed on the independent validation matrix to generate node validation error; The node verification error is calculated across folds to generate an expected error sequence, and a minimum search is performed on the expected error sequence to extract the node with the minimum error. Based on the minimum error node, the coefficient contraction trajectory is analyzed in reverse to extract the optimal penalty parameter.

[0049] Specifically, in the process of calculating cross-validation error based on the coefficient contraction trajectory to determine the optimal penalty parameters, a multi-fold resampling operation is first performed on the standard feature matrix, typically using a five-fold or ten-fold method, dividing all patient samples into several mutually exclusive subsets. In each fold, except for one subset which serves as an independent validation matrix, the remaining subsets are merged to form a local training matrix, ensuring that the training and validation data do not overlap. For example, under ten-fold cross-validation, the original standard feature matrix is ​​divided into ten equal parts, with one part used as an independent validation matrix in turn, and the remaining nine parts concatenated to form the corresponding local training matrix.

[0050] For each fold of the local training matrix, the same discrete sequence of preset penalty parameters (e.g., 60 log-equidistant points from 0.45 to 0.001) used when generating the coefficient shrinkage trajectory is employed. For each penalty parameter, the coordinate descent method is called to solve the binary cross-entropy loss function with an absolute value penalty constraint. This process outputs a set of local shrinkage coefficient vectors, each corresponding to a sparse solution under a single penalty parameter. Because the penalty parameter sequence remains consistent, the coefficient vectors obtained from each fold are strictly aligned to the same regularization node, ensuring the comparability of subsequent error calculations.

[0051] The local contraction coefficient vector obtained from each fold is applied to the corresponding independent validation matrix. The predicted bleeding probability for each validation sample is calculated using a logistic link function, and the log loss metric—the validation error in the form of negative log-likelihood—is then calculated; this error reflects the model's generalization performance on unseen data under a specific penalty parameter. For example, when the penalty parameter is 0.22, a certain fold might yield a log loss of 0.387, which is the validation error for that node at that fold.

[0052] After completing all folds, the arithmetic mean of the verification errors of each fold node under the same penalty parameter node is taken to form the expected result across folds, thus obtaining an expected error sequence of the same length as the discrete sequence of penalty parameters. This sequence characterizes the trend of the model's average generalization error changing with the regularization strength. Based on this, the entire expected error sequence is traversed to locate the position of the element with the smallest value, which is the minimum error node. Finally, based on the index of the minimum error node in the sequence, the corresponding position in the original coefficient contraction trajectory is traced back to extract the penalty parameter value bound to it, which is the optimal penalty parameter.

[0053] In this embodiment, the above scheme achieves robust estimation of the optimal penalty parameters by strictly aligning the discrete sequences of penalty parameters in the training and trajectory construction stages, and by combining log loss measurement and expected error minimization strategy under multi-fold cross-validation. This effectively avoids overfitting and improves the generalization ability and variable selection reliability of the gastrointestinal bleeding risk prediction model in real clinical scenarios.

[0054] In a specific embodiment, the step of performing inverse analysis on the coefficient contraction trajectory based on the minimum error node to extract the optimal penalty parameter includes: The minimum error node is analyzed for location, the extreme value addressing coordinates are extracted, and the extreme value addressing coordinates are substituted into the coefficient shrinkage trajectory for tensor slicing to generate trajectory slice vector; The trajectory slice vector is decomposed dimensionally to separate the penalty scalar component, and the penalty scalar component is numerically decoded and mapped to extract the optimal penalty parameter.

[0055] Specifically, in determining the optimal penalty parameters, once the expected error sequence is obtained through cross-validation and the minimum error node is located, the location of this node needs to be resolved. Specifically, this minimum error node has a unique index position in the expected error sequence. For example, if the discrete penalty sequence contains 60 points, and the 23rd point corresponds to the lowest average validation error, then its extreme value addressing coordinates are either integers 23 (starting from 1) or 22 (starting from 0), depending on the indexing conventions in the program implementation. This coordinate is not an abstract identifier, but directly points to the regularized path slice position that is strictly aligned with it in the coefficient shrinkage trajectory.

[0056] Using the extreme value addressing coordinates as slice indices, a tensor slice truncation operation is performed on the pre-generated coefficient contraction trajectory. The coefficient contraction trajectory is typically stored as a two-dimensional array, with rows corresponding to different features (such as clinical indicators like hemoglobin, INR, and creatinine) and columns corresponding to nodes in the discrete penalty sequence. Therefore, truncating an entire column along the column direction using the extreme value addressing coordinates yields a trajectory slice vector, whose dimension is equal to the feature dimension of the standard feature matrix. Each element represents the regression coefficient estimate of the corresponding feature under that penalty intensity. For example, in a gastrointestinal bleeding prediction task, if the extreme value addressing coordinates are 22 (starting from 0), the trajectory slice vector might contain non-zero values ​​such as a "prothrombin time" coefficient of 0.41 and a "urea nitrogen" coefficient of -0.28, while other unimportant variables are zero.

[0057] The trajectory slice vector is decomposed dimensionally. Although the vector itself mainly carries regression coefficient information, its generation process is bound to a specific penalty scalar component. Therefore, in the system implementation, the coefficient shrinkage trajectory is often stored synchronously with the penalty parameter sequence or associated through a shared index mechanism. Thus, using the same extreme value addressing coordinates, the corresponding penalty scalar component can be extracted from the original discrete penalty sequence. For example, if the discrete penalty sequence is [0.45, 0.41, ..., 0.001], and the 23rd term (starting from 1) is 0.192, then this value is the associated penalty scalar component.

[0058] Perform a numerical decoding mapping on the penalty scalar component. Here, "decoding" does not refer to an inverse transformation in the cryptographic sense, but rather to restoring its original numerical representation from the storage structure or encoding format. In most numerical computing environments, this component is already a floating-point number; therefore, the decoding operation is essentially a direct read or type conversion, ensuring its precision is consistent with subsequent modeling. The extracted value is the final optimal penalty parameter.

[0059] In this embodiment, the above scheme achieves unambiguous backtracking from the cross-validation results to the optimal penalty parameters by accurately analyzing the location of the minimum error node and combining tensor slicing, dimensional decomposition and numerical decoding. This ensures the repeatability and numerical consistency of the model selection process and provides key parameter support for building a stable, sparse and highly generalizable gastrointestinal bleeding risk prediction model.

[0060] In a specific embodiment, the step of extracting non-zero coefficient features from the standard feature matrix based on the optimal penalty parameter to obtain the core risk factor includes: The optimal penalty parameter is mapped to the coefficient contraction trajectory, and the target coefficient vector corresponding to the optimal penalty parameter is extracted. The absolute value of the target coefficient vector is calculated to obtain the coefficient absolute value vector, and the coordinates of the elements with values ​​greater than zero in the coefficient absolute value vector are extracted to generate a non-zero index sequence. Based on the non-zero index sequence, the standard feature matrix is ​​traversed by column dimensions to separate the target column vector set from the standard feature matrix; The target column vector set is concatenated column by column to generate the core risk factor.

[0061] Specifically, after determining the optimal penalty parameter, it is necessary to extract the core risk factors that actually contribute to the prediction of gastrointestinal bleeding from the standard feature matrix. In practice, the optimal penalty parameter is first used as a key and mapped back to the previously generated coefficient contraction trajectory. Since each column of the coefficient contraction trajectory strictly corresponds to a penalty parameter node in the discrete penalty sequence, and the optimal penalty parameter is selected from this sequence, the corresponding column vector can be directly located using its position index in the sequence (i.e., the extreme value addressing coordinates obtained in the previous step), thereby extracting the target coefficient vector matching the optimal penalty parameter. For example, if the optimal penalty parameter is 0.192 and it is located at the 23rd position in the discrete sequence, then the target coefficient vector is the 23rd column of the trajectory matrix, containing the regression coefficient set of all clinical features under this regularization strength.

[0062] The absolute values ​​of each element in the target coefficient vector are taken to form a vector of absolute coefficient values. This operation aims to eliminate the influence of sign, focusing only on whether the coefficients are non-zero. Next, this vector of absolute values ​​is traversed, identifying the positions of elements whose values ​​are strictly greater than zero, and recording their indices (e.g., the 3rd, 7th, 15th, etc.), forming a non-zero index sequence. These indices directly correspond to specific columns in the standard feature matrix, i.e., the numbers of the original clinical variables. For example, in a standard feature matrix containing 30 laboratory or vital sign indicators, if the non-zero index sequence is [2, 6, 14] (starting from 0), it indicates that the variables "platelet count," "international normalized ratio (INR)," and "creatinine level" are preserved under optimal regularization.

[0063] Next, based on this non-zero index sequence, a column-dimensional traversal operation is performed on the standard feature matrix. That is, columns 2, 6, and 14 of the standard feature matrix are accessed sequentially according to their indices, and the corresponding column vectors are extracted. Each column vector represents the observation value of all patients on this clinical indicator, and its dimension is equal to the number of samples. These selected column vectors together form the target column vector set, the number of which is equal to the number of non-zero coefficients, usually much smaller than the total number of original features, reflecting the sparsity of the model.

[0064] The target column vector set is concatenated along the column direction to form a new matrix structure, which is the so-called core risk factor. Its rows still correspond to the patient samples, while the columns only contain significant predictive variables selected through Lasso regularization. For example, in gastrointestinal bleeding risk modeling, the final core risk factor may consist of only 5 key indicators, rather than the initial dozens of redundant variables.

[0065] In this embodiment, the above scheme achieves the automatic identification and output of statistically significant core risk factors from high-dimensional clinical data by accurately backtracking the optimal penalty parameter to the coefficient contraction trajectory and combining non-zero index extraction and column concatenation operations. This not only significantly reduces model complexity but also enhances clinical interpretability, providing a reliable basis for subsequent risk stratification and intervention decisions.

[0066] In a specific embodiment, the step of weighted summing of the non-zero regression coefficients corresponding to the core risk factor and the optimal penalty parameter, adding an intercept term to obtain a linear predicted value, and then performing an inverse log-odds transformation on the linear predicted value to obtain the bleeding risk probability includes: The optimal penalty parameter is substituted into the coefficient contraction trajectory for coordinate addressing, the non-zero regression coefficient and intercept term are separated, and the core risk factor and the non-zero regression coefficient are weighted and summed to generate a clinical risk scalar. The clinical risk scalar is added to the intercept term to generate a linear prediction value, and the linear prediction value is multiplied by a constant negative one to generate an inverse prediction scalar. The reverse prediction scalar is subjected to an exponential operation with the natural constant as the base to generate a risk index term. The constant is then divided by the sum of the risk index term and the constant to generate the bleeding risk probability.

[0067] Specifically, after obtaining the core risk factors, the final bleeding risk probability needs to be calculated by combining the corresponding non-zero regression coefficients and intercept terms. First, the determined optimal penalty parameters are used as indices and mapped again to the coefficient contraction trajectory for coordinate addressing. Since this trajectory stores not only the regression coefficients of each feature during construction but also simultaneously retains the intercept term (i.e., the bias term in logistic regression) under each penalty node, the non-zero regression coefficient vector and the corresponding intercept term can be extracted simultaneously using the same extreme value addressing coordinates. The non-zero regression coefficient vector here only contains non-zero elements aligned with the core risk factors; the rest have been compressed to zero by Lasso penalty, so no further filtering is required.

[0068] The core risk factor matrix (whose number of columns equals the number of non-zero regression coefficients) is subjected to a sample-by-sample inner product operation with the vector of non-zero regression coefficients. This involves multiplying each core indicator value for each patient by its corresponding coefficient and then summing the results to generate a scalar result, called the clinical risk scalar. For example, if a patient's core risk factors are [platelet count = 85, INR = 1.8, creatinine = 1.4], and the corresponding non-zero regression coefficients are [-0.023, 0.67, 0.41], then their clinical risk scalar is (85 × -0.023) + (1.8 × 0.67) + (1.4 × 0.41) = -1.955 + 1.206 + 0.574 = -0.175.

[0069] The clinical risk scalar is added to the previously extracted intercept term to obtain the complete linear prediction value. Assuming the intercept term is -0.82, the linear prediction value is -0.175 + (-0.82) = -0.995. To adapt to the standard form of the logistic function, this linear prediction value is multiplied by a constant negative one to generate the inverse prediction scalar, i.e., -(-0.995) = 0.995.

[0070] Using the natural constant e as the base, the inverse prediction scalar is raised to the power of the result to obtain the risk index term, i.e., exp(0.995) ≈ 2.704. Finally, the constant 1 is divided by the sum of the risk index term and the constant 1, i.e., 1 / (1 + 2.704) ≈ 1 / 3.704 ≈ 0.270. This result is the predicted probability of the patient developing gastrointestinal bleeding.

[0071] In this embodiment, the above scheme achieves a precise conversion from sparse model parameters to individualized bleeding risk probabilities by strictly aligning the core risk factors with the non-zero regression coefficients and intercept terms under the optimal penalty parameters, and sequentially performing weighted summation, linear combination, sign inversion, exponential mapping and inverse Sigmoid transformation. This ensures that the prediction results are both statistically rigorous and meet the actual needs of clinical decision-making.

[0072] The above describes a method for assessing the risk of gastrointestinal bleeding in patients with subarachnoid hemorrhage according to an embodiment of the present invention. The following describes a system for assessing the risk of gastrointestinal bleeding in patients with subarachnoid hemorrhage according to an embodiment of the present invention. Please refer to [link to documentation]. Figure 3 One embodiment of the gastrointestinal bleeding risk assessment system for patients with subarachnoid hemorrhage according to the present invention includes: The analysis module 21 is used to perform variable analysis on the clinical information records of patients with subarachnoid hemorrhage to obtain multidimensional clinical features; The standardization processing module 22 is used to perform missing value filtering and continuous variable standardization processing on the multidimensional clinical features to obtain a standard feature matrix; The fitting module 23 is used to apply an absolute value penalty constraint term to the standard feature matrix for regression fitting, obtain the coefficient shrinkage trajectory, and calculate the cross-validation error based on the coefficient shrinkage trajectory to obtain the optimal penalty parameter; Extraction module 24 is used to extract non-zero coefficient features from the standard feature matrix based on the optimal penalty parameter to obtain the core risk factor; The calculation module 25 is used to perform a weighted summation of the non-zero regression coefficient vector corresponding to the core risk factor and the optimal penalty parameter, and add the intercept term to obtain a linear prediction value. The linear prediction value is then subjected to an inverse logarithmic probability transformation to obtain the bleeding risk probability.

[0073] In this embodiment, the specific implementation of each module in the above system embodiment is described in the above method embodiment, and will not be repeated here.

Claims

1. A method for assessing the risk of gastrointestinal bleeding in patients with subarachnoid hemorrhage, characterized in that, include: We obtained clinical information records and gastrointestinal bleeding outcome labels of patients with subarachnoid hemorrhage, and performed variable analysis on the clinical information records to obtain multidimensional clinical characteristics. The multidimensional clinical features were filtered for missing values ​​and standardized as continuous variables to obtain a standard feature matrix; An absolute value penalty constraint term is applied to the standard feature matrix and the gastrointestinal bleeding outcome label, and regression fitting is performed to generate a coefficient contraction trajectory. Based on the coefficient contraction trajectory, cross-validation error is calculated to obtain the optimal penalty parameter. Based on the optimal penalty parameter, non-zero coefficient features are extracted from the standard feature matrix to obtain the core risk factor. The core risk factor and the non-zero regression coefficient vector corresponding to the optimal penalty parameter are weighted and summed, and an intercept term is added to obtain a linear prediction value. The linear prediction value is then subjected to an inverse logarithmic probability transformation to obtain the bleeding risk probability.

2. The method for assessing the risk of gastrointestinal bleeding in patients with subarachnoid hemorrhage according to claim 1, characterized in that, The process of analyzing clinical information records to obtain multidimensional clinical features includes: The clinical information records are compared with medical lexicons to separate the medical record text fragments. The entity boundaries of the medical record text fragments are truncated to extract medical sign lexicons. The medical sign morphemes are mapped to a preset associated knowledge graph, and the knowledge graph node identifiers corresponding to the medical sign morphemes are extracted. The knowledge graph node identifiers are converted into discrete values ​​according to a preset node-value encoding mapping table to generate the multidimensional clinical features; wherein, the multidimensional clinical features include neurological deficit scale scores, coagulation function biochemical test values, stress inflammatory response index values ​​stored in continuous numerical form, and drug intervention feature quantities stored in discrete encoding form.

3. The method for assessing the risk of gastrointestinal bleeding in patients with subarachnoid hemorrhage according to claim 1, characterized in that, The step of applying an absolute value penalty constraint term to the standard feature matrix and the gastrointestinal bleeding outcome label, and performing regression fitting to generate a coefficient contraction trajectory, includes: Log-likelihood mapping is performed between the standard feature matrix and the gastrointestinal bleeding outcome label to construct a binary cross-entropy loss function, and a regression coefficient vector with the same length as the feature dimension of the standard feature matrix is ​​initialized. An absolute value penalty constraint term is applied to each component of the regression coefficient vector to generate a sparse penalty term; Arrange the gastrointestinal bleeding outcome labels according to the order of patient samples to construct a gastrointestinal bleeding outcome label vector; Calculate the absolute value of the inner product between each feature column vector in the standard feature matrix and the gastrointestinal bleeding outcome label vector, and take the maximum value among all the absolute values ​​of the inner product as the upper limit of the penalty parameter; The interval is discretized from the upper limit of the penalty parameter to zero according to the preset decay step size to generate a discrete penalty sequence; The discrete penalty sequence and the sparse penalty term are mapped to the binary cross-entropy loss function to construct a penalized optimization functional; The penalized optimization functional is subjected to coordinate descent optimization to extract sparse coefficient vectors, and the sparse coefficient vectors are concatenated according to the decay nodes of the discrete penalty sequence to generate the coefficient shrinkage trajectory.

4. The method for assessing the risk of gastrointestinal bleeding in patients with subarachnoid hemorrhage according to claim 3, characterized in that, The step of mapping the discrete penalty sequence and the sparse penalty term to the binary cross-entropy loss function to construct a penalized optimization functional includes: Extract the contraction adjustment scalar from the discrete penalty sequence, and inject the contraction adjustment scalar as a penalty intensity parameter into the sparse penalty term to generate a weighted penalty term sequence that corresponds one-to-one with the contraction adjustment scalar. Each weighted penalty term in the weighted penalty term sequence is substituted into the binary cross-entropy loss function, and then summed with the binary cross-entropy loss function to generate the penalized optimized functional indexed by the penalty intensity parameter.

5. The method for assessing the risk of gastrointestinal bleeding in patients with subarachnoid hemorrhage according to claim 1, characterized in that, The calculation of cross-validation error based on the coefficient contraction trajectory to obtain the optimal penalty parameters includes: The standard feature matrix is ​​resampled using multiple folds to separate the local training matrix and the independent verification matrix; For each fold of data, using the local training matrix as input, and according to the preset penalty parameter discrete sequence, the coordinate descent method is used to solve the binary cross-entropy loss function with absolute value penalty constraint term to obtain a set of local shrinkage coefficient vectors; wherein, the preset penalty parameter discrete sequence is the same as the penalty parameter discrete sequence used when generating the coefficient shrinkage trajectory; Based on the local shrinkage coefficient, a logarithmic loss measure is performed on the independent validation matrix to generate node validation error; The node verification error is calculated across folds to generate an expected error sequence, and a minimum search is performed on the expected error sequence to extract the node with the minimum error. Based on the minimum error node, the coefficient contraction trajectory is analyzed in reverse to extract the optimal penalty parameter.

6. The method for assessing the risk of gastrointestinal bleeding in patients with subarachnoid hemorrhage according to claim 5, characterized in that, The step of performing inverse analysis on the coefficient contraction trajectory based on the minimum error node to extract the optimal penalty parameter includes: The minimum error node is analyzed for location, the extreme value addressing coordinates are extracted, and the extreme value addressing coordinates are substituted into the coefficient shrinkage trajectory for tensor slicing to generate trajectory slice vector; The trajectory slice vector is decomposed dimensionally to separate the penalty scalar component, and the penalty scalar component is numerically decoded and mapped to extract the optimal penalty parameter.

7. The method for assessing the risk of gastrointestinal bleeding in patients with subarachnoid hemorrhage according to claim 1, characterized in that, The process of extracting non-zero coefficient features from the standard feature matrix based on the optimal penalty parameter to obtain core risk factors includes: The optimal penalty parameter is mapped to the coefficient contraction trajectory, and the target coefficient vector corresponding to the optimal penalty parameter is extracted. The absolute value of the target coefficient vector is calculated to obtain the coefficient absolute value vector, and the coordinates of the elements with values ​​greater than zero in the coefficient absolute value vector are extracted to generate a non-zero index sequence. Based on the non-zero index sequence, the standard feature matrix is ​​traversed by column dimensions to separate the target column vector set from the standard feature matrix; The target column vector set is concatenated column by column to generate the core risk factor.

8. The method for assessing the risk of gastrointestinal bleeding in patients with subarachnoid hemorrhage according to claim 1, characterized in that, The step involves weighting and summing the non-zero regression coefficient vectors corresponding to the core risk factor and the optimal penalty parameter, adding an intercept term to obtain a linear prediction value, and then performing an inverse log-odds transformation on the linear prediction value to obtain the bleeding risk probability, including: Substitute the optimal penalty parameter into the coefficient contraction trajectory for coordinate addressing, and extract the non-zero regression coefficient vector corresponding to the optimal penalty parameter; Extract the intercept scalar from the intercept term that is separately estimated and stored when the penalized optimized functional converges under the optimal penalty parameters; The core risk factors and the non-zero regression coefficient vector are summed element-wise to generate a clinical risk scalar. The clinical risk scalar and the intercept scalar are scalarly added together to generate a linear prediction value; Apply an exponential operation with the natural constant as the base to the linear predicted value to generate a positive risk index term, and divide the positive risk index term by the sum of the positive risk index term and the constant one to generate the bleeding risk probability.

9. A risk assessment system for gastrointestinal bleeding in patients with subarachnoid hemorrhage, characterized in that, include: The analysis module is used to perform variable analysis on the clinical information records of patients with subarachnoid hemorrhage to obtain multidimensional clinical features. The standardization processing module is used to perform missing value filtering and continuous variable standardization on the multidimensional clinical features to obtain a standard feature matrix. The fitting module is used to apply an absolute value penalty constraint term to the standard feature matrix for regression fitting, obtain the coefficient shrinkage trajectory, and calculate the cross-validation error based on the coefficient shrinkage trajectory to obtain the optimal penalty parameter; The extraction module is used to extract non-zero coefficient features from the standard feature matrix based on the optimal penalty parameter to obtain the core risk factor; The calculation module is used to perform a weighted summation of the non-zero regression coefficient vectors corresponding to the core risk factor and the optimal penalty parameter, and add an intercept term to obtain a linear prediction value. The linear prediction value is then subjected to an inverse logarithmic probability transformation to obtain the bleeding risk probability.