Hospitalized patient unplanned ICU transfer risk prediction method based on extreme imbalance data

CN122531745APending Publication Date: 2026-08-07CHILDRENS HOSPITAL OF CHONGQING MEDICAL UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHILDRENS HOSPITAL OF CHONGQING MEDICAL UNIV
Filing Date
2026-06-03
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

传统评估工具如小儿危重症评分(PCIS)和死亡风险评分(PRISM)虽能有效评估危重程度,但存在早期识别敏感性低、评分项目复杂(涉及实验室指标)、耗时较长等缺陷,难以作为初筛工具

Benefits of technology

本发明针对住院患者计划外转ICU这一极端类别不平衡预测任务,构建了基于连续诊疗数据的风险预测流程,能够在预设预测窗口内对患者未来发生计划外转入ICU事件的风险进行动态评估,从而提高临床预警的前瞻性和连续性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122531745A_ABST
    Figure CN122531745A_ABST
Patent Text Reader

Abstract

The application discloses an inpatient unplanned ICU transfer risk prediction method based on extremely unbalanced data. The method constructs samples with continuous diagnosis and treatment data in a preset observation window before the prediction time point, and takes whether unplanned ICU transfer occurs in the prediction window as a label. After abnormal value processing, missing value filling and numerical value transformation, a composite feature is constructed, including missing perception, test intensity perception and physiological state representation. In the training set, candidate features are screened, an initial model is trained, hard negative samples are identified, and then, in combination with positive samples, an enhanced training set is constructed to train a final model. Through internal validation, an early warning threshold is determined, and different hospital area independent data are used for external validation. Finally, the patient unplanned ICU transfer risk probability or grade is output. The application can improve the identification ability of high-risk patients and difficult samples under the condition of extreme class imbalance, and enhance the utilization ability of the model for complex missing mode and multi-dimensional physiological feature combination information, thereby improving the accuracy, stability and clinical application value of the unplanned ICU transfer risk early warning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of risk prediction, and more specifically to a method for predicting the risk of hospitalized patients being transferred to the ICU based on imbalanced data. Background Technology

[0002] In pediatric clinical practice, timely identification and effective intervention of hospitalized children's deteriorating conditions are crucial for improving prognosis. Existing research indicates that 26%-43% of pediatric deaths have preventable factors, with insufficient recognition of critical symptoms by non-specialist healthcare personnel being a significant contributing factor. Traditional assessment tools such as the Pediatric Critical Illness Score (PCIS) and the Risk of Mortality Score (PRISM), while effectively assessing the severity of illness, suffer from low sensitivity in early identification, complex scoring items (involving laboratory indicators), and lengthy processing times, making them unsuitable as initial screening tools. In contrast, the Early Warning Score for Children (PEWS) has become a mainstream screening tool due to its ease of use, but its accuracy is limited by dynamic changes in physiological indicators: children's vital signs such as heart rate and respiratory rate fluctuate significantly with age, body temperature, and activity level, and existing warning systems lack a unified age stratification standard and do not adequately consider data trend analysis, resulting in a false alarm rate as high as 30%-40%. Studies show that warning systems relying solely on vital signs can only identify less than 60% of deterioration events.

[0003] Electronic health record (EHR) data mining offers a new approach to multidimensional dynamic monitoring. Although EHR integrates multi-source data such as vital signs and laboratory indicators, its application still faces key challenges: 1) There are serious gaps in the longitudinal data, and key information such as nursing assessments is not recorded in a standardized manner; 2) The high-dimensional sparsity significantly increases the difficulty of modeling, with approximately 35% of pediatric EHRs having incomplete data across time points; 3) Insufficient handling of time-dependent characteristics; existing studies mostly use static indicators while ignoring trend changes.

[0004] For example, although the I-WIN system developed by Ruiz et al. can provide early warning 8 hours before deterioration, its 1028-dimensional feature set shows a significant decline in performance during external validation. The predictive model based on recurrent neural networks developed by Placido's team also has limited universality due to training on data from a single institution.

