A method for identifying a key factor of postoperative sleep disorder
By using multi-model fusion and four-quadrant analysis of feature consistency index, the problem of unstable identification conclusions of key factors of postoperative sleep disorders was solved, and the accurate identification and quantitative evaluation of key factors were achieved, thus improving the reliability and diagnostic accuracy of clinical applications.
Patent Information
- Application Number
- CN202511403989.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2045-09-29
AI Technical Summary
Traditional methods struggle to systematically integrate the important results from multiple models and approaches, leading to unstable conclusions in identifying key factors of postoperative sleep disorders. The lack of quantitative assessment of the importance and stability of these features affects the reliability and accuracy of clinical applications.
A multi-model fusion approach is adopted to calculate feature importance through various feature importance assessment methods (such as SHAP, permutation importance, gradient boosting decision tree model built-in gain importance, etc.), and combine feature consistency index and stability index to conduct four-quadrant analysis to identify key factors.
It improves the reliability and robustness of key factor identification, provides a quantitative assessment of the stability of feature importance conclusions, supports the construction of clinical prediction models and intervention optimization, and enhances diagnostic accuracy and patient management efficiency.
Smart Images

Figure CN120873703B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of medical informatics, and particularly relates to a postoperative sleep disorder key factor identification method. BACKGROUND
[0002] Postoperative sleep disorder (POSD) is a common complication in clinical practice, which is characterized by sleep structure disorder, decreased sleep efficiency, difficulty falling asleep and frequent awakenings. It not only affects the comfort of patients, but also is associated with delayed wound healing, increased risk of infection, postoperative delirium and other adverse outcomes, thereby prolonging hospitalization time and increasing costs. Traditional methods based on experience or univariate statistics are difficult to cope with high-dimensional and multi-source clinical data, which limits the identification of key factors. With the popularity of electronic medical records, machine learning techniques (such as random forest, GBDT, SVM) are introduced into risk prediction, and feature importance evaluation (Gini importance, permutation importance, SHAP value, etc.) provides a new way for identifying key factors. However, single model or method has bias, and different algorithms may derive mutually contradictory factor rankings due to mechanism differences, which seriously affects the stability and convertibility of the conclusions. Although existing research has tried to alleviate the differences through average ranking and other fusion strategies, such methods ignore the ranking consistency information and cannot distinguish between "stable and consistent" and "highly controversial" features. Moreover, there is a lack of standardized tools for quantifying the stability of individual features. This deficiency makes it difficult for clinical researchers to determine which factors are truly reliable when faced with conflicting conclusions, thereby hindering the refinement and application of precise factors. In view of this, an innovative method is urgently needed to systematically integrate the importance results of multiple models and multiple methods, and to quantify and visualize the comprehensive importance and stability of each feature. This method can provide a more robust and interpretable factor identification framework for clinicians and promote the application and development of precision medicine in the field of postoperative rehabilitation. SUMMARY
[0003] The technical problem to be solved by the present application is to provide a postoperative sleep disorder key factor identification method that improves the robustness and consistency of feature evaluation through multi-model fusion, reduces the bias of single method, realizes the precise identification of postoperative sleep disorder key factors, supports the construction of clinical prediction model and the optimization of intervention, and improves the diagnostic accuracy and patient management efficiency.
[0004] The technical solution of the present application is as follows:
[0005] A postoperative sleep disorder key factor identification method, comprising the following steps:
[0006] Step 1: Data preparation and preprocessing, including data collection and data preprocessing, wherein the data collection obtains multi-dimensional data of patients from electronic medical record systems, monitoring devices or clinical databases to form a candidate feature set where n is the total number of features, and determining whether sleep disorders occur after surgery as a binary classification label; data preprocessing cleans and converts the original data, including missing value filling, outlier processing, data type conversion, and categorical feature encoding;
[0007] Step two: multi-source feature importance generation, including method selection, model training details, and importance calculation, wherein the method selection presets at least five feature importance evaluation methods with different principles; the model training details include data segmentation, hyperparameter tuning, class imbalance processing, and model evaluation; the importance calculation uses the selected method to analyze the preprocessed data, and calculates the importance of each feature , and the output result is a score value or a ranking;
[0008] Step three: feature importance and stability fusion evaluation, providing a score-based analysis path and a ranking-based analysis path, wherein the score-based analysis path includes score normalization and fusion index calculation, calculating the average importance score and feature consistency index; the ranking-based analysis path includes ranking acquisition and fusion index calculation, calculating the average ranking and feature importance stability index;
[0009] Step four: four-quadrant analysis and key factor classification, including two-dimensional visualization and quadrant division and feature classification, wherein the two-dimensional visualization constructs a scatter plot with the importance index as the X-axis and the stability index as the Y-axis; the quadrant division divides the graph into four quadrants according to the threshold, and classifies the features.
[0010] Further, in the data collection of step one, the multi-dimensional data includes demographic characteristics, preoperative comorbidity characteristics, surgery and anesthesia related characteristics, and postoperative management characteristics; the binary classification label is determined by the Pittsburgh Sleep Quality Index or polysomnography.
[0011] Further, in the data preprocessing of step one, the missing value filling uses mean, median or model prediction method; the categorical feature encoding uses one-hot encoding or target encoding.
[0012] Further, in the method selection of step two, the five methods include SHAP-based global importance, permutation importance, built-in gain importance based on gradient boosting decision tree model, LIME-based local importance, and Lasso regression coefficient importance.
[0013] Further, in the model training details of step two, the data segmentation uses k-fold cross-validation; the hyperparameter tuning sets the learning rate, maximum depth, and iteration number for specific models; the class imbalance processing uses oversampling or weight adjustment; the model evaluation uses accuracy, precision, and recall.
[0014] Furthermore, in the score-based analysis path of step three, the score is normalized as follows: for each method The resulting importance score vector Perform min-max normalization on all scores. Mapping to the [0,1] interval yields the normalized score. The formula is as follows:
[0015] ,
[0016] In the formula, The normalized score represents the characteristic. In the method The standardized importance value is given below, with a range of [0,1], where 0 represents the lowest importance and 1 represents the highest importance; The original importance scores represent the method. Features The initial evaluation score is directly output by the importance evaluation algorithm, reflecting the relative contribution of the feature in the model; For method The generated importance score vector of all features represents the method. For the entire feature set The set of fractions;
[0017] The fusion index is calculated as follows: for each feature Based on its m normalized scores Calculate the following two core metrics:
[0018] (1) Average Importance Score: This indicator measures the average importance level of a feature, and the formula is as follows:
[0019] ,
[0020] Its range is [0,1], and the larger the value, the higher the overall importance of the feature under multiple methods;
[0021] (2) Feature Consistency Index: This index measures the stability and consistency of the conclusions regarding feature importance. The formula is as follows:
[0022] ,
[0023] In the formula, Features of The sample variance of the normalized scores. The value of FCI is 0.25, which is the theoretical maximum variance of variables in the interval [0, 1], and is used to ensure that the value range of FCI falls within the interval [0, 1]; the closer the value of FCI is to 1, the more consistent the evaluation of the importance of the feature by different methods, and the more stable the conclusion; the closer the value of FCI is to 0, the greater the divergence, and the less stable the conclusion.
[0024] Further, in the ranking-based analysis path of step three, the ranking is obtained as follows: for each method , a feature ranking list is obtained , wherein the ranking of the i-th feature is denoted as
[0025] The fusion index is calculated as follows: for each feature , based on its rankings , the following two indexes are calculated:
[0026] (1) average ranking, the calculation formula is:
[0027] ,
[0028] The smaller the value of the average ranking, the higher the comprehensive importance;
[0029] (2) feature importance stability index, the calculation formula is:
[0030] ,
[0031] In the formula, is the sample variance of the rankings of the feature , is the theoretical maximum variance of the feature rankings [0, 1], which is used for normalization;
[0032] The closer the value of FISI is to 1, the more stable the ranking.
[0033] Further, in the quadrant division and feature classification of step four, the threshold is defined by experts in the field or adaptively determined based on data distribution, including using the median or quartile; the feature classification is to classify the features falling into different quadrants, i.e.: first quadrant: core key factor; second quadrant: controversial factor; third quadrant: stable irrelevant factor; fourth quadrant: noise factor.
[0034] The beneficial effects of the present application are:
[0035] 1. Improved reliability and robustness of key factor identification: The present application effectively overcomes the inherent bias and limitations brought by relying on a single model or a single method by systematically integrating multiple evaluation methods of different principles (such as SHAP, permutation importance, model built-in gain, etc.). This multi-source information fusion mechanism can smooth out abnormal results of individual methods, making the final identified key factor conclusion more stable and reliable, greatly reducing the risk of biased research conclusions due to improper method selection, and the results have stronger reproducibility and public credibility.
[0036] 2. Innovative quantitative evaluation of feature importance conclusion stability: The present application first introduces the core concept of feature consistency index (FCI) or feature importance stability index (FISI), filling the gap in the prior art of lacking consistency quantitative evaluation of individual features. Unlike the existing simple average ranking method, the present application not only focuses on the "average importance" of features, but also reveals the "consensus degree" of the importance conclusion. This allows researchers to clearly distinguish between "recognized importance" and "controversy", providing a quantitative basis for evaluating the credibility of the conclusion.
[0037] 3. Provides an operable decision framework: The "four-quadrant analysis method" of the present application combines the "importance" and "stability" of features to provide accurate classification for all candidate features. By dividing features into "core key factors", "controversial factors", "stable irrelevant factors", and "noise factors", this method not only indicates which features are most important, but also reveals their behavior patterns. In particular, the identification of "controversial factors" can guide researchers to conduct more in-depth exploratory analysis to discover potential complex interactions, thereby greatly improving research efficiency and depth, and providing a more insightful decision framework than a single ranking list. BRIEF DESCRIPTION OF DRAWINGS
[0038] Figure 1 is a flow chart of a postoperative sleep disorder key factor identification method of the present application. DETAILED DESCRIPTION
[0039] As shown in Figure 1 , a postoperative sleep disorder key factor identification method includes the following steps:
[0040] Step 1: Data preparation and preprocessing, including data collection and data preprocessing, wherein the data collection obtains multi-dimensional data of patients from electronic medical record systems, monitoring devices or clinical databases to form a candidate feature set wherein n is the total number of features, and determining whether sleep disorder occurs after surgery as a binary classification label; data preprocessing cleans and converts the original data, including missing value filling, outlier processing, data type conversion, and categorical feature encoding;
[0041] Step two: multi-source feature importance generation, including method selection, model training details and importance calculation, wherein the method selection presets at least five feature importance evaluation methods with different principles; the model training details include data segmentation, hyperparameter tuning, handling class imbalance and model evaluation; the importance calculation uses the selected method to analyze the preprocessed data, and calculates the importance of each feature and outputs the result as a score value or a ranking;
[0042] Step three: feature importance and stability fusion evaluation, providing a score-based analysis path and a ranking-based analysis path, wherein the score-based analysis path includes score normalization and fusion index calculation, calculating the average importance score and feature consistency index; the ranking-based analysis path includes ranking acquisition and fusion index calculation, calculating the average ranking and feature importance stability index;
[0043] Step four: four-quadrant analysis and key factor classification, including two-dimensional visualization and quadrant division and feature classification, wherein the two-dimensional visualization constructs a scatter plot with the importance index as the X-axis and the stability index as the Y-axis; the quadrant division divides the graph into four quadrants according to the threshold, and classifies the features.
[0044] Preferably, in the data collection of step one, the multi-dimensional data includes demographic characteristics, preoperative comorbidity characteristics, surgery and anesthesia related characteristics, and postoperative management characteristics; the binary classification label is determined by the Pittsburgh Sleep Quality Index or polysomnography.
[0045] Preferably, in the data preparation process of step one, the data collection obtains the multi-dimensional data of the patient from the electronic medical record system, the monitoring device or the clinical database to form a candidate feature set. These multi-dimensional data specifically include preoperative, intraoperative and postoperative indicators, each of which has potential relevance to the occurrence and development of postoperative sleep disorders:
[0046] Preoperative factors: age, body mass index (BMI), whether or not diabetic, whether or not hypertensive, whether or not having more than 2 comorbidities, surgical history, American Society of Anesthesiologists (ASA) health classification, preoperative laboratory examination data: white blood cells, albumin, electrolytes, electrocardiogram, preoperative anemia, cardiac function classification, self-rating anxiety scale (SAS) score.
[0047] Intraoperative factors: type of surgery, time of surgery, duration of surgery, intraoperative crystalloid fluid volume, whether to infuse colloidal fluid, blood transfusion, bleeding volume, medication: dexamethasone, midazolam, sufentanil, propofol, remifentanil, dexmedetomidine, whether to have hypotension, anesthesia duration, resuscitation duration.
[0048] Postoperative factors: whether anemia occurs after surgery, postoperative white blood cells, postoperative albumin, postoperative electrolytes, whether to have low body temperature, postoperative pain score NRS, postoperative nausea and vomiting, postoperative respiratory condition, postoperative digestive condition, whether to have sore throat after surgery, whether to have dizziness, whether to use analgesic pump.
[0049] The above indexes cover the comprehensive information of patients during the perioperative period, and the relationship between the factor classification results and postoperative sleep disorders can be determined:
[0050] Core key factors: duration of surgery, whether to use analgesic pump after surgery, anesthesia duration. These factors are closely related to postoperative sleep disorders and are the main driving factors affecting postoperative sleep quality.
[0051] Controversial factors: preoperative sleep condition, American Society of Anesthesiologists Health Classification ASA, preoperative white blood cells, preoperative electrolytes, preoperative electrocardiogram, cardiac function classification, intraoperative crystalloid fluid volume, whether to infuse colloidal fluid, blood transfusion, bleeding volume, whether to use dexamethasone, propofol dosage, whether to use dexmedetomidine during surgery, whether to have hypotension during surgery, resuscitation duration, postoperative pain score NRS, postoperative nausea and vomiting, postoperative respiratory condition, postoperative digestive condition, whether to have sore throat after surgery, whether to have dizziness. The importance of these factors is high, but different methods have different evaluations, which need further research.
[0052] Stable irrelevant factors: remifentanil dosage, postoperative dizziness, sufentanil dosage, preoperative albumin, surgical history, resuscitation duration, preoperative white blood cells, type of surgery, time of surgery, whether to use midazolam, whether to have hypertension, whether to have diabetes, whether to have more than 2 kinds of comorbidities. These factors are consistently considered unimportant in multiple methods.
[0053] Noise factors: self-rating anxiety scale SAS score, propofol dosage, age, body mass index BMI. These factors have low importance and inconsistent evaluation, and may be interference items in the data.
[0054] In addition, whether the patient has postoperative sleep disorders is determined by Pittsburgh Sleep Quality Index PSQI or polysomnography, as a binary classification label; 0 for no occurrence, 1 for occurrence.
[0055] In the data preprocessing of step one, the missing value filling adopts mean, median or model prediction method; the classification feature encoding adopts one-hot encoding or target encoding;
[0056] The outlier treatment refers to identifying and managing those values that significantly deviate from the normal distribution or expected range of the dataset during the data preprocessing stage. These outliers may result from data entry errors, measurement biases, or real extreme events, and if not handled, may lead to bias or overfitting of the machine learning model. In this method, outlier treatment is part of the cleaning step, aiming to improve data quality. Specifically, it includes the following key operations:
[0057] Outlier detection: using statistical methods to identify outliers, such as the interquartile range (IQR) method, where outliers are defined as lower than Q1 - 1.5 × IQR or higher than Q3 + 1.5 × IQR (Q1 and Q3 are the first and third quartiles, respectively); or the Z-score method, where values with a Z-score exceeding a threshold (e.g., 3) are considered outliers;
[0058] Treatment strategy: once outliers are detected, removal (deleting outlier records, suitable for erroneous data), replacement (filling with mean, median, or mode, suitable for continuous variables), truncation (Winsorization, adjusting outliers to threshold boundaries), or retention and labeling (if outliers have clinical significance, such as extreme pain scores) can be adopted. In the context of postoperative sleep disorder data, for example, if BMI values are abnormally high (e.g., exceeding 100), they can be detected by IQR and replaced with the median to avoid affecting model training;
[0059] The data type conversion involves adjusting the format of the original data from one type to another to ensure compatibility with machine learning algorithms and computational efficiency. This process is a core component of preprocessing, as many models require input in a specific type (e.g., numerical). In this method, data type conversion is optimized for the diversity of clinical data (e.g., numerical, categorical, date, etc.). Specifically, it includes:
[0060] Numerical type conversion: for example, converting string representations of numerical values (e.g., "65" representing age) to integers or floating-point numbers; or rounding floating-point numbers to integers if precision requirements are not high;
[0061] Date and time conversion: converting string dates (e.g., "2023-01-01") to datetime objects to facilitate the calculation of surgical duration and other time-related features;
[0062] Categorical type conversion: although related to encoding, conversion can include converting categorical strings (e.g., "male / female") to categorical types to reduce memory usage and speed up processing. In the postoperative sleep disorder data, for example, surgical type (e.g., "open / micro-invasive") is converted from a string to a categorical label;
[0063] This step is usually implemented using a programming library (such as Pandas for Python), for example, through the astype() function, to ensure that all features meet the model input requirements, thereby supporting subsequent multi-source feature importance generation.
[0064] Preferably, in the method selection of step two, the five methods include SHAP-based global importance, permutation importance, built-in gain importance based on gradient boosting decision tree model, LIME-based local importance, and coefficient importance based on Lasso regression.
[0065] The specific implementation method is as follows: each method independently calculates the feature importance on the preprocessed dataset, and the results are used for subsequent fusion evaluation:
[0066] (1) SHAP-based global importance: SHAP (SHapley Additive exPlanations) method evaluates global importance by calculating the contribution value of each feature to the model prediction. In the specific implementation, TreeExplainer (for tree-based models) or KernelExplainer (for any model) of the SHAP library is used, for example, for the XGBoost model after training, SHAP values are calculated:
[0067] import shap
[0068] explainer = shap.TreeExplainer(model) # model is the trained XGBoost model
[0069] shap_values = explainer.shap_values(X) # X is the feature matrix
[0070] global_importance = np.abs(shap_values).mean(axis=0) # Global importance is the average of absolute SHAP values
[0071] This method outputs the SHAP score of each feature, reflecting its impact on the overall prediction.
[0072] (2) Permutation importance: Permutation importance measures importance by randomly permuting feature values and observing the performance decline of the model. The specific implementation uses the permutation_importance function of sklearn, for example, for a random forest model:
[0073] from sklearn.inspection import permutation_importance
[0074] result = permutation_importance(model, X_val, y_val, n_repeats=10, random_state=42) # X_val, y_val are the validation sets
[0075] importance = result.importances_mean # Average performance degradation value is used as the importance score;
[0076] This method outputs a score vector;
[0077] (3) Built-in gain importance of gradient boosting decision tree model: Using the built-in feature importance of XGBoost or LightGBM, the gain is calculated based on the tree split. Specific implementation:
[0078] import xgboost as xgb
[0079] model = xgb.XGBClassifier() # Train the model
[0080] model.fit(X_train, y_train)
[0081] gain_importance = model.get_booster().get_score(importance_type='gain') # Gain importance;
[0082] This method outputs the score in dictionary form;
[0083] (4) Local importance based on LIME: LIME (Local Interpretable Model-agnostic Explanations) evaluates importance by approximating global behavior through local linear models. Specifically, it uses the LIME library to aggregate the local interpretations of multiple instances to obtain a global view.
[0084] import lime_tabular from lime
[0085] explainer = lime_tabular.LimeTabularExplainer(X_train, feature_names=feature_names, class_names=['No POSD', 'POSD'])
[0086] local_exps = [explainer.explain_instance(X_test[i], model.predict_proba) for i in range(len(X_test))]
[0087] global_importance = np.mean([np.abs(exp.as_map()[1]) for exp inlocal_exps], axis=0) # Aggregate absolute coefficients;
[0088] This method outputs the average coefficient;
[0089] (5) Coefficient importance based on Lasso regression: Lasso achieves feature selection by shrinking the coefficient through L1 regularization. Specifically, the Lasso model from sklearn is used.
[0090] from sklearn.linear_model import Lasso
[0091] model = Lasso(alpha=0.1) # alpha is the regularization strength
[0092] model.fit(X_train, y_train)
[0093] coef_importance = np.abs(model.coef_) # Absolute coefficients are used as importance;
[0094] This method outputs a coefficient vector;
[0095] The selection of the above five methods ensures the diversity of evaluation perspectives, and the output results can be scores or rankings, which can be used for integration in step three.
[0096] Preferably, in the model training details of step two, the data segmentation uses k-fold cross-validation; the hyperparameter tuning sets the learning rate, maximum depth, and number of iterations for the specific model; the handling of class imbalance uses oversampling or weight adjustment; and the model evaluation uses accuracy, precision, and recall.
[0097] In this embodiment, the training process for the base models (e.g., XGBoost for SHAP and gain importance, Random Forest for permutation importance) is detailed, and the dataset is split into a training set (70%) and a validation set (30%) to handle the imbalance of the POSD labels (e.g., 30% positive samples).
[0098] (1) Data segmentation: k-fold cross-validation (k=5) is used to evaluate the stability of the model, and the specific implementation is as follows:
[0099] from sklearn.model_selection import StratifiedKFold
[0100] skf = StratifiedKFold(n_splits=5, shuffle=True, random_state=42)
[0101] for train_index, val_index in skf.split(X, y):
[0102] X_train, X_val = X[train_index], X[val_index]
[0103] y_train, y_val = y[train_index], y[val_index]
[0104] # Train the model on each fold;
[0105] This approach ensures that the class distribution is balanced in each fold.
[0106] (2) Hyperparameter tuning: Set key hyperparameters for specific models, such as for XGBoost: learning rate (learning_rate=0.1), maximum depth (max_depth=6), and number of iterations (n_estimators=100), and use grid search optimization:
[0107] from sklearn.model_selection import GridSearchCV
[0108] param_grid = {'learning_rate': [0.01, 0.1],'max_depth': [4, 6], 'n_estimators': [50, 100]}
[0109] grid_search = GridSearchCV(model, param_grid, cv=3, scoring='roc_auc')
[0110] grid_search.fit(X_train, y_train)
[0111] best_params = grid_search.best_params_ # The best parameters are used in the final model;
[0112] (3) Handling class imbalance: Use oversampling (SMOTE) or weight adjustment. Specifically, implement SMOTE as follows:
[0113] from imblearn.over_sampling import SMOTE
[0114] smote = SMOTE(random_state=42)
[0115] X_resampled, y_resampled = smote.fit_resample(X_train, y_train) # Train after balancing;
[0116] Or weight adjustment:
[0117] model = xgb.XGBClassifier(scale_pos_weight= (len(y_train) - sum(y_train)) / sum(y_train)) # Positive sample weights;
[0118] (4) Model Evaluation: The model performance is evaluated using accuracy, precision, and recall. Specific implementation details are as follows:
[0119] from sklearn.metrics import accuracy_score, precision_score, recall_score
[0120] y_pred = model.predict(X_val)
[0121] acc = accuracy_score(y_val, y_pred) # Accuracy
[0122] prec = precision_score(y_val, y_pred) # Precision rate
[0123] rec = recall_score(y_val, y_pred) # Recall rate;
[0124] These training details improve the model's generalization ability and fairness, and support the accurate generation of the importance of multi-source features.
[0125] Preferably, in the score-based analysis path of step three, the score is normalized as follows: for each method The resulting importance score vector Perform min-max normalization on all scores. Mapping to the [0,1] interval yields the normalized score. The formula is as follows:
[0126] ,
[0127] In the formula, The normalized score represents the characteristic. In the method The standardized importance value is given below, with a range of [0,1], where 0 represents the lowest importance and 1 represents the highest importance; The original importance scores represent the method. Features The initial evaluation score is directly output by the importance evaluation algorithm, reflecting the relative contribution of the feature in the model; For method The generated importance score vector of all features represents the method. For the entire feature set The set of fractions;
[0128] The fusion index is calculated as follows: for each feature Based on its m normalized scores Calculate the following two core metrics:
[0129] (1) Average Importance Score: This indicator measures the average importance level of a feature, and the formula is as follows:
[0130] ,
[0131] Its range is [0,1], and the larger the value, the higher the overall importance of the feature under multiple methods;
[0132] (2) Feature Consistency Index: This index measures the stability and consistency of the conclusions regarding feature importance. The formula is as follows:
[0133] ,
[0134] wherein, is the feature importance stability index (FISI) of the i-th feature, is the sample variance of the i-th feature's ranking, is 0.25, and is the theoretical maximum variance of the variable in the interval [0, 1], used to ensure that the value of FCI falls within the interval [0, 1]; the closer the value of FCI is to 1, the more consistent the evaluation of the importance of the feature by different methods, and the more stable the conclusion; the closer the value of FCI is to 0, the greater the divergence, and the less stable the conclusion.
[0135] Preferably, in the ranking-based analysis path of step three, the ranking is obtained as follows: for each method , a feature ranking list is obtained, where the ranking of the i-th feature is denoted as ;
[0136] The fusion index is calculated as follows: for each feature , based on its rankings , the following two indexes are calculated:
[0137] (1) average ranking, the calculation formula is:
[0138] ,
[0139] The smaller the value of the average ranking, the higher the comprehensive importance;
[0140] (2) feature importance stability index, the calculation formula is:
[0141] ,
[0142] wherein, is the sample variance of the i-th feature's ranking, is the theoretical maximum variance of the i-th feature's ranking in the interval [0, 1], used for normalization; The closer the value of FISI is to 1, the more stable the ranking. Preferably, in the quadrant division and feature classification of step four, the threshold is defined by experts in the field or determined adaptively based on data distribution, including using the median or quartile; the feature classification is to classify the features falling into different quadrants, i.e.: first quadrant: core key factor; second quadrant: controversial factor; third quadrant: stable irrelevant factor; fourth quadrant: noise factor.
[0143]
[0144] Preferably, in the quadrant division and feature classification of step four, the threshold is defined by experts in the field or determined adaptively based on data distribution, including using the median or quartile; the feature classification is to classify the features falling into different quadrants, i.e.: first quadrant: core key factor; second quadrant: controversial factor; third quadrant: stable irrelevant factor; fourth quadrant: noise factor.
[0145] Example threshold is 0.5 (adjustable):
[0146] First quadrant: Core key factors;
[0147] Characteristics: High importance, high stability (e.g., MIS > 0.5, FCI > 0.5);
[0148] Interpretation: Consistently considered highly important by all methods, core drivers of POSD;
[0149] Decision: Prioritize retention, for clinical prediction models or intervention guidelines;
[0150] Second quadrant: Controversial factors;
[0151] Characteristics: High importance, low stability (e.g., MIS > 0.5, FCI < 0.5);
[0152] Interpretation: High overall importance, but significant disagreement among methods in assessing it. This often implies that the feature has complex interaction effects or only manifests its importance under specific model assumptions;
[0153] Decision: In-depth diagnostic analysis should be conducted to explore the source of disagreement. Such features may reveal new biological mechanisms, but should be used with caution in general-purpose models;
[0154] Third quadrant: Stable irrelevant factors;
[0155] Characteristics: Low importance, high stability (e.g., MIS < 0.5, FCI > 0.5);
[0156] Interpretation: Consistently considered unimportant by all methods;
[0157] Decision: Remove from the model to reduce complexity and noise;
[0158] Fourth quadrant: Noise factors;
[0159] Characteristics: Low importance, low stability (e.g., MIS < 0.5, FCI < 0.5);
[0160] Interpretation: Low importance and inconsistent assessment, typical noise;
[0161] Decision: Prioritize removal;
[0162] The above postoperative sleep disorder key factor identification method improves the robustness and interpretability of feature evaluation by expanding method diversity, training details, and threshold adaptation, suitable for clinical decision support systems.
[0163] The above shows and describes the basic principles, main features and advantages of the present application, and those skilled in the art should understand that the present application is not limited to the above embodiments, and the above embodiments and descriptions in the specification are only preferred examples of the present application and are not intended to limit the present application. Without departing from the spirit and scope of the present application, various changes and improvements can be made to the present application, and these changes and improvements all fall within the scope of the claimed present application. The scope of protection of the present application is defined by the appended claims and their equivalents.
Claims
1. A method for identifying key factors of postoperative sleep disorders, characterized in that, Comprising the following steps: Step one: data preparation and preprocessing, including data collection and data preprocessing, wherein the data collection obtains the multi-dimensional data of the patient from the electronic medical record system, the monitoring device or the clinical database to form a candidate feature set wherein n is the total number of features, and determining whether sleep disorders occur after surgery as a binary classification label; the data preprocessing cleans and converts the original data, including missing value filling, outlier processing, data type conversion and classification feature encoding; Step two: multi-source feature importance generation, including method selection, model training details and importance calculation, wherein the method selection presets at least five feature importance evaluation methods with different principles; the model training details include data segmentation, hyperparameter tuning, class imbalance processing and model evaluation; the importance calculation uses the selected method to analyze the preprocessed data, and calculates the importance of each feature The importance is calculated, and the output result is a score value or a ranking; Step three: feature importance and stability fusion evaluation, providing a score-based analysis path and a ranking-based analysis path, wherein the score-based analysis path includes score normalization and fusion indicator calculation to calculate the average importance score and feature consistency index; the ranking-based analysis path includes ranking acquisition and fusion indicator calculation to calculate the average ranking and feature importance stability index; Step four: four-quadrant analysis and key factor classification, including two-dimensional visualization and quadrant division and feature classification, wherein the two-dimensional visualization constructs a scatter plot with the importance indicator as the X-axis and the stability indicator as the Y-axis; the quadrant division divides the graph into four quadrants according to the threshold, and classifies the features; In the score-based analysis path of step three, the scores are normalized as follows: for each method The resulting importance score vector is min-max normalized to map all scores to the interval [0, 1] to obtain normalized scores , which are given by the formula , wherein, is the normalized score, representing the feature importance value under the method , whose value range is [0, 1], where 0 represents the lowest importance and 1 represents the highest importance; is the original importance score, representing the initial evaluation score of the feature under the method , which is directly output by the importance evaluation algorithm and reflects the relative contribution of the feature in the model; is the importance score vector of all features generated by the method , representing the score set of the entire feature set under the method ; The fusion index is calculated as follows: for each feature based on its m normalized scores the following two core indices are calculated: (1) Average importance score: This indicator measures the average importance level of the feature, and the formula is as follows: , Its value range is [0, 1], and the larger the value, the higher the comprehensive importance of the feature under multiple methods; (2) Feature consistency index: This indicator measures the stability and consistency of the feature importance conclusion, and the formula is as follows: , In the formula, Features of The sample variance of the normalized scores. The value of FCI is 0.25, which is the theoretical maximum variance of the variable in the interval [0,1], and is used to ensure that the value range of FCI falls within the interval [0,1]. The closer the value of FCI is to 1, the more consistent the different methods are in assessing the importance of this feature, and the more stable the conclusion is. The closer the value of FCI is to 0, the greater the divergence, and the less stable the conclusion is.
2. The method of claim 1, wherein the key factor is identified by the steps of: determining a sleep stage of the subject at a time point; determining a sleep stage of the subject at a time point; and determining a sleep stage of the subject at a time point. In the data collection of step one, the multi-dimensional data includes demographic characteristics, preoperative comorbidity characteristics, surgery and anesthesia related characteristics, and postoperative management characteristics; the binary classification label is determined by the Pittsburgh Sleep Quality Index or polysomnography.
3. The method of claim 1, wherein the method comprises: In the data preprocessing of step one, the missing value filling adopts the mean, median or model prediction method; the classification feature encoding adopts one-hot encoding or target encoding.
4. The method of claim 1, wherein the method comprises: In the method selection of step two, the five methods include SHAP-based global importance, permutation importance, built-in gain importance based on gradient boosting decision tree model, LIME-based local importance, and coefficient importance based on Lasso regression.
5. The method of claim 1, wherein the method comprises: In the model training details of step two, the data segmentation adopts k-fold cross-validation; the hyperparameter tuning sets the learning rate, maximum depth and iteration number for specific models; the class imbalance processing adopts oversampling or weight adjustment; the model evaluation uses accuracy, precision and recall.
6. The method of claim 1, wherein the method comprises: In the ranking-based analysis path of Step three, the ranking is obtained as follows: for each method , a list of feature rankings is obtained , where the rank of the i-th feature is denoted as ; The fusion index is calculated as follows: for each feature based on its rank , the following two indexes are calculated: (1) Average ranking, the calculation formula is: , The smaller the average ranking, the higher the comprehensive importance; (2) Feature importance stability index, the calculation formula is: , In the formula, Features of The sample variance of each ranking. ,yes The theoretical maximum variance of the feature ranking [0,1] is used for normalization; The closer the FISI value is to 1, the more stable the ranking is.
7. The method of claim 1, wherein the method comprises: In the quadrant division and feature classification of step four, the threshold is defined by experts in the field or determined adaptively based on data distribution, including using the median or quartile; the feature classification classifies the features falling into different quadrants, i.e.: first quadrant: core key factor; second quadrant: controversial factor; third quadrant: stable irrelevant factor; fourth quadrant: noise factor.
Citation Information
Patent Citations
Lasso and random forest-based high arch dam valley deformation analysis method
CN111275341A
Big data analysis and processing method for distribution network non-power-cut operation
CN119398595A