Sub-tree adaptive weighted pruning blood glucose prediction method based on Extra Tres regression
By adaptively adjusting subtree weights using a Bayesian ridge regression model and a dynamic pruning mechanism, the problems of subtree redundancy and improper weight allocation in the ensemble model are solved, thereby improving the accuracy and stability of blood glucose prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-06
- Publication Date
- 2026-03-31
Smart Images

Figure CN121768665A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of blood glucose prediction model technology, and in particular to a subtree adaptive weighted pruning blood glucose prediction method based on Extra Trees regression. Background Technology
[0002] Blood glucose levels are crucial physiological indicators for assessing metabolic status and diabetes risk. Accurate and continuous prediction of blood glucose levels is essential for chronic disease management and health monitoring. Current blood glucose testing methods largely rely on finger-prick blood sampling or continuous glucose monitoring devices, which suffer from high invasiveness, cost, or inconvenience. In recent years, non-invasive blood glucose prediction methods based on human bioelectrical impedance signals have gained increasing attention. These methods indirectly reflect blood glucose levels by analyzing changes in the electrical properties of human tissues under different frequency excitations, providing a new technological approach for non-invasive and low-cost blood glucose monitoring.
[0003] In blood glucose prediction modeling based on human bioelectrical impedance data, machine learning or ensemble learning methods are often used to model the nonlinear relationship between bioelectrical impedance features and blood glucose values. For example, regression models such as random forests and ExtraTrees Regressors are widely used in related prediction tasks due to their good fitting ability and strong robustness to nonlinear relationships. However, these models usually consist of a large number of decision trees, and there are differences in predictive ability and information redundancy among the decision trees. This can easily lead to complex model structures, increased computational costs, and limited generalization performance in blood glucose prediction scenarios with small samples or imbalanced data distribution.
[0004] To improve the predictive performance of models, existing techniques typically employ fixed-weight averaging or simple averaging to fuse subtree outputs. However, these methods struggle to dynamically adjust weights based on the predictive contributions of different subtrees within the actual data distribution, failing to effectively suppress the negative impact of redundant subtrees. Furthermore, some studies prune subtrees by manually setting thresholds or using empirical rules, but this approach relies on human experience, lacks adaptability, and struggles to achieve stable results across different datasets and application scenarios. Summary of the Invention
[0005] To address the problems in blood glucose prediction methods based on human bioelectrical impedance data, such as high redundancy of subtrees in ensemble models, difficulty in accurately assessing the predictive contribution of subtrees, fixed weight allocation methods, and insufficient generalization performance under conditions of small samples and imbalanced data distribution, this invention provides a subtree adaptive weighted pruning blood glucose prediction method based on Extra Trees regression.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] Step 1: Obtain a dataset containing human bioelectrical impedance data and corresponding blood glucose levels. This includes impedance, amplitude, phase difference, and physiological characteristics acquired under different excitation frequency conditions, and the dataset... The dataset is divided into training, validation, and test sets. :
[0008] (1)
[0009] In the formula, Indicates the first The feature vector of each sample This represents the corresponding actual blood glucose value. This indicates that the dataset contains Number of samples.
[0010] Step 2: Train the Extra Trees regression model based on the training set, and extract the predicted output of each subtree in the model. , , This indicates the number of subtrees in the Extra Trees regression model.
[0011] The overall predictive output of the Extra Trees regression model can be expressed as:
[0012] (2)
[0013] In the formula, Indicates the first Individual trees, .
[0014] The prediction outputs of each subtree are concatenated with the overall prediction output to construct a set of subtree prediction results.
[0015] (3)
[0016] Step 3: Use the subtree prediction results set from the validation set samples. Compared to actual blood glucose levels To understand the relationships between subtrees, a Bayesian ridge regression model is constructed to model the prediction contribution of each subtree. Let the regression expression of the Bayesian ridge regression model be:
[0017] (4)
[0018] in, For the k-th subtree prediction result in the subtree prediction result set, Represents the subtree result set The prediction weight vector corresponding to each subtree in the middle, This is a Gaussian noise term. Represents the set of subtree prediction results The number of subtrees contained in +1.
[0019] Within the Bayesian framework, the weight parameters Introduce a zero-mean Gaussian prior distribution:
[0020] (5)
[0021] , This represents a normal distribution, where 0 is the mean of the normal distribution. For precision, it controls the concentration of the prior distribution; a larger concentration... A value of [value] implies a more concentrated prior distribution; a smaller value indicates [a more concentrated prior distribution]. A value of 1 implies a more dispersed prior distribution. The covariance matrix represents the identity matrix. In a multivariate normal distribution, the covariance matrix is often used to describe the correlation between different variables.
[0022] By maximizing the posterior probability, the weight parameters are estimated to obtain the subtree prediction result set. The posterior mean of the prediction weights of each subtree :
[0023] (6)
[0024] Predicted weights A set of subtree prediction results The contribution of each subtree to the blood glucose prediction results under the validation set distribution.
[0025] Step 4: Calculate the subtree prediction results set obtained from the Bayesian ridge regression model. Weights of each subtree Dynamic pruning is performed on subtrees with low prediction contribution or high redundancy. First, the statistical properties of the weights are calculated, including the mean weight. :
[0026] (7)
[0027] Weighted standard deviation :
[0028] (8)
[0029] Set pruning threshold Its form of expression is:
[0030] (9)
[0031] in, This is a hyperparameter used to adjust the strictness of pruning.
[0032] When the subtree prediction result set The prediction weights corresponding to a certain subtree in the middle satisfy: When, retain the subtree; when At that time, the subtree should be pruned.
[0033] Step 5: After completing the subtree pruning, the final blood glucose prediction result is calculated using a weighted fusion method based on prediction weights. :
[0034] (10)
[0035] in, This represents the number of saplings retained after pruning. Represents the set of subtree prediction results The Middle Subtrees for input samples The predicted output, This indicates the prediction weight of the corresponding subtree.
[0036] Therefore, a subtree adaptive weighted pruning blood glucose prediction method based on Extra Trees regression is constructed to achieve the prediction output of human blood glucose values.
[0037] Compared with the prior art, the present invention has the following advantages:
[0038] By introducing a Bayesian ridge regression model to probabilistically model the subtree prediction contribution, and utilizing its ability to model parameter uncertainty, adaptive learning of the subtree prediction weights is achieved. This avoids the problems of strong subjectivity and insufficient generalization ability in weight setting caused by using fixed weights or empirical weighting methods in existing technologies, and improves the objectivity and stability of the subtree fusion process.
[0039] Based on probabilistic modeling of subtree prediction contributions, this invention further constructs a dynamic pruning mechanism based on statistical subtree prediction weights. By adaptively setting a pruning threshold by integrating the mean and standard deviation of the weights, subtrees with low prediction contributions or high redundancy are automatically pruned. This mechanism effectively suppresses the interference of redundant subtrees in the ensemble model on the prediction results. While reducing model complexity and computational overhead, it improves the generalization ability and prediction stability of the blood glucose prediction model, avoiding the problem of insufficient adaptability of existing fixed threshold or static pruning methods under different data distribution conditions. Attached Figure Description
[0040] Figure 1This is the overall framework diagram of the subtree adaptive weighted pruning blood glucose prediction method based on Extra Trees regression in this invention.
[0041] Figure 2 This is a flowchart of the subtree weight calculation and pruning process in this invention. Detailed Implementation
[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0043] To illustrate the technical solution described in this invention, specific embodiments are described below.
[0044] like Figure 1 The diagram shows the overall block diagram of the subtree adaptive weighted pruning blood glucose prediction method based on Extra Trees regression. It includes: S101 acquiring the dataset; S102 training the Extra Trees regression model, extracting the subtree outputs and concatenating them with the overall output to construct a subtree prediction result set; S103 establishing a Bayesian ridge regression model based on the subtree prediction result set to learn the weights of each subtree; S104 constructing pruning criteria based on the subtree weights and pruning the subtrees; and S105 integrating and calculating the outputs of the pruned subtrees and outputting the blood glucose prediction results.
[0045] S101 acquires the dataset, the dataset This includes data on impedance, amplitude, phase difference, physiological characteristics, and corresponding blood glucose levels acquired under different excitation frequency conditions. The dataset is divided into training, validation, and test sets. :
[0046] (1)
[0047] in, Indicates the first The feature vector of each sample, This represents the corresponding actual blood glucose value. This indicates that the dataset contains Number of samples.
[0048] In step S102, the Extra Trees regression model is trained, and the subtree outputs and the overall outputs are extracted and concatenated to construct a set of subtree prediction results. The process steps are as follows: Figure 2 As shown.
[0049] Combination Figure 2 As shown, the Extra Trees regression model is used to construct the subtree prediction result set, including the following steps S201-S202:
[0050] S201: Input the training set samples into the Extra Trees regression model for training. After training, for any input sample... The predicted output of the j-th subtree ,
[0051] Overall predictive output of the Extra Trees regression model (2)
[0052] in, , This indicates the number of subtrees in the Extra Trees regression model.
[0053] S202: Concatenate the prediction outputs of each subtree with the overall prediction output to construct a set of subtree prediction results. The expression is:
[0054] (3)
[0055] S103 establishes a Bayesian ridge regression model based on the subtree prediction result set to learn the weights of each subtree. The process steps are as follows: Figure 2 As shown.
[0056] Combination Figure 2 As shown, the weights of each subtree in the subtree prediction result set are calculated based on Bayesian ridge regression, including the following steps S203:
[0057] S203: Establish a Bayesian regression model, the expression of which is:
[0058] (4)
[0059] in, For the k-th subtree prediction result in the subtree prediction result set, This represents the prediction weight corresponding to each subtree. Let k be the Gaussian noise term, and k represent the set of subtree prediction results. The number of subtrees contained in +1.
[0060] Within the Bayesian framework, the weight parameters Introduce a zero-mean Gaussian prior distribution:
[0061] (5)
[0062] This represents a normal distribution, where 0 is the mean of the normal distribution. For precision, it controls the concentration of the prior distribution; a larger concentration... A value of [value] implies a more concentrated prior distribution; a smaller value indicates [a more concentrated prior distribution]. A value of 1 implies a more dispersed prior distribution. The covariance matrix represents the identity matrix. In a multivariate normal distribution, the covariance matrix is often used to describe the correlation between different variables.
[0063] By maximizing the posterior probability, the weight parameters are estimated to obtain the posterior mean of the subtree prediction weights. :
[0064] (6)
[0065] Predicting weights This is sufficient to reflect the contribution of each subtree to the blood glucose prediction results under the validation set distribution.
[0066] S104 Subtree Prediction Weights Obtained from Bayesian Ridge Regression Model Dynamic pruning is performed on subtrees with low prediction contribution or high redundancy. The process steps are as follows: Figure 2 As shown.
[0067] Combination Figure 2 As shown, dynamic pruning is performed on subtrees with low prediction contribution or high redundancy, including the following steps S204-S206:
[0068] S204: Calculate the statistical properties of the predicted weights, including the weight mean. :
[0069] (7)
[0070] Weighted standard deviation :
[0071] (8)
[0072] S205: Set pruning threshold Its form of expression is:
[0073] (9)
[0074] in, This is a hyperparameter used to adjust the strictness of pruning.
[0075] S206: Perform pruning when the prediction weight corresponding to a certain subtree satisfies: When, retain the subtree; when At that time, the subtree should be pruned.
[0076] S105, after completing subtree pruning, the final blood glucose prediction result is calculated using a weighted fusion method based on prediction weights. :
[0077] (10)
[0078] in, This represents the number of saplings retained after pruning. Represents the set of subtree prediction results The Middle Subtrees for input samples The predicted output, This indicates the prediction weight of the corresponding subtree.
[0079] The subtree adaptive weighted pruning blood glucose prediction method based on Extra Trees regression provided by this invention effectively overcomes the problems of difficulty in quantifying the prediction contribution of subtrees, high model redundancy, and insufficient generalization ability of fixed weight fusion methods in the prior art, and improves the prediction accuracy and stability of blood glucose prediction models under small sample conditions.
[0080] The above description is only a preferred embodiment of the present invention. It should be noted that, for those skilled in the art, various improvements, substitutions or modifications can be made to the present invention without departing from the technical principles and core concepts of the present invention, and such improvements, substitutions or modifications should all fall within the protection scope of the present invention.
Claims
1. An Extra Trees regression-based sub-tree adaptive weighted pruning blood glucose prediction method, characterized in that, The method comprises the following steps: Step 1: Obtain a dataset containing human bioelectrical impedance data and blood glucose data , which is divided into a training set, a validation set, and a test set; Step 2: Train the Extra Trees regression model based on the training set, extract the prediction output of each sub-tree in the model and the overall prediction output of the sample by the Extra Trees regression model , the prediction output of the sub-tree and the overall prediction output are spliced to construct a set of sub-tree prediction results , which is formally represented as , represents the number of sub-trees in the Extra Trees regression model; Step 3: using the mapping relationship between the prediction results of the sub-trees in the verification set and the true blood glucose values, introducing a Bayesian ridge regression model to probabilistically model the prediction contribution of the sub-trees, and obtaining the prediction weight distribution corresponding to each sub-tree; On the validation set The set of sub-tree prediction results corresponding to one sample can be represented as a matrix : (1) wherein, represents the prediction output of the i-th validation sample under the j-th sub-tree, is the index of the sample, , represents that there are samples in the data set, is the index of the sub-tree, ; The corresponding true blood glucose value vector is represented as: , a Bayesian ridge regression model is constructed (2) wherein is the k-th sub-tree prediction result of the set of sub-tree prediction results, is the set of sub-tree results is the prediction weight vector corresponding to each sub-tree in the set of sub-tree prediction results is the noise term, denotes the set of sub-tree prediction results contains the number of sub-trees in the set of sub-tree prediction results ; normalizing the weights, subtree prediction result set in the middle the importance of the subtree to the overall prediction; (3) Computing the expected value of the feature importance distribution and the standard deviation (4) (5) wherein, represents the average level of the overall sub-tree contribution, measures the dispersion of the sub-tree contribution; Step 4: Establishing a Bayesian ridge regression model to obtain the prediction weight of each sub-tree , constructing a sub-tree weight pruning threshold , and screening and pruning the sub-trees according to the pruning threshold, the pruning threshold is determined according to the following formula: (6) wherein is a hyperparameter used to adjust the strictness of pruning, when the subtree is kept; when the subtree is pruned; Step 5: Perform ensemble calculation based on the pruned sub-tree prediction outputs to obtain the final blood glucose prediction result ; (7) wherein, is the number of pruned subtrees, denotes a set of prediction results of subtrees the prediction output of the -th subtree for an input sample , and denotes the prediction weight of the corresponding subtree.
2. The method of claim 1, wherein the method is based on Extra Trees regression with sub-tree adaptive weighted pruning for blood glucose prediction. The dataset Impedance, amplitude, phase difference and physiological characteristics acquired under different excitation frequencies are included.
3. The method of claim 1, wherein the method is based on Extra Trees regression with sub-tree adaptive weighted pruning for blood glucose prediction. The set of sub-tree prediction results is used to represent the prediction differences of each sub-tree model.
4. The method of claim 1, wherein the method is based on Extra Trees regression with sub-tree adaptive weighted pruning for blood glucose prediction. The Bayesian ridge regression model introduces a probabilistic prior constraint on the prediction output of each sub-tree, adaptively estimates the prediction weight of the sub-tree, and suppresses the prediction redundancy between multiple sub-trees.
5. The method of claim 1, wherein the method is based on Extra Trees regression with sub-tree adaptive weighted pruning for blood glucose prediction. The sub-tree pruning threshold is adaptively set according to the statistical distribution of the sub-tree prediction weight, and the pruning threshold is related to the mean and dispersion degree of the prediction weight.
6. The method of claim 1, wherein the method is based on Extra Trees regression with sub-tree adaptive weighted pruning for blood glucose prediction. The blood glucose prediction value integration calculation adopts a weighted fusion method based on the prediction weight to integrate the blood glucose prediction outputs of the sub-trees retained after pruning.