A model construction method for predicting postoperative complications in patients with gastrointestinal tumors
Through standardized data processing and introduction of neural networks, Bootstrap technology and variable point detection methods, key time-dependent characteristics in the postoperative complication model of gastrointestinal tumor patients are evaluated and adjusted, and the problems of feature extraction instability and data complexity are solved. Improved the accuracy and adaptability of the predictive model.
Patent Information
- Application Number
- CN202411269931.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-09-11
AI Technical Summary
The existing postoperative complication prediction model for gastrointestinal tumor patients has instability and data complexity problems in feature extraction and stability assessment, affecting the robustness and reliability of the model.
Using standardized data processing, gate mechanism introduced into neural networks, Bootstrap technology and variable point detection methods, the stability and time dependence of key time-dependent features are evaluated through multiple resampling and divergence analysis, and dynamically adjust feature weights to ensure that The credibility of features and the adaptability of the model.
It improves the accuracy and practicality of the prediction model, enhances the sensitivity and adaptability of the model to time changes, and significantly improves the accuracy of postoperative complication prediction and the reliability of clinical application.
Smart Images

Figure CN118800473B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical data processing, and more specifically, to a model construction method for predicting postoperative complications in patients with gastrointestinal tumors. Background Art
[0002] The construction of a prediction model for postoperative complications in patients with gastrointestinal tumors refers to extracting key features related to postoperative complications based on clinical data collected from patients before, during and after surgery using statistical methods, machine learning algorithms and time series analysis techniques, and inputting these features into the prediction model to predict possible complications after surgery. The model aims to identify high-risk patients through the analysis of a large amount of patient data and provide support for clinical decision-making, thereby improving the quality of postoperative management of patients, reducing the incidence of complications and improving patient prognosis. For example, in the invention of a nomogram model and construction method for predicting the probability of postoperative complications in patients with gastrointestinal tumors with publication number CN114822821A, factors significantly correlated with postoperative complications are obtained through analysis and selection of patient clinical characteristic data, and the corresponding nomogram model is further constructed; two nomogram models are provided, which are respectively used to predict the probability of complications in patients with gastrointestinal tumors within 7 days and 30 days after surgery, so as to achieve the purpose of early identification of high-risk groups for postoperative complications and early intervention; the model has high prediction accuracy and discrimination, is simple, intuitive, and easy to promote and apply clinically, which can assist doctors in early judgment of the occurrence of postoperative complications in patients with gastrointestinal tumors, and at the same time facilitate clinicians to carry out individualized management of gastrointestinal tumor diseases.
[0003] In the process of constructing a prediction model for postoperative complications in patients with gastrointestinal tumors, the processing and feature extraction of time series data of comprehensive data of patients with gastrointestinal tumors are key steps. Time series data contains a lot of information about the health changes of patients after surgery, which is of great significance for predicting the occurrence of complications.
[0004] In feature extraction from time series data, if the accuracy of the extracted features cannot be accurately evaluated, the performance of the selected features in the model may be unstable. This instability will lead to unreasonable dependence of the prediction model on the features, which in turn affects the overall prediction performance and reliability of the model. In addition, when faced with the diversity and complexity of data, existing methods lack systematic analysis tools to effectively screen and verify these key time-dependent features. This deficiency not only affects the quality of feature selection, but also weakens the robustness and reliability of the model in practical applications.
[0005] In order to solve the above problems, a technical solution is now provided. Summary of the invention
[0006] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a method for constructing a model for predicting postoperative complications in patients with gastrointestinal tumors to solve the problems raised in the above-mentioned background technology.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] A method for constructing a model to predict postoperative complications in patients with gastrointestinal tumors comprises the following steps:
[0009] S1: Collect comprehensive data of patients with gastrointestinal tumors, including preoperative data, intraoperative data, and postoperative data;
[0010] S2: Standardize the comprehensive data collected from patients with gastrointestinal tumors and establish a comprehensive data set;
[0011] S3: Extract key time-dependent features from comprehensive data sets using statistical methods and time series analysis techniques; introduce a gating mechanism in a neural network to dynamically adjust the weights of key time-dependent features at different time points;
[0012] S4: Bootstrap technology is used to resample the comprehensive data set, and the stability of key time-dependent features is evaluated by combining KL divergence and JS divergence by extracting key time-dependent features multiple times;
[0013] S5: Introduce change point detection method to evaluate whether the time dependence of key time-dependent features changes significantly over time;
[0014] S6: Based on step S4 and step S5, it is comprehensively determined whether the credibility of the extracted key time-dependent features meets the requirements.
[0015] In a preferred embodiment, the collected comprehensive data of gastrointestinal tumor patients are standardized to establish a comprehensive data set, specifically:
[0016] Integrate preoperative data, intraoperative data, and postoperative data into a unified database;
[0017] Convert all data into a unified format; unify the dimensions of numerical data; identify missing values in the data and fill them in;
[0018] Encode categorical data; normalize numerical data;
[0019] The processed data are compiled into a final comprehensive dataset for subsequent model training and analysis.
[0020] In a preferred embodiment, statistical methods and time series analysis techniques are used to extract key time-dependent features from a comprehensive data set; a gating mechanism in a neural network is introduced to dynamically adjust the weights of key time-dependent features at different time points, specifically including:
[0021] S301: Apply an autoregressive moving average model to extract basic time-dependent features from a comprehensive dataset;
[0022] S302: Use Fourier transform analysis to identify periodic and trend characteristics in comprehensive data;
[0023] S303: Using gated recurrent units to process and optimize key time-dependent features of time series data:
[0024] The update gate of the gated recurrent unit is expressed as: ; The reset gate of the gated recurrent unit is expressed as: ;in, and They are update gate and reset gate respectively. is the hidden state at the previous moment, is the current input, and They are the weight matrices of the update gate and the reset gate respectively; is the Sigmoid activation function;
[0025] Use Adam optimizer to train the GRU model;
[0026] S304: Integrate the attention mechanism in the neural network to dynamically adjust the weights of key time-dependent features at each time point based on the performance of the model during training:
[0027] Assign weights according to the importance of each time step. The specific formula is: ;in, It is used to calculate the weighted sum of each element in the input sequence. is the query matrix, is the key matrix, is the value matrix, is the Softmax activation function, The query matrix With key matrix The dot product of the transposed matrix of is the key matrix Dimension.
[0028] In a preferred embodiment, the Bootstrap technique is used to resample the comprehensive data set, and the stability of the key time-dependent features is evaluated by extracting the key time-dependent features multiple times and combining the KL divergence and the JS divergence, which specifically includes:
[0029] S401: Apply Bootstrap technology to resample the comprehensive data set multiple times: determine the number of resampling, and for each resampling, generate a sample set by randomly selecting multiple data points from the original comprehensive data set;
[0030] S402: extracting key time-dependent features in each resampled sample set: applying predefined statistical methods and time series analysis techniques to extract key time-dependent features in each resampled sample set;
[0031] S403: Estimating the probability distribution of the features extracted after each resampling, and establishing the feature distribution of each resampling:
[0032] Common methods for estimating the probability distribution of extracted key time-dependent features include using kernel density estimation and histograms to estimate the probability distribution of features;
[0033] By estimating the probability distribution of the features in each resampled sample, the feature distribution of each resampled sample set is constructed;
[0034] S404: Use KL divergence to calculate the difference between the feature distribution of each resampled sample and the original data to measure the feature consistency; use JS divergence to evaluate the similarity between the feature distribution of the resampled sample and the original data to measure the difference of the features;
[0035] S405: Combine KL divergence and JS divergence to calculate dynamic Bootstrap consistency and difference measures to evaluate the stability of key time-dependent features.
[0036] In a preferred embodiment, step S404 is specifically as follows:
[0037] Use KL divergence to calculate the difference between each resampled sample and the original data feature distribution. The formula is: ;
[0038] is the KL divergence, The features in the original data The probability distribution value of For the The corresponding features in the resampling The probability distribution value of Key time-dependent features No. A value;
[0039] The JS divergence is used to evaluate the similarity between the resampled samples and the original data feature distribution. The formula is: ;in, ;
[0040] is the JS divergence, is the original data feature distribution Distribution with mean The KL divergence between For the The resampled feature distribution Distribution with mean The KL divergence between is the original data characteristic distribution, For the Resample feature distributions.
[0041] In a preferred embodiment, step S405 is specifically: by comprehensively considering KL divergence and JS divergence, the dynamic Bootstrap consistency and difference measure of the key time-dependent features is calculated; the formula is: ;in, is the stability measure of the feature, is the total number of resamplings.
[0042] In a preferred embodiment, a change point detection method is introduced to evaluate whether the time dependency of key time-dependent features changes significantly over time, specifically including:
[0043] S501: construct key time-dependent features as time series in the time dimension;
[0044] S502: Using Bayesian change point detection to identify potential change points in the time series: defining the prior distribution of the Bayesian model, the model uses the posterior probability to evaluate the possibility of each time point as a change point; calculating the Bayesian posterior probability through a dynamic programming algorithm to identify potential change points in the time series;
[0045] S503: Divide the time series into windows and calculate the stability of the detection features in different time periods through sliding windows: set the window size and divide the time series into multiple subsequences according to the window; in each window, calculate the local mean and variance of the key time-dependent features to evaluate the stability of the features in different time periods;
[0046] S504: Perform a significance test on the detected potential change points to evaluate whether the change points are statistically significant;
[0047] S505: In combination with the change point detection results, evaluate whether the time dependence of the key time-dependent features has changed significantly: integrate the change point information verified by the significance test into the time series analysis results; evaluate whether the time dependence of the key time-dependent features has changed significantly at the detected change points; based on the results of the change point detection and time dependence evaluation, determine whether the time dependence of the key time-dependent features remains stable throughout the time series.
[0048] In a preferred embodiment, based on step S4 and step S5, it is comprehensively judged whether the credibility of the extracted key time-dependent features meets the standard, specifically:
[0049] Obtaining the judgment result of whether the time dependency of the key time-dependent feature changes significantly over time;
[0050] Set the feature stability assessment threshold corresponding to the feature stability measure, and compare the feature stability measure with the feature stability assessment threshold:
[0051] When the stability measure of the feature is less than or equal to the feature stability assessment threshold, the stability of the key time dependent feature is judged to be normal; when the stability measure of the feature is greater than the feature stability assessment threshold, the stability of the key time dependent feature is judged to be poor;
[0052] When the time dependency of the key time dependent feature does not change significantly over time and the stability of the key time dependent feature is normal, the credibility of the extracted key time dependent feature is determined to be up to standard; otherwise, the credibility of the extracted key time dependent feature is determined to be not up to standard.
[0053] Technical effects and advantages of a model construction method for predicting postoperative complications in patients with gastrointestinal tumors of the present invention:
[0054] 1. By integrating and analyzing the preoperative, intraoperative and postoperative data of patients with gastrointestinal tumors, a solid foundation is provided for the accurate prediction of postoperative complications. Through standardized processing, the consistency and comparability of the data are ensured, and the accuracy and efficiency of subsequent analysis are improved. The use of statistical methods and time series analysis techniques, combined with the gating mechanism in the neural network, enhances the depth of data analysis and improves the sensitivity and adaptability of the model to time changes. These processes ensure that the key features extracted from complex medical data can truly reflect the patient's health status and postoperative risks, thereby greatly improving the accuracy and practicality of the prediction model.
[0055] 2. By introducing Bootstrap technology and change point detection methods, the analysis accuracy and credibility of key time-dependent features are further enhanced. Bootstrap technology provides a scientific method to quantify feature stability by resampling the data set multiple times, combined with KL divergence and JS divergence analysis. This method effectively identifies features that remain consistent under different conditions, thereby screening out more reliable predictive indicators. Change point detection enables the model to identify key change points in the data and accurately evaluate the time dependency of features. The application of these technologies significantly enhances the adaptability and predictive power of the model in actual clinical environments, greatly helping medical professionals in postoperative risk management and treatment decisions, aiming to reduce patients' risk of complications and improve their postoperative recovery. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 This is a schematic diagram of a model construction method for predicting postoperative complications in patients with gastrointestinal tumors according to the present invention. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] Example
[0059] Figure 1 The present invention provides a model construction method for predicting postoperative complications in patients with gastrointestinal tumors, which comprises the following steps:
[0060] S1: Collect comprehensive data of patients with gastrointestinal tumors, including preoperative data, intraoperative data, and postoperative data.
[0061] S2: Standardize the comprehensive data collected from patients with gastrointestinal tumors and establish a comprehensive dataset.
[0062] S3: Use statistical methods and time series analysis techniques to extract key time-dependent features from a comprehensive dataset; introduce a gating mechanism in a neural network to dynamically adjust the weights of key time-dependent features at different time points.
[0063] S4: Bootstrap technology is used to resample the comprehensive data set, and the key time-dependent features are extracted multiple times. The stability of the key time-dependent features is evaluated by combining KL divergence and JS divergence.
[0064] S5: A change point detection method is introduced to evaluate whether the time dependence of key time-dependent features changes significantly over time.
[0065] S6: Based on step S4 and step S5, it is comprehensively determined whether the credibility of the extracted key time-dependent features meets the requirements.
[0066] Collect comprehensive data of patients with gastrointestinal tumors, including preoperative data, intraoperative data, and postoperative data, including:
[0067] Preoperative data collection includes:
[0068] Basic information: including the patient's age, gender, weight, height, race, and family medical history.
[0069] Medical history information: including past medical history, medication use records, allergy history, etc.
[0070] Laboratory test results: blood tests, biochemical indicators, tumor markers, etc.
[0071] Imaging data: such as CT, MRI, X-ray and ultrasound examination results, especially imaging data of the gastrointestinal area.
[0072] Pathology report: tumor histological type, degree of differentiation, TNM staging, etc.
[0073] Preoperative data acquisition methods include:
[0074] Electronic medical record system: extract medical history and basic information data from the hospital's electronic medical record system.
[0075] Laboratory Information System: Obtain test results of various biochemical indicators and tumor markers from the laboratory information system.
[0076] Picture Archiving and Communication System (PACS): Export tumor-related imaging data from the PACS system.
[0077] Intraoperative data collection includes:
[0078] Surgery details: including surgery date, surgery duration, surgery type (e.g., resection, anastomosis, etc.).
[0079] Anesthesia information: type of anesthesia, medication, anesthesiologist’s evaluation report.
[0080] Monitoring data: monitoring data of vital signs such as heart rate, blood pressure, and body temperature during surgery.
[0081] Surgical records: key events and decisions during the operation, such as blood loss, fluid input and output, etc.
[0082] Intraoperative data acquisition methods include:
[0083] Operating Room Recording System: Access surgical details and surgical records through the operating room recording system.
[0084] Anesthesia Information Management System: Extract anesthesia related data from the Anesthesia Information Management System.
[0085] Physiological Monitoring Devices: Directly export intraoperative monitoring data from connected physiological monitoring devices.
[0086] Postoperative data collection included:
[0087] Recovery status: including the length of stay in the postoperative recovery room and transfer to the intensive care unit (ICU).
[0088] Postoperative complications: Record the occurrence of all known complications, such as infection, bleeding, intestinal obstruction, etc.
[0089] Follow-up data: Review results during the follow-up period, including laboratory tests, imaging reviews, etc.
[0090] Vital signs: including postoperative body temperature, heart rate, blood pressure and other monitoring data.
[0091] Postoperative data acquisition methods include:
[0092] Ward Management System: Obtain postoperative recovery status and vital signs data from the ward management system.
[0093] Follow-up records: Data obtained through regular follow-up, including repeated laboratory and imaging results.
[0094] Through the above methods, it can be ensured that the collected data is comprehensive and detailed, covering all stages of the patient's treatment process, thereby providing strong data support for building a predictive model.
[0095] The comprehensive data collected from patients with gastrointestinal tumors were standardized to establish a comprehensive data set, specifically:
[0096] Integrate preoperative data, intraoperative data, and postoperative data into a unified database to ensure consistency of data sources.
[0097] Convert all data to a uniform format, such as unifying all date formats to YYYY-MM-DD: For date and time data, set conversion rules to convert all inputs to the international standard date format ISO 8601 (YYYY-MM-DD) to eliminate regional differences.
[0098] Unify the dimensions of numerical data, such as converting weight from pounds to kilograms: During the database import process, a dimension conversion module is integrated, which automatically identifies the data unit and converts it according to the preset conversion formula (such as 1 pound = 0.453592 kilograms). A manual correction function is provided to allow data administrators to correct automatic conversion errors when they are found.
[0099] Identify missing values in data and fill them with interpolation or mean values: Use advanced statistical interpolation methods, such as Multiple Imputation or K-Nearest Neighbor (K-NN) algorithms, to automatically identify and fill missing values. Set up outlier detection algorithms, such as the Z-score method based on standard deviation or the IQR method based on quartiles, to automatically identify and correct outliers in the data.
[0100] Encode categorical data, such as using one-hot encoding to convert gender and surgery type: Use machine learning libraries such as Python's Pandas or Scikit-learn to implement one-hot encoding to process categorical data. Apply one-hot encoding to categorical variables such as gender and surgery type to convert them into numerical format for algorithm processing.
[0101] Normalize numerical data using Min-Max or Z-score normalization methods: Use Min-Max normalization to scale numerical data to the [0, 1] interval, or use Z-score normalization to convert the data into a distribution with zero mean and unit variance. Set up a regular review mechanism to ensure that the normalization process does not affect the statistical characteristics of the data.
[0102] The processed data are compiled into a final comprehensive dataset for subsequent model training and analysis.
[0103] Key time-dependent features are those that show significant correlation or dependence over time, and they are essential for understanding and predicting patterns and trends in time series data. During data analysis and model building, these features can help us identify important time-related dynamics in the data, such as trends, cyclical changes, seasonal patterns, etc. For example, in a model for predicting postoperative complications in patients with gastrointestinal tumors, key time-dependent features may include changes in physiological parameters during postoperative recovery (such as patterns of changes in heart rate and blood pressure), or time series changes in laboratory test results (such as white blood cell counts and hemoglobin levels). These features become key indicators in the model by showing temporal correlation with the development of complications, providing support for prediction and treatment decisions.
[0104] Statistical methods and time series analysis techniques are used to extract key time-dependent features from comprehensive data sets. The gating mechanism in the neural network is introduced to dynamically adjust the weights of key time-dependent features at different time points, including:
[0105] S301: Apply an autoregressive moving average model to extract basic time-dependent features from a comprehensive dataset:
[0106] Select the Autoregressive Moving Average model (ARMA), which consists of an autoregressive (AR) part and a moving average (MA) part and is used to analyze and predict linear dependencies in time series data.
[0107] The order of the AR part and the order of the MA part are selected by analyzing the autocorrelation function (ACF) and partial autocorrelation function (PACF) plots. Specifically, ACF is used to identify the MA component and PACF is used to identify the AR component. The order selection criterion is that the ACF or PACF drops significantly at a certain lag order.
[0108] In order to ensure the stationarity of the time series, the original data is differentiated. The order of the difference is determined by testing the unit root of the series (such as Dickey-Fuller test) to ensure that the trend component in the data is eliminated.
[0109] After selecting the order of the AR part and the order of the MA part, the maximum likelihood estimation (MLE) is used to fit the autoregressive moving average model to solve the optimal values of the coefficients of the autoregressive part and the moving average part.
[0110] By checking the autocorrelation of the model residuals, we can ensure that the residuals are white noise and verify the validity of the model. If the residuals show significant autocorrelation, it means that the model may not be sufficient to capture the dependencies in the data, and the order of the AR part and the order of the MA part need to be adjusted.
[0111] S302: Use Fourier transform analysis to identify periodic and trend characteristics in comprehensive data:
[0112] Fourier transform is used to convert time domain signals into frequency domain signals.
[0113] The differenced data is windowed (e.g., Hamming window) to reduce the spectrum leakage effect. The choice of window function aims to balance frequency resolution and sidelobe suppression.
[0114] In the spectrum graph, periodic features appear as significant peaks in the frequency domain. By identifying these peaks and calculating the corresponding periods, significant periodic features in the data are determined. Low-frequency components in the spectrum usually reflect long-term trends. By analyzing low-frequency components, trend features in the time series can be extracted. The extracted periodic and trend features are inversely transformed, restored to the time domain, and compared with the original data to ensure that the extracted features are consistent with the patterns in the actual data.
[0115] S303: Using gated recurrent units to process and optimize key time-dependent features of time series data:
[0116] The Gated Recurrent Unit (GRU) is an improved recurrent neural network (RNN). Its main advantage is that it manages the transmission and memory of information through a gating mechanism, avoiding the gradient vanishing problem in long sequence training. The update gate of the GRU is expressed as: ; The reset gate of the gated recurrent unit is expressed as: ;in, and They are update gate and reset gate respectively. is the hidden state at the previous moment, is the current input, and They are the weight matrices of the update gate and the reset gate respectively; It is a Sigmoid activation function, and the output value is between 0 and 1, indicating the activation degree of the update gate.
[0117] The time-dependent features extracted from ARMA and Fourier transform are used as the input of the GRU model. The dataset is divided into a training set and a validation set, where the training set is used for model weight adjustment and the validation set is used to evaluate the generalization ability of the model.
[0118] The GRU model is trained using the Adam optimizer. The Adam optimizer can adaptively adjust the learning rate using the formula: ;
[0119] in, is the learning rate, which indicates the step size of each parameter update. It is usually a preset hyperparameter used to control the magnitude of the update.
[0120] is the bias correction of the first-order moment estimate and represents the momentum term of the gradient (i.e., the exponentially weighted moving average of the gradient).
[0121] is the bias correction of the second-order moment estimate and represents the momentum term of the squared gradient (i.e., the exponentially weighted moving average of the squared gradient).
[0122] is a smoothing term, usually taking a very small value (such as ), which is used to prevent division by zero errors and ensure numerical stability.
[0123] The model is The parameter vector at the iteration represents the current model parameter values.
[0124] The model is The parameter vector after iterations represents the updated model parameter values.
[0125] Cross-validation is performed on the validation set to evaluate the performance of the model, focusing on the model's ability to capture dependencies on time series data. The performance of the model is optimized by adjusting the number of GRU layers and hidden units.
[0126] S304: Integrate the attention mechanism in the neural network to dynamically adjust the weights of key time-dependent features at each time point based on the performance of the model during training:
[0127] The attention mechanism allows the model to assign weights according to the importance of each time step when processing sequence data. The specific formula is: ;in,
[0128] It is a key operation in the attention mechanism, which is used to calculate the weighted sum of each element in the input sequence.
[0129] : Query matrix (Query), which represents the hidden state or features at the current moment to be queried.
[0130] : Key matrix (Key), representing the hidden state or features at all time points, for query matrix to make a match.
[0131] : Value matrix (Value), representing the key matrix The corresponding value matrix is used to calculate the attention output.
[0132] : Softmax activation function, which converts the matching score into a probability distribution and is used to determine the weight of each time point.
[0133] : Query matrix With key matrix The dot product of the transposed matrix of , representing the similarity score between the query and the key.
[0134] : Key matrix The dimension is used to normalize the dot product result to prevent the gradient from disappearing due to excessive dimension.
[0135] By changing the loss function during training, the weight parameters in the attention mechanism are adjusted in real time, allowing the model to focus on more critical time steps.
[0136] The attention mechanism is integrated into the GRU network, enabling it to dynamically adjust the weights of each time point when processing key time-dependent features. During the training process, the cross entropy loss function is used to evaluate the performance of the model at different time steps to ensure the effectiveness of the attention mechanism.
[0137] According to the results of cross-validation, the hyperparameters of the attention mechanism (such as the number of attention heads and dimensions) are further adjusted to maximize the prediction performance of the model. By comparing the performance of the model under different weight configurations, it is verified whether the introduction of the attention mechanism improves the model's ability to process time-dependent features and ensures the prediction accuracy of the model at key time points.
[0138] The Bootstrap technique is used to resample the comprehensive data set. The key time-dependent features are extracted multiple times, and the stability of the key time-dependent features is evaluated by combining KL divergence and JS divergence, including:
[0139] S401: Apply Bootstrap technology to resample the comprehensive data set multiple times to generate different sample sets to capture the variability in the data:
[0140] Bootstrap is a statistical resampling technique used to generate new sample sets by multiple random sampling of the original data set to estimate the distribution and variability of data features. Each resampling randomly extracts the same number of data points from the original data set, allowing repeated sampling, so each newly generated sample set is different from the original data set, but maintains the same data size.
[0141] In implementation, the number of resampling steps is first determined (usually hundreds to thousands). For each resampling step, the generated sample set is obtained by randomly selecting multiple data points from the original comprehensive data set.
[0142] By repeating this process, we generate sets of samples, each of which represents a variation of the original data. The purpose of this process is to capture the variability in the data so that the stability of the features can be assessed in subsequent steps.
[0143] S402: Extract key time-dependent features from each resampled sample set to ensure that these features can reflect the time correlation of the data:
[0144] In each resampled sample set, predefined statistical methods and time series analysis techniques (such as ARMA model, Fourier transform, etc.) are applied to extract these key time-dependent features. For example, an autoregressive model can be used in each sample set to identify important lag effects, or Fourier transform can be used to identify periodic features.
[0145] Ensure that the extracted features can reflect the time correlation, which is verified by examining the performance of the features at different times and their conformity with the overall pattern of the time series. Through this process, it is ensured that the extracted features still retain their time dependence in different resampled sample sets.
[0146] S403: Estimating the probability distribution of the features extracted after each resampling, and establishing the feature distribution of each resampling:
[0147] After each resampling, the probability distribution of the extracted key time-dependent features is estimated. Common methods include using kernel density estimation (KDE) and histograms to estimate the probability distribution of features. Kernel density estimation is a non-parametric method that can smoothly estimate the probability distribution of data without assuming the specific distribution form of the data.
[0148] By estimating the probability distribution of the features in each resampled sample, the feature distribution of each resampled sample set is constructed. These distribution functions describe the possible values and probabilities of the features in each resampled sample set, thus providing a basis for the subsequent feature stability evaluation.
[0149] S404: Use KL divergence to calculate the difference between the feature distribution of each resampled sample and the original data to measure the consistency of the features. Use JS divergence to evaluate the similarity between the feature distribution of the resampled sample and the original data and measure the difference of the features:
[0150] Kullback-Leibler divergence (KL divergence) is an asymmetric measure of the difference between two probability distributions. The formula is: .
[0151] KL divergence is used to measure the characteristic distribution of the original data With The resampled feature distribution The difference between . KL divergence is asymmetric, that is .
[0152] : Features in the original data The probability distribution value of The probability in the original data.
[0153] : No. The corresponding features in the resampling The probability distribution value of In the The probability of being in the resampled sample.
[0154] : Key time-dependent features No. A value, usually the value of a key time-dependent feature at different time points.
[0155] : Logarithmic function, used to calculate the characteristic distribution of the original data and the characteristic distribution of the resampled data in the characteristic The ratio of .
[0156] The consistency of features during the resampling process is measured by calculating the KL divergence between the feature distribution of each resample and the feature distribution of the original data. The smaller the KL divergence, the smaller the difference between the resampled sample and the original sample, and the more stable the feature.
[0157] Jensen-Shannon divergence (JS divergence) is a symmetric indicator used to measure the similarity of two probability distributions. The formula is: ;in, .
[0158] : Jensen-Shannon divergence (JS divergence), used to measure the characteristic distribution of the original data With The resampled feature distribution The JS divergence is symmetric, that is, .
[0159] : Original data feature distribution Distribution with mean The KL divergence between and difference.
[0160] : No. The resampled feature distribution Distribution with mean The KL divergence between and difference.
[0161] is the original data characteristic distribution, For the Resample feature distributions.
[0162] By calculating the JS divergence, the similarity between the resampled sample and the original data is evaluated. The smaller the JS divergence, the more similar the two distributions are, that is, the resampled features maintain a distribution similar to the original data.
[0163] S405: Combine KL divergence and JS divergence to calculate dynamic Bootstrap consistency and difference measures to evaluate the stability of key time-dependent features:
[0164] By comprehensively considering KL divergence and JS divergence, the dynamic Bootstrap consistency and difference measures of key time-dependent features are calculated. The formula is: .
[0165] is a stability measure of the feature, i.e., a dynamic Bootstrap consistency and difference measure, which is used to evaluate key time-dependent features. By combining the KL divergence and JS divergence, the stability of the feature under different resampling is analyzed.
[0166] : The total number of resampling, indicating how many different sample sets are generated when applying the Bootstrap technique.
[0167] The stability of the key time-dependent feature is evaluated by the stability measure of the above features. If the stability measure of the key time-dependent feature is close to zero, it means that the key time-dependent feature maintains high consistency and similarity under different resampling and has strong stability; otherwise, the stability of the key time-dependent feature is poor.
[0168] That is, the larger the stability measure of the feature, the worse the stability of the key time-dependent feature.
[0169] The change point detection method is introduced to evaluate whether the time dependence of key time-dependent features changes significantly over time, including:
[0170] S501: Construct key time-dependent features as time series in the time dimension to ensure the integrity of the basic data for time-dependent analysis:
[0171] First, the key time-dependent features extracted in the previous step are arranged in chronological order to form a time series dataset.
[0172] Integrate the data of all time points into a complete time series to ensure that the data is not missing and arranged continuously in time. Use interpolation methods to fill in possible missing values to ensure the continuity and completeness of the data.
[0173] If the time points are unevenly distributed, the time axis is normalized to make the time series have a uniform time step for subsequent analysis.
[0174] S502: Use Bayesian change point detection to identify potential change points in the time series:
[0175] Bayesian change point detection is a method based on Bayesian statistics to identify points of structural change (change points) in time series data. This method detects change points by calculating the probability of a change point occurring at each time point in the time series.
[0176] Defining the prior distribution for the Bayesian model ,in represents the possible change point location. The model uses the posterior probability Assess the likelihood of each time point being a change point, represents the observed time series data. In Bayesian statistics, Used to represent probability distribution or probability density.
[0177] The Bayesian posterior probability is calculated by dynamic programming algorithm to identify potential change points in the time series. This step ensures that all possible change points in the time series are fully analyzed.
[0178] S503: Divide the time series into windows, and calculate the stability of the detection features in different time periods through sliding windows:
[0179] Sliding window is an analysis technique that sets a fixed-length window on a time series and moves it across the entire series to capture changes in local features.
[0180] Set the window size and divide the time series into multiple subsequences according to the window. The selection of window size depends on the characteristics of the data and the accuracy requirements of the analysis. Generally, the best window size is determined by empirical rules or cross-validation.
[0181] In each window, statistics such as the local mean and variance of key time-dependent features are calculated to assess the stability of features over different time periods. This local analysis can capture short-term changes that may be overlooked in global analysis.
[0182] S504: Perform significance test on detected potential change points to evaluate whether the change points are statistically significant and avoid false detection:
[0183] In order to avoid mistaking random fluctuations for change points, it is necessary to perform significance tests on the detected change points. Commonly used methods include t-test, chi-square test or likelihood ratio-based test.
[0184] Compare the time period of the detected change point with the data of the previous and next time periods, and use a significance test to test whether the change point is statistically significant. For example, use a t-test to compare the mean difference between the two time periods before and after the change point, or use a likelihood ratio test to evaluate the significant difference in model fit before and after the change point.
[0185] If the p-value of the significance test is less than the preset significance level (such as 0.05), the change point is considered to be statistically significant. Otherwise, it is considered that the change point may be a false detection caused by noise and should be eliminated.
[0186] S505: Combined with the change point detection results, evaluate whether the time dependency of the key time-dependent features has changed significantly:
[0187] The change point information verified by significance testing is integrated into the time series analysis results as the basis for judging time-dependent changes.
[0188] Evaluate whether the time dependency of the key time-dependent feature has changed significantly at the detected change point. Specifically, by comparing the feature mean, variance or other statistical features before and after the change point, it can be determined whether the time dependency of the feature has changed significantly at the change point.
[0189] Based on the results of change point detection and time dependency assessment, it is determined whether the time dependency of key time-dependent features remains stable throughout the time series. If significant time dependency changes are found, further analysis is required on their possible causes and impact on the model.
[0190] Based on step S4 and step S5, it is comprehensively judged whether the credibility of the extracted key time-dependent features meets the standard, specifically:
[0191] By comparing the stability measure with the set threshold, the stability level of the feature can be quantified; at the same time, by evaluating whether the time dependency has changed significantly, the consistency of the feature's performance in different time periods can be determined. The combination of the two can comprehensively evaluate the credibility of key time-dependent features and ensure that the features ultimately used in the model have high reliability.
[0192] Obtain the judgment result of whether the time dependence of the key time-dependent feature changes significantly over time.
[0193] Set the feature stability assessment threshold corresponding to the feature stability measure, and compare the feature stability measure with the feature stability assessment threshold:
[0194] When the stability measure of a feature is less than or equal to the feature stability assessment threshold, the stability of the key time-dependent feature is determined to be normal.
[0195] When the stability measure of a feature is greater than the feature stability assessment threshold, the stability of the critical time-dependent feature is determined to be poor.
[0196] When the time dependency of the key time dependent feature does not change significantly over time and the stability of the key time dependent feature is normal, the credibility of the extracted key time dependent feature is determined to be up to standard; otherwise, the credibility of the extracted key time dependent feature is determined to be not up to standard.
[0197] Combining the two important factors of stability and time dependence, and setting clear evaluation criteria and thresholds, a comprehensive evaluation of features can be achieved. This method not only improves the accuracy and rigor of the evaluation, but also enhances the comprehensive understanding of the features through multi-dimensional analysis, avoiding the deviation that may be caused by a single indicator.
[0198] Among them, the setting of the feature stability assessment threshold should be based on empirical data in actual application scenarios or determined through cross-validation methods. Specifically, historical data can be statistically analyzed to calculate the distribution of feature stability measures and select a reasonable quantile (such as the 95th percentile) as the threshold. In addition, the threshold can be adjusted through multiple experiments to ensure that stable and unstable features can be effectively distinguished in actual applications, thereby improving the overall performance of the model.
[0199] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.
[0200] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or may be transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium may be a solid-state hard disk.
[0201] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0202] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0203] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0204] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, and may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0205] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0206] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0207] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0208] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A model construction method for predicting postoperative complications in patients with gastrointestinal tumors. It is characterized in that The steps include: S1: Collect comprehensive data of patients with gastrointestinal tumors, including preoperative data, intraoperative data, and postoperative data; S2: Standardize the comprehensive data collected from patients with gastrointestinal tumors and establish a comprehensive data set; S3: Extract key time-dependent features from comprehensive datasets using statistical methods and time series analysis techniques; introduce The gating mechanism in the neural network dynamically adjusts the weights of key time-dependent features at different time points; S4: Bootstrap technology is used to resample the comprehensive data set, and the stability of key time-dependent features is evaluated by combining KL divergence and JS divergence by extracting key time-dependent features multiple times; S5: Introduce change point detection method to evaluate whether the time dependence of key time-dependent features changes significantly over time; S6: Based on step S4 and step S5, it is comprehensively determined whether the credibility of the extracted key time-dependent features meets the requirements; Utilize statistical methods and time series analysis techniques to extract key time-dependent features from comprehensive datasets; The gating mechanism in the neural network is introduced to dynamically adjust the weights of key time-dependent features at different time points, including: S301: Apply an autoregressive moving average model to extract basic time-dependent features from a comprehensive dataset; S302: Use Fourier transform analysis to identify periodic and trend characteristics in comprehensive data; S303: Using gated recurrent units to process and optimize key time-dependent features of time series data: The update gate of the gated recurrent unit is expressed as: ; The reset gate of the gated recurrent unit is expressed as: ;in, and They are update gate and reset gate respectively. is the hidden state at the previous moment, is the current input, and They are the weight matrices of the update gate and the reset gate respectively; is the Sigmoid activation function; Use Adam optimizer to train the GRU model; S304: Integrate the attention mechanism in the neural network to dynamically adjust the weights of key time-dependent features at each time point based on the performance of the model during training: Assign weights according to the importance of each time step. The specific formula is: ;in, It is used to calculate the weighted sum of each element in the input sequence. is the query matrix, is the key matrix, is the value matrix, is the Softmax activation function, The query matrix With key matrix The dot product of the transposed matrix of is the key matrix Dimensions; The Bootstrap technique is used to resample the comprehensive data set. The key time-dependent features are extracted multiple times, and the stability of the key time-dependent features is evaluated by combining KL divergence and JS divergence, including: S401: Apply Bootstrap technology to resample the comprehensive data set multiple times: determine the number of resampling, and for each resampling, generate a sample set by randomly selecting multiple data points from the original comprehensive data set; S402: extracting key time-dependent features in each resampled sample set: applying predefined statistical methods and time series analysis techniques to extract key time-dependent features in each resampled sample set; S403: Estimating the probability distribution of the features extracted after each resampling, and establishing the feature distribution of each resampling: Common methods for estimating the probability distribution of extracted key time-dependent features include using kernel density estimation and histograms to estimate the probability distribution of features; By estimating the probability distribution of the features in each resampled sample, the feature distribution of each resampled sample set is constructed; S404: Use KL divergence to calculate the difference between the feature distribution of each resampled sample and the original data to measure the feature consistency; use JS divergence to evaluate the similarity between the feature distribution of the resampled sample and the original data to measure the difference of the features; S405: Combine KL divergence and JS divergence to calculate dynamic Bootstrap consistency and difference measures to evaluate the stability of key time-dependent features; Step S404 is specifically as follows: Use KL divergence to calculate the difference between each resampled sample and the original data feature distribution. The formula is: ; is the KL divergence, The features in the original data The probability distribution value of For the The corresponding features in the resampling The probability distribution value of Key time-dependent features No. A value; The JS divergence is used to evaluate the similarity between the resampled samples and the original data feature distribution. The formula is: ;in, ; is the JS divergence, is the original data feature distribution Distribution with mean The KL divergence between For the The resampled feature distribution Distribution with mean The KL divergence between is the original data characteristic distribution, For the sub-resampled feature distribution; Step S405 is specifically: by comprehensively considering KL divergence and JS divergence, the dynamic Bootstrap consistency and difference measure of the key time-dependent features is calculated; the formula is: ;in, is the stability measure of the feature, is the total number of resampling times; The change point detection method is introduced to evaluate whether the time dependence of key time-dependent features changes significantly over time, including: S501: construct key time-dependent features as time series in the time dimension; S502: Using Bayesian change point detection to identify potential change points in the time series: defining the prior distribution of the Bayesian model, the model uses the posterior probability to evaluate the possibility of each time point as a change point; calculating the Bayesian posterior probability through a dynamic programming algorithm to identify potential change points in the time series; S503: Divide the time series into windows and calculate the stability of the detection features in different time periods through sliding windows: set the window size and divide the time series into multiple subsequences according to the window; in each window, calculate the local mean and variance of the key time-dependent features to evaluate the stability of the features in different time periods; S504: Perform a significance test on the detected potential change points to evaluate whether the change points are statistically significant; S505: In combination with the change point detection results, evaluate whether the time dependency of the key time-dependent features has changed significantly: integrate the change point information verified by the significance test into the time series analysis results; evaluate whether the time dependency of the key time-dependent features has changed significantly at the detected change points; based on the results of the change point detection and time dependency evaluation, determine whether the time dependency of the key time-dependent features remains stable throughout the time series.
2. A method for constructing a model for predicting postoperative complications in patients with gastrointestinal tumors according to claim 1, It is characterized in that The comprehensive data collected from patients with gastrointestinal tumors were standardized to establish a comprehensive data set, specifically: Integrate preoperative data, intraoperative data, and postoperative data into a unified database; Convert all data into a unified format; unify the dimensions of numerical data; identify missing values in the data and fill them in; Encode categorical data; Normalize numerical data; The processed data are compiled into a final comprehensive dataset for subsequent model training and analysis.
3. A method for constructing a model for predicting postoperative complications in patients with gastrointestinal tumors according to claim 1, It is characterized in that Based on step S4 and step S5, it is comprehensively judged whether the credibility of the extracted key time-dependent features meets the standard, specifically: Obtaining the judgment result of whether the time dependency of the key time-dependent feature changes significantly over time; Set the feature stability assessment threshold corresponding to the feature stability measure, and compare the feature stability measure with the feature stability assessment threshold: When the stability measure of the feature is less than or equal to the feature stability assessment threshold, the stability of the key time dependent feature is judged to be normal; when the stability measure of the feature is greater than the feature stability assessment threshold, the stability of the key time dependent feature is judged to be poor; When the time dependency of the key time-dependent feature does not change significantly over time and the stability of the key time-dependent feature is normal, it is determined that the credibility of the extracted key time-dependent feature meets the standard; Otherwise, it is determined that the extracted key time-dependent features do not meet the reliability standards.