[0005] Machine learning technology has demonstrated advantages in processing complex medical data, integrating more dimensions of diagnostic and treatment information compared to traditional early warning scoring tools, and shows promising application prospects in identifying the risk of deterioration in hospitalized children. However, existing machine learning methods still have significant limitations in predicting unplanned ICU transfers, failing to meet the comprehensive requirements of clinical early warning in terms of lead time, accuracy, and generalization ability. These limitations are mainly reflected in the following aspects: 1) Insufficient feature representation ability. Existing methods usually focus on the raw indicators themselves, such as vital signs and laboratory test results, and fail to make full use of implicit information that can reflect the intensity of clinical monitoring and the process of disease changes, such as variable missing patterns, coverage of test items and test frequency, resulting in the model's insufficient representation of the real clinical state; 2) Extreme class imbalance limits the ability to identify minority class cases. Unplanned transfers to the ICU typically occur at a low rate in the overall number of hospitalized children, representing a typical example of extreme class imbalance. In this scenario, conventional classification models tend to favor the majority class, thus reducing their ability to identify high-risk minority class cases. 3) Traditional resampling methods have limited adaptability to medical data. Existing technologies often use methods such as random oversampling, undersampling, or SMOTE to alleviate class imbalance. However, there are usually strong correlations between different features in medical data, and the heterogeneity within minority classes is high. Simple resampling can easily introduce noisy samples or destroy the distribution boundaries of the original samples, thus making it difficult to stably improve model performance. 4) Insufficient learning of difficult-to-distinguish samples. In the task of predicting the risk of hospitalized patients, some negative samples are quite similar to truly high-risk samples in the feature space, and are therefore prone to misclassification as high-risk negative samples. Existing methods usually focus more on overall classification performance and lack targeted utilization of these boundary samples, which can easily lead to an increased false alarm burden and is not conducive to improving the model's ability to distinguish minority class samples; 5) Insufficient generalization validation. Some existing studies are trained and validated only on single-center data or internal datasets, lacking external validation. This results in insufficient stability and generalizability of the model on data from different time periods, different wards, or different hospital areas, making it difficult to meet the needs of actual clinical deployment.

[0006] Therefore, current technologies still lack a risk prediction method that can comprehensively utilize original diagnostic and treatment indicators, missing pattern information, and test strength information under extreme class imbalance conditions for predicting unplanned transfers of hospitalized children to the ICU, and improve predictive performance and generalization ability through feature selection, reinforcement learning for hard-to-separate samples, and external validation. Summary of the Invention To address the aforementioned shortcomings of existing technologies, this invention provides a method for predicting the risk of unplanned ICU transfer for hospitalized patients based on extremely imbalanced data. By modeling continuous medical data of hospitalized patients and comprehensively utilizing original medical indicators, missing pattern information, and test intensity information, this method enables intelligent early warning and dynamic prediction of the risk of unplanned ICU transfer for hospitalized children within a preset time window in the future.

[0007] To achieve the above-mentioned objectives, the technical solution adopted by this invention is as follows: A method for predicting the planned transfer risk of hospitalized patients to the ICU based on extremely imbalanced data is provided, which includes the following steps: S1: Collect continuous medical data of hospitalized patients, construct a sample based on the medical data of patients within a preset observation window before the prediction time point, and use whether the patient corresponding to the sample has an unplanned transfer to the ICU within a preset prediction window after the prediction time point as a label; S2: Preprocess the diagnostic data in the sample. The preprocessing includes outlier identification and processing, missing value imputation and numerical transformation to obtain the preprocessed dataset. S3: Construct composite combined features based on the preprocessed dataset. The composite combined features include at least the missing feature reflecting the degree of variable missingness, the test intensity feature reflecting the coverage of laboratory test items or the frequency of tests, and the physiological state representation feature obtained based on the combination of multiple original diagnostic and treatment indicators. S4: Construct a feature dataset using composite combined features, divide the feature dataset into a training set and an internal validation set, and use independent data from different campuses for external validation; perform feature filtering on the training set for the original features and the composite combined features to obtain a subset of candidate features; S5: Train an initial risk prediction model on the training set based on the candidate feature subset, and use the initial risk prediction model to score the risk of negative samples in the training set in order to identify high-risk negative samples that are close to the boundary of positive samples or are easily misjudged. S6: Based on the risk score, select hard negative samples from the negative samples, and construct an enhanced training set together with the hard negative samples and positive samples; train the final risk prediction model based on the enhanced training set to improve the ability of the final risk prediction model to distinguish minority samples and difficult-to-distinguish negative samples in extremely imbalanced data. S7: Evaluate the performance of the final risk prediction model using the internal validation set, and determine the discrimination threshold for risk warning based on the internal validation results; S8: Input independent external validation data from different hospital areas into the final risk prediction model for external validation to evaluate the generalization performance of the final risk prediction model; and apply the externally validated final risk prediction model to the patient's real-time diagnosis and treatment data to output the risk probability or risk level of the patient's unplanned transfer to the ICU within the preset prediction window.

