A risk prediction method for gestational diabetes based on BLS feature extractor
By combining width learning system (BLS) and random forest algorithms, nonlinear features are extracted and used, the problems of large computing resources and limited processing capabilities in the prior art are solved, and more efficient and accurate gestational diabetes is achieved. Risk prediction.
Patent Information
- Application Number
- CN202411246395.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-09-06
AI Technical Summary
The prior art consumes a lot of computing resources, complex model parameter adjustment, sensitive to feature scaling and limited ability to deal with nonlinear problems in gestational diabetes risk prediction.
The nonlinear features in the data were extracted using a width learning system (BLS) and combined with the original data to train a random forest model for gestational diabetes risk prediction.
It improves the accuracy and efficiency of gestational diabetes risk prediction, overcomes the limitations of single use of SVM, and provides a more robust and efficient prediction solution.
Smart Images

Figure CN118762841B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of risk prediction, and in particular relates to a method for predicting the risk of gestational diabetes mellitus based on a BLS feature extractor. Background Art
[0002] The method for predicting the risk of gestational diabetes mellitus using the traditional SVM algorithm in application number CN202311786244.2 has some disadvantages, such as high consumption of computing resources, complex adjustment of model parameters, sensitivity to feature scaling, and limited ability to handle nonlinear problems. Based on these problems, we propose a new method, which is to use a broad learning system (BLS) to efficiently extract nonlinear features in the data. These features will be combined with the original data and used to train a random forest model for gestational diabetes risk prediction. This method combines the fast feature extraction capability of BLS with the powerful classification capability of random forests. It can enhance the processing efficiency of the model while improving the prediction accuracy, effectively overcome the limitations of using a single SVM, and provide a more robust and efficient prediction solution.
[0003] Broad Learning System (BLS) is an efficient neural network architecture proposed by CL Philip Chen and Zhulin Liu in 2018. It aims to provide a fast and flexible learning model, which is particularly suitable for scenarios that need to quickly process and adapt to new data (BLS model diagram as shown in the figure Figure 1 BLS has a strong feature extraction capability and can quickly generate and select features through its feature nodes and enhancement nodes. These nodes are designed to capture useful information from the input data and are suitable for extracting features as a feature extractor and combined with random forests. Summary of the invention
[0004] (1) Technical solution
[0005] In order to solve the above technical problems, the present invention provides a method for predicting the risk of gestational diabetes mellitus based on a BLS feature extractor, which specifically comprises the following steps:
[0006] Step 1: Select patients who attended the first visit before the first trimester and had the 24-28-week OGTT outcome indicators, obtain the patient's basic information, case data, test data, questionnaire data through the hospital system and company management system, and sign the informed consent form with the patient;
[0007] Step 2: Structurally merge the raw data and perform data preprocessing to ensure data quality and consistency, and provide clean and standardized data input for subsequent feature extraction and modeling;
[0008] Step 3: BLS feature generation
[0009] (1) For preprocessed data, we will The features are represented as , these features will be fed into the BLS model for further processing;
[0010] (2) BLS linear mapping feature generation: feature Perform z-score standardization and generate a random weight matrix and , randomly assign weights to each sample feature, through Z Get the BLS linear mapping feature ;
[0011] (3) BLS nonlinear feature generation: First, the linear mapping features are z-score normalized, and then the nonlinear enhancement features can be generated through the activation function The mapping is obtained, which is expressed as ,in and is a randomly generated weight that conforms to the Gaussian distribution, and tansig is a commonly used activation function for BP neural networks;
[0012] Step 4: Random forest prediction model based on feature fusion: Integrating the nonlinear features of BLS into the random forest model can enhance the model's ability to handle nonlinear relationships in complex data. BLS effectively extracts a large number of nonlinear features, transforming the input data into a higher-dimensional space where nonlinear relationships are more obvious. As an ensemble learning method, random forest is known for its high accuracy and resistance to overfitting. By utilizing the features enhanced by BLS, its classification performance can be improved on complex data sets. The decision trees in the random forest can better separate data points in the feature space enhanced by BLS, thereby improving prediction accuracy.
[0013] Correlation analysis: evaluate the correlation strength between each feature in the scale data and the target variable through correlation analysis, and eliminate features with correlation strength lower than the preset value;
[0014] Importance analysis: Use Python's scikit-learn library to perform random forest importance analysis and remove features with low importance scores;
[0015] Grid search and cross-validation: By dividing the data set into training set, validation set, and test set, setting the range of parameters that the random forest needs to search, traversing the parameter combinations within the range, training the model with the training set, and selecting the parameter combination with the highest accuracy with the validation set, a gestational diabetes risk prediction model can be obtained.
[0016] Preferably, in step 2, the original data is structured and merged, and data preprocessing is performed, specifically including:
[0017] (1) Missing value processing;
[0018] (2) Outlier processing;
[0019] (3) Data labeling: Samples were labeled according to the standards in the Guidelines for the Prevention and Treatment of Type 2 Diabetes in China (2020 Edition). Based on the 75g-OGTT results of patients at 24-28 weeks, those whose blood glucose met any of the following conditions were labeled as patients with gestational diabetes; otherwise, they were labeled as patients with non-gestational diabetes: OGTT-0h blood glucose ≥5.1mmol / L; OGTT-1h blood glucose ≥10.0mmol / L; OGTT-2h blood glucose ≥8.5mmol / L;
[0020] (4) Data encoding: If the categorical variable of the original data is an ordered categorical variable, it is encoded in an ordered manner; if it is an unordered categorical variable, it is encoded in a one-hot manner.
[0021] Preferably, the missing value processing specifically includes: if the missing rate of a column feature reaches 30%, the column is deleted; for categorical variables, the mode is used to complete the missing value filling, and for numerical variables, the median is used to fill.
[0022] Preferably, the outlier processing specifically includes: since it is inevitable that there are errors in information collection, the feature outlier processing is completed one by one using the tailing method, and the median or mode is filled for the first and last 0.5% samples of each feature.
[0023] Preferably, the correlation analysis in step 4 specifically includes:
[0024] Calculate the linear correlation strength between feature x and target variable y :
[0025] ;
[0026] Among them, x i is the characteristic value x of the ith patient, y i is the target variable y value of the i-th patient, n is the number of patients, and are the means of feature x and target variable y respectively;
[0027] Preserve linear correlation strength r xy Features that are greater than the preset value are considered as high-correlation features, and the rest are eliminated;
[0028] Construct the feature correlation matrix R based on the high correlation features:
[0029] ;
[0030] in, is the correlation coefficient between the i-th feature and the j-th feature, m is the number of features, 1≤i, j≤m;
[0031] ;
[0032] The feature pairs whose correlation in the feature correlation matrix R is greater than a preset value are retained as high-correlation feature pairs, and the remaining feature pairs are eliminated. Only the features with higher correlation with the target variable in the high-correlation feature pairs are retained, and the other feature is eliminated, so that a set of features without multicollinearity problems can be obtained.
[0033] (2) Beneficial effects
[0034] The present invention significantly improves the accuracy and efficiency of gestational diabetes risk prediction by combining the breadth learning system (BLS) and the random forest (RF) algorithm. The specific advantages include:
[0035] Improve prediction accuracy: BLS can effectively extract nonlinear features in the data, which can reflect the relationship between more complex patient data and the risk of gestational diabetes. The data preprocessed by BLS is input into the random forest model, which enables the random forest to learn in a higher-dimensional feature space, thereby improving the performance of the model on classification tasks.
[0036] Efficiency improvement and resource optimization: Compared with deep learning feature extraction algorithms such as CNN, BLS can extract features faster when processing large-scale data sets. Combined with random forests, it reduces the model time cost while effectively extracting nonlinear features. The model structure of BLS and RF is relatively simple, and the parameter adjustment is more intuitive. It is easy to deploy and implement in different medical institutions, which reduces the threshold for technology promotion. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is the BLS model diagram;
[0038] Figure 2 is a flow chart of the present invention;
[0039] Figure 3 This is the ROC_AUC curve. DETAILED DESCRIPTION
[0040] The present invention is further clearly and completely described below in conjunction with embodiments. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Example
[0041] 1) Data source and preprocessing
[0042] A total of 3070 pregnant women recruited from XXX Hospital from May 2023 to May 2024 were analyzed. The basic data, case data, questionnaire data and test data of pregnant women were collected. According to the results of 75g-OGTT, those whose blood glucose met any of the following conditions were divided into the GDM group, otherwise they were marked as the non-GDM group: (1) OGTT-0h blood glucose ≥5.1mmol / L; (2) OGTT-1h blood glucose ≥10.0mmol / L; (3) OGTT-2h blood glucose ≥8.5mmol / L; Finally, according to the inclusion criteria: 1) pregnant women who attended the first visit to XXX Hospital before 12 weeks of gestation; 2) pregnant women who completed routine prenatal examinations and laboratory tests in XXX Hospital; 3) GDM group and control group were included in a 1:1 ratio. Exclusion criteria: 1) patients diagnosed with type 1 or type 2 diabetes; 2) patients with a history of tumor. Finally, 400 pregnant women were included in the experiment (200 GDM patients and 200 controls), and were randomly divided into training set and test set in a 7:3 ratio.
[0043] 2) Perform missing value processing, outlier processing, and data annotation on the data to form a complete gestational diabetes data set.
[0044] Table 1
[0045]
[0046] It should be noted that NaN in Table 1 represents missing data at that location;
[0047] Missing value processing: If the missing rate of a column reaches 30%, the column will be deleted; for categorical variables, the mode is used to complete the missing value filling, and for numerical variables, the median is used to fill;
[0048] Outlier processing: Since there are inevitably errors in information collection, the outlier processing of features is completed one by one using the tailing method, and the median or mode is filled in the first and last 0.5% samples of each feature.
[0049] Data annotation: Patients in the GDM group were marked as 1, and those in the non-GDM group were marked as 0.
[0050] The preprocessed data is shown in Table 2:
[0051] Table 2
[0052]
[0053] 3) Perform z-score normalization on the data to eliminate the dimension effect and simplify the model parameters. The normalization formula is as follows:
[0054]
[0055] in is the original data, is the average value, is the standard deviation, and the standardized data are shown in Table 3;
[0056] Table 3
[0057]
[0058] 4) BLS linear mapping feature generation, generating random weight matrix and , randomly assign weights to each sample feature, through Z Get the BLS linear mapping feature ;
[0059] BLS nonlinear feature generation: The linear mapping features are z-score standardized, and then the nonlinear enhancement features can be generated through the activation function The mapping is obtained, which is expressed as ,in and is a randomly generated weight that conforms to the Gaussian distribution. Tansig is a commonly used activation function for BP neural networks;
[0060] 5) Feature fusion: Integrating the nonlinear features of BLS into the random forest model can enhance the model's ability to handle nonlinear relationships in complex data. BLS effectively extracts a large number of nonlinear features, transforming the input data into a higher-dimensional space where nonlinear relationships are more obvious. As an ensemble learning method, random forest is known for its high accuracy and anti-overfitting ability. By utilizing the features enhanced by BLS, its classification performance can be improved on complex data sets. The fused features are shown in Table 4.
[0061] Table 4
[0062]
[0063] 6) Principal component analysis: It integrates a large number of nonlinear features extracted by BLS. The number of features increases greatly with the number of enhanced nodes set by BLS. Principal component analysis can identify important features and reduce the dimensionality of the data by converting the features extracted by BLS into new and fewer variables (i.e., principal components) while retaining the information of the original data as much as possible.
[0064] 7) Correlation analysis: Correlation analysis is used to evaluate the correlation strength between each feature in the scale data and the target variable, and features with correlation strength lower than the preset value are eliminated:
[0065] Calculate the linear correlation strength between feature x and target variable y :
[0066] ;
[0067] Among them, x i is the characteristic value x of the ith patient, y i is the target variable y value of the i-th patient, n is the number of patients, and are the means of feature x and target variable y respectively;
[0068] Preserve linear correlation strength r xy Features that are greater than the preset value are considered as high-correlation features, and the rest are eliminated;
[0069] Construct the feature correlation matrix R based on the high correlation features:
[0070] ;
[0071] in, is the correlation coefficient between the i-th feature and the j-th feature, m is the number of features, 1≤i, j≤m;
[0072] ;
[0073] The feature pairs with correlation greater than a preset value in the feature correlation matrix R are retained as high-correlation feature pairs, and the remaining feature pairs are eliminated. Only the features with higher correlation with the target variable in the high-correlation feature pairs are retained, and the other feature is eliminated, so that a set of features without multicollinearity problems can be obtained. The retained features are shown in Table 5.
[0074] Table 5
[0075]
[0076] 8) Use the scikit-learn library of Python to perform random forest importance analysis and remove features with reduced importance scores. By dividing the data set into training set, validation set, and test set, setting the range of parameters that the random forest needs to search, traversing the parameter combinations within the range, training the model with the training set, and selecting the parameter combination with the highest accuracy with the validation set, a gestational diabetes risk prediction model has been obtained. The optimal parameters are shown in Table 6;
[0077] Table 6
[0078] n_estimators max_depth min_samples_leaf min_ssmples_spit max_feature 300 75 1 2 sqrt
[0079] 9) Performance evaluation: The results of using the test set data to test the method combining random forest and BLS feature extraction (BLS_RF) are shown in Table 7. The evaluation indicators used are Accuracy, Precision, Recall, F1, and ROC_AUC curve;
[0080] Accuracy: Accuracy refers to the ratio of the total number of samples correctly predicted by the model to the total number of samples:
[0081]
[0082] TP represents true positive examples, TN represents true negative examples, FP represents false positive examples, and FN represents false negative examples.
[0083] Precision: Precision refers to the proportion of samples that are actually positive among those predicted by the model as positive samples:
[0084]
[0085] Recall: Recall refers to the proportion of true positive examples that the model correctly predicts as positive examples:
[0086]
[0087] F1: The F1 score is the harmonic mean of precision and recall, which is used to comprehensively reflect the accuracy and robustness of the model:
[0088]
[0089] The ROC_AUC curve is the area under the ROC curve, and its value is between 0 and 1. The closer it is to 1, the better the performance of the model.
[0090] The results are shown in Table 7. The ROC_AUC curve is shown in Figure 3 shown.
[0091] Table 7
[0092] Method Accuracy Precision Recall F1 AUC RF 0.73 0.70 0.82 0.76 0.80 BLS_RF 0.81 0.81 0.82 0.81 0.88
[0093] The above-mentioned embodiments only express the preferred implementation modes of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person skilled in the art, several modifications, improvements and substitutions can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention patent shall be subject to the attached claims.
Claims
1. A method for predicting the risk of gestational diabetes mellitus based on a BLS feature extractor, characterized in that: The specific steps include: Step 1: Select patients who attended the first visit before the first trimester and had the 24-28-week OGTT outcome indicators, obtain the patient's basic information, case data, test data, questionnaire data through the hospital system and company management system, and sign the informed consent form with the patient; Step 2: Structurally merge the raw data and perform data preprocessing to ensure data quality and consistency, and provide clean and standardized data input for subsequent feature extraction and modeling; The original data is structured and merged, and data preprocessing is performed, including: (1) Missing value processing: If the missing rate of a column reaches 30%, the column will be deleted; for categorical variables, the mode is used to fill the missing values, and for numerical variables, the median is used to fill the missing values; (2) Outlier processing: Since there are inevitably errors in information collection, the outlier processing of features is completed one by one using the tailing method, and the median or mode is filled in the first and last 0.5% of the samples of each feature; (3) Data labeling: Samples were labeled according to the standards in the Guidelines for the Prevention and Treatment of Type 2 Diabetes in China (2020 Edition). Based on the 75g-OGTT results of patients at 24-28 weeks, those whose blood glucose met any of the following conditions were labeled as patients with gestational diabetes; otherwise, they were labeled as patients with non-gestational diabetes: OGTT-0h blood glucose ≥5.1mmol / L; OGTT-1h blood glucose ≥10.0mmol / L; OGTT-2h blood glucose ≥8.5mmol / L; (4) Data encoding: If the categorical variable of the original data is an ordered categorical variable, it is encoded in an ordered manner; if it is an unordered categorical variable, it is encoded in a one-hot manner; Step 3: BLS feature generation (1) For preprocessed data, we will The features are represented as , these features will be fed into the BLS model for further processing; (2) BLS linear mapping feature generation: feature Perform z-score standardization and generate a random weight matrix and , randomly assign weights to each sample feature, through Z Get the BLS linear mapping feature ; (3) BLS nonlinear feature generation: First, the linear mapping features are z-score standardized, and then the nonlinear enhancement features are generated through the activation function The mapping is obtained, which is expressed as ,in and is a randomly generated weight that conforms to the Gaussian distribution, and tansig is a commonly used activation function for BP neural networks; Step 4: Random forest prediction model based on feature fusion (1) Correlation analysis: Correlation analysis is used to evaluate the correlation strength between each feature in the scale data and the target variable, and features with correlation strength lower than the preset value are eliminated; Specifically include: Calculate the linear correlation strength between feature x and target variable y : ; Among them, x i is the characteristic value x of the ith patient, y i is the target variable y value of the i-th patient, n is the number of patients, and are the means of feature x and target variable y respectively; Preserve linear correlation strength r xy Features that are greater than the preset value are considered as high-correlation features, and the rest are eliminated; Construct the feature correlation matrix R based on the high correlation features: ; in, is the correlation coefficient between the i-th feature and the j-th feature, m is the number of features, 1≤i, j≤m; ; The feature pairs whose correlation in the feature correlation matrix R is greater than a preset value are retained as high-correlation feature pairs, and the remaining feature pairs are eliminated. Only the features with a higher correlation with the target variable in the high-correlation feature pairs are retained, and the other feature is eliminated, so that a set of features without multicollinearity problems can be obtained; (2) Importance analysis: Use Python's scikit-learn library to perform random forest importance analysis and remove features with low importance scores; (3) Grid search and cross-validation: The data set is divided into training set, validation set, and test set, and the range of parameters that the random forest needs to search is set. The parameter combinations within the range are traversed, and the model is trained with the training set. The validation set selects the parameter combination with the highest accuracy to obtain a gestational diabetes risk prediction model.
Citation Information
Patent Citations
Gestational diabetes risk prediction method and system, storage medium and electronic equipment
CN117877742A
Method for classifying fMRI data based on width learning
CN110322969A
MiRNA and disease incidence relation prediction method based on graph convolutional network
CN114496092A