[0008] Furthermore, the outlier identification and processing method in step S2 is as follows: Calculate the mean μ and standard deviation σ of the diagnosis and treatment data of the same patient at different time points, and use the mean μ and standard deviation σ to determine the lower threshold μ-3σ and upper threshold μ+3σ of the normal range; if the diagnosis and treatment data exceeds the normal range, it is judged as an outlier, and the outlier is deleted, truncated or replaced.

[0009] Furthermore, the method for deleting outliers from the dataset is as follows: Calculate the first quartile Q1 and the third quartile Q3 of the normal range of treatment data for the same patient at different times, and then calculate the interquartile range IQR = Q3 - Q1. The lower edge of the normal range is Q1 - 1.5 × IQR, and the upper edge is Q3 + 1.5 × IQR. If the treatment data is not outside this range, it is considered an outlier.

[0010] Furthermore, the composite combination features constructed in step S3 include at least one of the following features: the total number of missing variables in the sample, the count of non-missing variables in the preset test panel, the count of missing variables in the preset test panel, the number of test items covered per unit time, the test frequency per unit time, the summary index of abnormal vital signs, and the combination features of infection-related indicators.

[0011] Furthermore, the feature selection in step S4 uses the Lasso regression algorithm to perform sparse selection on the original features and the composite features, retaining features whose feature weights are not zero or whose absolute values ​​are greater than a preset threshold as the candidate feature subset.

[0012] Furthermore, the hard negative sample mining method in steps S5 and S6 is as follows: The negative samples are sorted according to the predicted probability of the negative samples output by the initial risk prediction model. The negative samples with a predicted probability higher than a preset threshold or ranked in the top K positions are selected as hard negative samples. The hard negative samples are then combined with all or part of the positive samples to construct an enhanced training set for training the final risk prediction model.

[0013] The beneficial effects of this invention are as follows: This invention addresses the extreme category imbalance prediction task of unplanned ICU transfer for hospitalized patients by constructing a risk prediction process based on continuous medical data. This process can dynamically assess the risk of future unplanned ICU transfers within a preset prediction window, thereby improving the foresight and continuity of clinical early warning.

[0014] This invention constructs missing perception features, test intensity perception features, and physiological state representation features on the basis of original diagnostic and treatment indicators. This enables the model to not only utilize traditional clinical indicator information, but also to utilize important implicit information reflecting the clinical monitoring process, such as missing patterns, test coverage, and test frequency, thereby improving its ability to express the true clinical state.

[0015] This invention reduces redundant information in high-dimensional medical data through feature filtering, improves the effectiveness of input features and model training efficiency, and helps enhance the stability and robustness of the model in complex medical data scenarios.

[0016] This invention employs a hard negative sample mining strategy to perform reinforcement learning on high-risk negative samples that are close to the boundary of positive samples and are easily misclassified. Compared with traditional resampling methods, it can more effectively improve the model's ability to distinguish minority class samples and difficult-to-distinguish samples, thereby balancing the ability to identify high-risk patients and the ability to control false alarms under extreme class imbalance conditions.

[0017] By setting up internal and external validation processes, this invention can not only determine the discrimination threshold applicable to risk warning, but also evaluate the generalization performance of the model under different data source conditions, thereby improving the reliability and generalizability of the model in actual clinical deployment. Attached Figure Description

[0018] Figure 1 This is a flowchart of a method for predicting the risk of unplanned transfer to the ICU for hospitalized patients based on extremely imbalanced data. Detailed Implementation

[0019] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the invention. However, it should be understood that the present invention is not limited to the following specific embodiments. For those skilled in the art, various modifications, substitutions, and improvements made without departing from the spirit and scope of the present invention should fall within the scope of protection of the present invention.

[0020] like Figure 1 As shown, a method for predicting the risk of planned outpatient transfer to the ICU based on extremely imbalanced data includes the following steps: S1: Collect continuous medical data of hospitalized patients and construct predictive samples and labels. This embodiment collects continuous medical data from hospitalized patients within a set time period. This continuous medical data includes multi-timepoint, multi-dimensional medical information generated during the patient's hospitalization, used to construct a risk prediction sample. The medical data may include, but is not limited to: basic hospitalization information, vital signs information, laboratory test indicators, infection-related indicators, biochemical test indicators, coagulation function indicators, blood gas analysis indicators, electrolyte and metabolic indicators, pathogen detection information, and other medical information that can reflect the patient's clinical status.

[0021] In this embodiment, a sample is constructed using the patient's continuous medical data within a preset observation window before the prediction time point, and the sample label is whether the patient experiences an unplanned transfer to the ICU within a preset prediction window after the prediction time point. Preferably, the observation window is a window of medical data within a continuous 24-hour period before the prediction time point, and the prediction window is a time range within a 24-hour period after the prediction time point. If the patient experiences an unplanned transfer to the ICU within the prediction window, the corresponding sample label is recorded as positive; otherwise, it is recorded as negative.

[0022] The collected patient medical data needs to exclude the following patients' medical data: 1. Patients who were immediately transferred to the ICU for monitoring after surgery; 2. Patients admitted to the ICU; 3. Newborns aged 0 to 28 days; 4. Patients whose hospital stay is less than two days; 5. Patients who lack laboratory test data.

[0023] S2: Preprocessing of diagnostic and treatment data After constructing the samples, the diagnostic data in the samples are preprocessed. The preprocessing includes outlier identification and handling, missing value imputation, and numerical transformation to improve the stability of subsequent feature construction and model training.

[0024] In one embodiment, outlier identification can employ the three-standard-deviation method. Specifically, the mean μ and standard deviation σ of a certain diagnostic and treatment data for the same patient at different time points are calculated. The mean μ and standard deviation σ are used to determine the lower threshold μ-3σ and upper threshold μ+3σ of the normal value range. If the diagnostic and treatment data exceeds the normal value range, it is determined to be an outlier, and the outlier is deleted, truncated, or replaced.

[0025] In another embodiment, outlier identification can also employ box plotting. Specifically, the first quartile Q1 and the third quartile Q3 of a certain diagnostic data point for the same patient at different time points are calculated, and the interquartile range IQR = Q3 - Q1 is obtained; diagnostic data points lower than Q1 - 1.5 × IQR or higher than Q3 + 1.5 × IQR are identified as outliers, and these outliers are then deleted, truncated, or replaced.

[0026] For handling missing values, the missing rate of each sample or variable can be calculated first. Data with a missing rate higher than a preset threshold can be deleted; data with a missing rate not higher than the preset threshold can be imputed using at least one of the following methods: interpolation at adjacent time points, mean imputation, median imputation, stratified statistical imputation, or cluster stratified imputation. Preferably, for continuous medical data with a time sequence, imputation can be performed using interpolation at adjacent time points or based on statistics of similar samples.

[0027] For numerical transformations, the diagnostic and treatment data can be standardized, normalized, or otherwise processed in a way that is suitable for model training, depending on the type of variable, in order to eliminate the impact of dimensional differences on subsequent model training.

[0028] After the above preprocessing, the preprocessed dataset is obtained.

[0029] S3: Constructing composite combination features Based on the preprocessed dataset, composite combined features are further constructed. These composite combined features are used to enhance the model's ability to express the patient's true clinical status, monitoring intensity, and disease progression.

[0030] In this embodiment, the composite combination features include at least the following three categories: 1) Missing perceptual features Used to characterize the degree of missing diagnostic data in a sample, such as the total number of missing variables in the sample, the number of missing variables in a specific category, and the count of missing variables in different test panels.

[0031] 2) Testing intensity perception characteristics Features used to characterize the intensity of clinical monitoring or the degree of laboratory testing execution include, for example, the count of non-missing variables in a pre-defined testing panel, the number of tests covered per unit time, and the frequency of tests per unit time. These features can reflect the degree to which patients are monitored and the level of attention given to them in actual clinical practice.

[0032] 3) Physiological state characteristics This is used to generate combined features that reflect the degree of physiological abnormalities in patients by integrating multiple original diagnostic and treatment indicators, such as summaries of the intensity of abnormal vital signs, combined features of infection-related indicators, or other state features formed by combining multiple original variables according to preset rules.

[0033] By constructing the aforementioned composite features, we can not only utilize traditional original diagnostic and treatment indicators, but also implicit information such as missing patterns, test coverage, and test frequency, thereby improving the model's ability to express the true clinical risk status.

[0034] S4: Split the dataset and perform feature selection The dataset was divided into a training set and an internal validation set, and external validation was performed using independent data from different campuses. The training set was used for model training, the internal validation set for model performance evaluation and threshold selection, and the external validation set for evaluating the model's generalization performance on independent data sources.

[0035] In this embodiment, feature filtering is performed on the original features and the composite combined features on the training set to obtain a candidate feature subset. Preferably, the feature filtering uses the Lasso regression algorithm. The Lasso regression algorithm introduces an L1 regularization term into the loss function to impose sparsity constraints on the input features, thereby reducing the interference of redundant features on model training. After Lasso filtering of the original features and composite combined features in the training set, features with non-zero feature weights or absolute values ​​greater than a preset threshold are retained as candidate feature subsets for subsequent model training.

[0036] This step reduces the input dimensionality, improves feature effectiveness, and enhances the stability and generalization ability of the model during training.

[0037] S5: Train the initial risk prediction model and identify high-risk negative class samples. Based on the candidate feature subset, an initial risk prediction model is trained on the training set. The initial risk prediction model is used to score the risk of negative samples in the training set to identify high-risk negative samples that are close to the boundary of positive samples or are easily misclassified.

[0038] In this embodiment, the initial risk prediction model can be any one of a tree-based ensemble learning model, a logistic regression model, a support vector machine model, or a neural network model. After model training, a predicted probability or risk score is output for the negative class samples in the training set, and the degree of similarity between each negative class sample and the positive class risk pattern is measured based on the predicted probability or risk score.

[0039] Because unplanned ICU transfers occur at a low rate in the overall number of hospitalized patients, the training set typically contains a large number of negative samples. Some of these negative samples, although labeled negative, have feature space distributions that are quite similar to those of positive samples, classifying them as high-risk negative samples. These samples play a crucial role in learning the model's boundaries, therefore, targeted reinforcement is necessary in subsequent training.

[0040] S6: Perform hard negative sample mining and train the final risk prediction model. Based on the predicted probability or risk score of the negative samples output by the initial risk prediction model, the negative samples are sorted, and the negative samples with predicted probabilities higher than a preset threshold or ranked in the top K positions are selected as hard negative samples.

[0041] After selecting the hard negative samples, the hard negative samples are combined with all or part of the positive class samples to construct an enhanced training set. In some embodiments, the enhanced training set may further include some randomly selected ordinary negative class samples to maintain the reasonableness of the training sample distribution.

[0042] Subsequently, the final risk prediction model is trained based on the enhanced training set. By focusing the training on minority class positive samples and hard negative samples close to the positive sample boundaries, the final risk prediction model's ability to distinguish minority class samples and difficult-to-distinguish negative class samples in extremely imbalanced data can be improved, thereby enhancing the recognition performance and false alarm control capabilities in clinical early warning tasks.

[0043] S7: Utilize the internal validation set to perform performance evaluation and determine the warning threshold. The internal validation set is input into the final risk prediction model to evaluate its performance. Evaluation metrics may include the area under the receiver operating characteristic (ROC) curve, precision, recall, F1 score, specificity, or other evaluation metrics suitable for risk warning scenarios.

[0044] In this embodiment, a discrimination threshold for risk warning is determined based on internal validation results. This discrimination threshold maps the risk probability output by the final risk prediction model to a risk level or warning result. Determining the discrimination threshold through an internal validation set allows the final risk prediction model to better adapt to the clinical need for a balance between warning sensitivity and false alarm burden in practical applications.

[0045] S8: Conduct external validation and apply it to real-time risk warning. Independent external validation data from different hospital campuses are input into the final risk prediction model for external validation to evaluate the generalization performance of the final risk prediction model on independent data sources. The external validation set can come from different time periods, different wards, different hospital campuses, or other data sources independent of the training set and internal validation set.

[0046] If the external validation results meet the preset performance requirements, the final risk prediction model validated externally will be applied to the patient's real-time medical data to predict the risk of an unplanned transfer to the ICU within a preset prediction window, and output the risk probability or risk level. The risk level may include at least two or three levels from low risk, medium risk, and high risk.

[0047] This invention also utilizes the SHAP library to calculate the contribution of each feature to the prediction result. By plotting a summary graph of SHAP values, it displays the average impact of all features on the model's prediction, identifying the features that contribute the most to the model, thus providing a global explanation. For local explanations, force plots or waterfall plots are generated for individual prediction samples to show the specific contribution of each feature to a single prediction result, helping to understand the model's decision-making process on specific samples. By calculating the contribution of each feature to the prediction result, both global and local model explanations are provided, aiding in understanding the model's decision-making mechanism.

[0048] This invention proposes a data extraction and fusion technique based on multi-dimensional medical data types (including basic information, physiological indicators, clinical symptoms, laboratory indicators, etc.). By integrating heterogeneous data sources through advanced algorithms, a deep level of complementarity and fusion between data is achieved. This approach fully leverages the unique value of each type of diagnostic and treatment data, thereby improving the accuracy and robustness of the model in handling complex clinical scenarios. Compared to traditional evaluation methods that rely on physician experience and subjective indicators, this invention reduces evaluation bias caused by subjective factors, providing a more objective and reliable quantitative basis for clinical decision-making.

[0049] This invention develops a time-series-based continuous prediction model for predicting the risk of unplanned ICU transfers in hospitalized pediatric patients up to 24 hours in advance. Based on routinely collected health data, the model continuously and automatically monitors and assesses the risk of pediatric patients being transferred to intensive care. Unlike previous studies that focused only on the risk of unplanned ICU transfers within a pre-defined fixed prediction window (e.g., 48 hours or 7 days after admission), this invention's prediction model achieves continuous monitoring and dynamic prediction of risk through a real-time data dynamic adjustment mechanism. This innovation not only improves the model's adaptability and sensitivity but also fills the gap in continuous unplanned ICU transfer risk prediction for pediatric inpatients in general wards, providing more accurate decision support for clinical practice and possessing significant technical advantages and clinical application value.

Claims

1. A method for predicting the risk of unplanned ICU transfer in hospitalized patients based on extremely imbalanced data, characterized in that, Includes the following steps: S1: Collect continuous medical data of hospitalized patients, construct a sample based on the medical data of patients within a preset observation window before the prediction time point, and use whether the patient corresponding to the sample has an unplanned transfer to the ICU within a preset prediction window after the prediction time point as a label; S2: Preprocess the diagnostic data in the sample. The preprocessing includes outlier identification and processing, missing value imputation and numerical transformation to obtain the preprocessed dataset. S3: Construct composite combined features based on the preprocessed dataset. The composite combined features include at least the missing feature reflecting the degree of variable missingness, the test intensity feature reflecting the coverage of laboratory test items or the frequency of tests, and the physiological state representation feature obtained based on the combination of multiple original diagnostic and treatment indicators. S4: Construct a feature dataset using composite combined features, divide the feature dataset into a training set and an internal validation set, and use independent data from different campuses for external validation; perform feature filtering on the training set for the original features and the composite combined features to obtain a subset of candidate features; S5: Train an initial risk prediction model on the training set based on the candidate feature subset, and use the initial risk prediction model to score the risk of negative samples in the training set in order to identify high-risk negative samples that are close to the boundary of positive samples or are easily misjudged. S6: Based on the risk score, select hard negative samples from the negative samples, and combine the hard negative samples with the positive samples to construct an enhanced training set; The final risk prediction model is trained based on the enhanced training set to improve the ability of the final risk prediction model to distinguish minority class samples and difficult-to-distinguish negative class samples in extremely imbalanced data. S7: Evaluate the performance of the final risk prediction model using the internal validation set, and determine the discrimination threshold for risk warning based on the internal validation results; S8: Input independent external validation data from different hospital areas into the final risk prediction model for external validation to evaluate the generalization performance of the final risk prediction model; and apply the externally validated final risk prediction model to the patient's real-time diagnosis and treatment data to output the risk probability or risk level of the patient's unplanned transfer to the ICU within the preset prediction window.

2. The method for predicting the risk of unplanned ICU transfer for hospitalized patients based on extremely imbalanced data according to claim 1, characterized in that, The method for outlier identification and processing is as follows: Calculate the mean of treatment data for the same patient over different days. μ Difference between standard bricks σ Using the mean μ Difference between standard bricks σ Calculate the lower threshold of the normal range. μ -3 σ and upper threshold μ +3 σ If the diagnostic data is outside the normal range, it is considered an outlier and deleted; otherwise, it is considered normal and retained.

3. The method for predicting the risk of unplanned transfer to ICU for hospitalized patients based on extremely imbalanced data according to claim 1, characterized in that, The method for deleting outliers from the dataset is as follows: Calculate the first quartile Q1 and the third quartile Q3 of the normal range of treatment data for the same patient at different times, and then calculate the interquartile range IQR = Q3 - Q1. The lower edge of the normal range is Q1 - 1.5 × IQR, and the upper edge is Q3 + 1.5 × IQR. If the treatment data is not outside this range, it is considered an outlier.

4. The method for predicting the risk of unplanned ICU transfer for hospitalized patients based on extremely imbalanced data according to claim 1, characterized in that, The composite feature constructed in step S3 includes at least one of the following features: Total number of missing variables in the sample, count of non-missing variables in the pre-set test panel, count of missing variables in the pre-set test panel, number of test items covered per unit time, test frequency per unit time, summary index of abnormal vital signs, and combined characteristics of infection-related indicators.

5. The method for predicting the risk of unplanned ICU transfer for hospitalized patients based on extremely imbalanced data according to claim 1, characterized in that, The feature selection in step S4 uses the Lasso regression algorithm to perform sparse selection on the original features and the composite features, retaining features whose feature weights are not zero or whose absolute values ​​are greater than a preset threshold as the candidate feature subset.

6. The method for predicting the risk of unplanned ICU transfer for hospitalized patients based on extremely imbalanced data according to claim 1, characterized in that, The hard negative sample mining method in steps S5 and S6 is as follows: The negative samples are sorted according to the predicted probability of the negative samples output by the initial risk prediction model. The negative samples with a predicted probability higher than a preset threshold or ranked in the top K positions are selected as hard negative samples. The hard negative samples are then combined with all or part of the positive samples to construct an enhanced training set for training the final risk prediction model.

7. The method for predicting the risk of unplanned ICU transfer for hospitalized patients based on extremely imbalanced data according to claim 1, characterized in that, The initial risk prediction model and the final risk prediction model are any one or more of the following: tree-based ensemble learning model, logistic regression model, support vector machine model, or neural network model.