Human body electrical impedance and blood glucose relation model establishing method based on improved weighted least square support vector machine

By improving the weighted least squares support vector machine and butterfly optimization algorithm to optimize the kernel parameters and punishment factors, a model of the relationship between human electrical impedance and blood glucose was established, and the problem of insufficient robustness of the model in non-invasive blood glucose detection was solved, and higher accuracy and stability were achieved.

CN119943341AActive Publication Date: 2025-05-06GUILIN UNIV OF ELECTRONIC TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510013042.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2025-05-06
Estimated Expiration
2045-01-06

AI Technical Summary

Technical Problem

When existing non-invasive blood glucose detection technology processes unbalanced data and noisy data, the fitting performance is degraded and the model is not robust, resulting in insufficient detection accuracy.

Method used

The improved weighted least squares support vector machine is adopted to optimize the kernel parameters and punishment factors by introducing adaptive weighting factors and butterfly optimization algorithms, establish a relationship model of the human body's electrical impedance and blood glucose, dynamically adjust the sample weight and optimize the model parameters.

Benefits of technology

It improves the robustness and noise resistance of the model on the unbalanced data set, improves the accuracy and stability of blood sugar prediction, and reduces the time and complexity of manual parameter adjustment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119943341A_ABST
    Figure CN119943341A_ABST
Patent Text Reader

Abstract

The invention discloses a human body electrical impedance and blood glucose relation model establishing method based on an improved weighted least square support vector machine, which comprises the following steps of: 1, acquiring an original data set containing human body electrical impedance data and blood glucose data, and dividing the data set into a training set, a verification set and a test set, performing same Butterworth filtering and standardization processing on the human body electrical impedance data of each set; step 2, introducing an adaptive weight factor into a target optimization function of the weighted least square support vector machine; 3, training is carried out through training set data, a human body electrical impedance and blood glucose relation model based on a weighted least square support vector machine is established, and kernel parameters and penalty factors of the model are optimized through a butterfly optimization algorithm; and step 4, training by using the optimized kernel parameters and penalty factors to obtain a human body electrical impedance and blood glucose relation model based on an improved weighted least square support vector machine. According to the method, the modeling efficiency and the blood glucose prediction precision are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of blood sugar prediction models, in particular to a method for establishing a human body electrical impedance and blood sugar relationship model based on an improved weighted least squares support vector machine. Background Art

[0002] Diabetes has become a major global public health issue. With the change of lifestyle and the aging of the population, the incidence and prevalence of diabetes continue to rise worldwide. According to data released by the International Diabetes Federation, as of 2021, the number of people with diabetes in the world has exceeded 500 million, and this number is expected to grow further in the future. At present, the prevention and management of diabetes mainly rely on a healthy lifestyle, early screening and regular monitoring of blood sugar levels.

[0003] Traditional blood sugar testing methods mainly rely on invasive testing, which carries the risk of pain and infection and is not suitable for long-term continuous testing. For this reason, a variety of non-invasive blood sugar testing technologies have emerged in recent years. However, existing non-invasive testing technologies still face challenges in terms of accuracy and stability. For example, in the modeling process, actual data sets usually have more samples of healthy people, while high blood sugar samples are relatively scarce, resulting in an imbalance in the data set. Existing technologies are prone to problems such as reduced fitting performance or non-robust models when processing unbalanced data and noisy data. Summary of the invention

[0004] In order to solve the problems of decreased fitting performance and non-robust model caused by unbalanced data and noisy data in the existing non-invasive blood glucose detection technology, the present invention provides a method for establishing a human electrical impedance and blood glucose relationship model based on an improved weighted least squares support vector machine.

[0005] In order to achieve the above object, the present invention provides the following technical solutions:

[0006] Step 1: Obtain the original data set containing human body electrical impedance data Z and blood glucose data G The data were divided into training set, validation set and test set according to the ratio of 7:1.5:1.5. The human body impedance data in each set were filtered in the same way using Butterworth filter. The parameters were set as follows: cutoff frequency was 0.1MHz, sampling frequency was 1.0MHz, filter order was 5, and the human body impedance data in the filtered training set were standardized. The standardization formula was:

[0007]

[0008] in, It is the human body electrical impedance data after filtering in the training set. is the mean value of the human body electrical impedance data after filtering in the training set, is the standard deviation of the filtered human body electrical impedance data in the training set.

[0009] Use the mean μ of the training set Z and standard deviation σ Z The filtered human body electrical impedance data in the validation set and test set are standardized to obtain a standardized validation set. and test set

[0010] Step 2: Introduce the adaptive weight factor v into the objective optimization function of the weighted least squares support vector machine i , according to the sample residual ξ i And the residual mean μ is dynamically adjusted, and the calculation formula is:

[0011]

[0012] Among them, ξ i is the residual of sample i, μ is the residual ξ i The mean value of k 1 =1.31 is a parameter used to control the influence range of the error. is the residual ξ i The degree of deviation from Gaussian distribution is expressed as:

[0013]

[0014] Where IQR is ξ i The interquartile range of the distribution, which is the difference between the upper and lower quartiles.

[0015] Based on the weighted least squares support vector machine, a model of the relationship between human electrical impedance and blood sugar is established. Given a training set The goal is to find the optimal function G(Z) by minimizing the weighted objective function, which is expressed as:

[0016] G(Z)=w T φ(Z)+b(4)

[0017] Where G(Z) is the output blood glucose value, w is the weight vector, Z is the input human body electrical impedance data, b is the bias term, φ(Z) is a nonlinear mapping that maps the input space to a high-dimensional feature space using the RBF kernel function, and its expression is:

[0018]

[0019] Among them, K is the kernel function, is the input sample point, ||·|| represents the Euclidean distance between two sample points, and σ is the kernel parameter.

[0020] The objective optimization function during training is as follows:

[0021]

[0022] Among them, w is the weight vector, b is the bias term, γ is the penalty factor, is the residual of sample i, G i and The training set The true value and predicted value of the i-th sample in .

[0023] Step 3, using the butterfly optimization algorithm to optimize the kernel parameters and penalty factors of the human body electrical impedance and blood glucose relationship model based on the weighted least squares support vector machine, including steps 3.1-3.6:

[0024] Step 3.1, set the optimization parameter range: kernel parameter σ∈[0.01,0.3] and penalty factor γ∈[300,1500], set the total number of butterfly individuals N=20 and the maximum number of iterations max_iter=100, define the parameter combination of the human body electrical impedance and blood glucose relationship model based on weighted least squares support vector machine as the butterfly position, and randomly generate the initial position h for each butterfly individual k k =(σ k ,γ k ), initialize the butterfly population H = {h 1 ,h 2 ,...,h N}.

[0025] Step 3.2, fitness function calculation, using the position h of the butterfly individual k For the training set The data is used for training and the validation set is used for The mean square error is used as the fitness of the butterfly individual, and the fitness function expression is:

[0026]

[0027] In the formula, f(h k ) is the butterfly individual k at position h k The fitness of G, p is the total number of samples in the validation set, j and are the true blood glucose value and predicted value of the jth sample in the validation set, respectively.

[0028] Step 3.3, calculate the floral scent intensity of the individual butterfly according to the fitness value. The formula for calculating the floral scent intensity of the individual butterfly is:

[0029]

[0030] In the formula, and f(hk ) are the butterfly individual k at position h k The intensity and fitness of floral scent, c = 0.3 is the perception modality, ε = 10 -4 It is a very small positive number, α=2.5 is the power exponent.

[0031] Step 3.4: Determine the position of the butterfly individual with the strongest flower scent as the global optimal position h of the current butterfly population * , initialize the switching probability p = 0.5, and each butterfly individual generates a random number r between [0,1] k , if r k >p, the butterfly individual is attracted by the butterfly individual with the strongest flower fragrance, and updates its position using formula (9). k <p, the butterfly individual is attracted by the neighboring individuals and updates its position using formula (10). The formula for updating the position of the butterfly individual is as follows:

[0032]

[0033]

[0034] in, are the positions of the i-th, j-th, and k-th butterfly individuals at the t-th iteration, h * is the global optimal position, is the butterfly individual k at position h k The intensity of the floral scent.

[0035] Step 3.5: Calculate the fitness of the individual butterfly based on its new position and floral intensity If the new location The floral scent intensity is greater than the original position Then update the position of the individual to If the new location The floral fragrance intensity is greater than h * , then the global optimal position is updated to Update the corresponding floral scent intensity

[0036] Step 3.6: Repeat steps 3.2 to 3.5, continuously updating the position of the individual butterfly and the intensity of the floral scent until the maximum number of iterations is reached, and output the optimal position h * =(σ * ,γ * ).

[0037] Step 4: Use the optimized kernel parameter σ * and the penalty factor γ *Model training was performed to obtain a human body electrical impedance and blood glucose relationship model based on an improved weighted least squares support vector machine. Evaluate the performance of the model.

[0038] Compared with the prior art, the present invention has the following advantages:

[0039] The present invention designs an adaptive weight factor, which dynamically adjusts the weight of the sample according to the sample residual ξ i Different weight values ​​are assigned to the deviations from the residual mean μ, which effectively reduces the impact of outliers or noise data on model training, making the model more robust and anti-noise on unbalanced data sets, thereby improving the accuracy of blood glucose prediction. i When it deviates from the mean μ, the denominator increases, which makes the weight v i becomes smaller, so the weight of the sample point with a larger residual is smaller. If the error deviates more from the Gaussian distribution, that is, The value is larger, the weight v i The sensitivity to deviation is reduced, so that when the error does not meet the Gaussian distribution assumption, the weighted least squares support vector machine can be more tolerant to samples with large errors, and is more suitable for scenarios where non-Gaussian errors may be included in the prediction of blood glucose based on electrical impedance. The parameter k 1 The introduction of provides flexibility for controlling the error impact range. 1 The value of can control the threshold range of the error deviation from the mean μ, determine the range of errors that are considered acceptable, and balance the suppression effect of outliers.

[0040] The present invention adopts the butterfly optimization algorithm to optimize the kernel parameter σ and penalty factor γ of the weighted least squares support vector machine, which can effectively reduce the time and complexity of manual parameter adjustment, improve the parameter adjustment efficiency, and quickly find a suitable data parameter combination, so that the model has better generalization ability and improves the prediction stability in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0042] Figure 1 It is an overall framework diagram of the method for establishing a human body electrical impedance and blood sugar relationship model based on an improved weighted least squares support vector machine of the present invention.

[0043] Figure 2It is a flow chart of optimizing the weighted least squares support vector machine model by using the butterfly optimization algorithm in the present invention. DETAILED DESCRIPTION

[0044] 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.

[0045] In order to illustrate the technical solution of the present invention, a specific embodiment is provided below for illustration.

[0046] like Figure 1 As shown, the overall framework diagram of the method for establishing a human body electrical impedance and blood sugar relationship model based on an improved weighted least squares support vector machine is shown, including: S101 acquiring a data set, S102 designing an adaptive weight factor, S103 establishing a human body electrical impedance and blood sugar relationship model based on a weighted least squares support vector machine, optimizing the kernel parameters and penalty factors of the model using a butterfly optimization algorithm, and S104 training using the optimized kernel parameters and penalty factors to obtain a human body electrical impedance and blood sugar relationship model based on an improved weighted least squares support vector machine.

[0047] S101 obtains a data set, an original data set The human body impedance data Z and blood glucose data G are divided into training set, validation set and test set according to 7:1.5:1.5. The human body impedance data is filtered using Butterworth filter. The parameters are as follows: cutoff frequency is 0.1MHz, sampling frequency is 1.0MHz, filter order is 5. The filtered human body impedance data in the training set is standardized. The standardization formula is:

[0048]

[0049] in, It is the human body electrical impedance data after filtering in the training set. is the mean value of the human body electrical impedance data after filtering in the training set, is the standard deviation of the filtered human body electrical impedance data in the training set.

[0050] Use the mean μ of the training set Z and standard deviation σ Z The filtered human body electrical impedance data in the validation set and test set are standardized to obtain a standardized validation set. and test set

[0051] The adaptive weight factor is designed in S102, and its expression is:

[0052]

[0053] Among them, ξ i is the residual of sample i, μ is the residual ξ i The mean value of k 1 =1.31 is a parameter used to control the influence range of the error. is the residual ξ i The degree of deviation from Gaussian distribution is expressed as:

[0054]

[0055] Where IQR is ξ i The interquartile range of the distribution, which is the difference between the upper and lower quartiles.

[0056] S103 establishes a human body electrical impedance and blood glucose relationship model based on a weighted least squares support vector machine. The goal is to find the optimal function G(Z) by minimizing the weighted objective function, which is expressed as:

[0057] G(Z)=w T φ(Z)+b (4)

[0058] Where G(Z) is the output blood glucose value, w is the weight vector, Z is the input human body electrical impedance data, b is the bias term, φ(Z) is a nonlinear mapping that maps the input space to a high-dimensional feature space using the RBF kernel function, and its expression is:

[0059]

[0060] Among them, K is the kernel function, is the input sample point, ||·|| represents the Euclidean distance between two sample points, and σ is the kernel parameter.

[0061] The objective optimization function during training is as follows:

[0062]

[0063] Among them, w is the weight vector, b is the bias term, γ is the penalty factor, is the residual of sample i, G i Kazuko The training set The true value and predicted value of the i-th sample in .

[0064] In S103, the butterfly optimization algorithm is used to optimize the kernel parameters and penalty factors of the model. The process steps are as follows: Figure 2 shown.

[0065] Combination Figure 2 As shown, the butterfly optimization algorithm is used to optimize the kernel parameters and penalty factors of the human body electrical impedance and blood sugar relationship model based on the weighted least squares support vector machine, including the following steps S201-S209:

[0066] S201: Parameter setting and population initialization, set the optimization parameter range: kernel parameter σ∈[0.01,0.3] and penalty factor γ∈[300,1500], set the total number of butterfly individuals N=20 and the maximum number of iterations max_iter=100, define the parameter combination of the human body electrical impedance and blood glucose relationship model based on weighted least squares support vector machine as the butterfly position, and randomly generate the initial position h for each butterfly individual k k =(σ k ,γ k ), initialize the butterfly population H = {h 1 ,h 2 ,…,h N}.

[0067] S202: Fitness function calculation, using the position h of the butterfly individual k For the training set The data is used for training and the validation set is used for The mean square error is used as the fitness of the butterfly individual, and the fitness function expression is:

[0068]

[0069] In the formula, f(h k ) is the butterfly individual k at position h k The fitness of G, p is the total number of samples in the validation set, j and are the true blood glucose value and predicted value of the jth sample in the validation set, respectively.

[0070] S203: Calculate the floral scent intensity of the individual butterfly according to the fitness. The formula for calculating the floral scent intensity of the individual butterfly is:

[0071]

[0072] In the formula, and f(h k ) are the butterfly individual k at position h k The intensity and fitness of floral scent, c = 0.3 is the perception modality, ε = 10 -4 It is a very small positive number, α=2.5 is the power exponent.

[0073] S204: Determine the position of the butterfly individual with the strongest flower scent as the global optimal position h of the current butterfly population * , initialize the switching probability p = 0.5, and each butterfly individual generates a random number r between [0,1] k .

[0074] S205: If r k >p, the butterfly individual is attracted by the butterfly individual with the strongest flower fragrance, and updates its position using formula (8). k <p, the butterfly individual is attracted by the neighboring individuals and updates its position using formula (9). The formula for updating the position of the butterfly individual is as follows:

[0075]

[0076]

[0077] in, are the parameter combinations of the human body impedance and blood glucose relationship model at the tth iteration for the i-th, j-th and k-th butterflies respectively, h * is the global optimal parameter combination, is the kth butterfly in h k The floral intensity of the parameter combination.

[0078] S208: Calculate the fitness of individual butterflies based on their new positions and floral intensity If the new location The floral scent intensity is greater than the original position Then update the position of the individual to If the new location The floral fragrance intensity is greater than h * , then the global optimal position is updated to Update the corresponding floral scent intensity Repeat steps S202 to S205 to continuously update the position of the individual butterfly and the intensity of the flower scent until the maximum number of iterations is reached.

[0079] S209: Output optimal position h * =(σ * ,γ * ), using the optimized kernel parameter σ * and the penalty factor γ * Model training is performed to obtain the human body electrical impedance and blood glucose relationship model based on the improved weighted least squares support vector machine in S104, using the test set Evaluate the performance of the model.

[0080] The method for establishing a human electrical impedance and blood sugar relationship model based on an improved weighted least squares support vector machine provided by the present invention overcomes the problems of insufficient model robustness and limited parameter optimization capability in the prior art, and improves modeling efficiency and prediction accuracy.

[0081] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for establishing a human body electrical impedance and blood sugar relationship model based on an improved weighted least squares support vector machine, characterized in that: The following steps are involved: Step 1: Obtain the original data set containing human body electrical impedance data Z and blood glucose data G The data were divided into training set, validation set and test set according to the ratio of 7:1.5:1.

5. The human body impedance data in each set were filtered in the same way using Butterworth filter, and the filtered data were standardized in the same way to obtain the training set after filtering and standardization. Validation set and test set Step 2: Introduce the adaptive weight factor v into the objective optimization function of the weighted least squares support vector machine i ; Step 3: Using training set data As input, a human body electrical impedance and blood glucose relationship model based on weighted least squares support vector machine is established, and the kernel parameters and penalty factors of the model are optimized using the butterfly optimization algorithm; Step 4: Use the optimized kernel parameters and penalty factors to train and obtain the human body electrical impedance and blood glucose relationship model based on the improved weighted least squares support vector machine. Conduct performance evaluation.

2. The method for establishing a human body electrical impedance and blood sugar relationship model based on an improved weighted least squares support vector machine according to claim 1, characterized in that: In step 1, the Butterworth filter is a low-pass filter, and its parameter settings are: cut-off frequency is 0.1 MHz, sampling frequency is 1.0 MHz, and filter order is 5; The filtered human body electrical impedance data is subjected to the same standardization process. First, the filtered human body electrical impedance data in the training set is subjected to standardization process. The standardization formula is: in, It is the human body electrical impedance data after filtering in the training set. is the mean value of the human body electrical impedance data after filtering in the training set, is the standard deviation of the filtered human body impedance data in the training set, using the mean μ of the training set Z and standard deviation σ Z The filtered human body electrical impedance data in the validation set and test set are standardized to obtain a standardized validation set. and test set The training set For model parameter training, the validation set Used to calculate the fitness value when optimizing the butterfly algorithm. Used to evaluate the performance of the human body electrical impedance and blood sugar relationship model based on the improved weighted least squares support vector machine.

3. The method for establishing a human body electrical impedance and blood sugar relationship model based on an improved weighted least squares support vector machine according to claim 1, characterized in that: In step 2, the adaptive weight factor is based on the residual ξ of the sample i And the residual mean μ is dynamically adjusted, and its calculation formula is: Among them, ξ i is the residual of sample i, μ is the residual ξ i The mean value of k1=1.31 is a parameter used to control the influence range of the error. is the residual ξ i The degree of deviation from Gaussian distribution is expressed as: Where IQR is ξ i The interquartile range of the distribution, which is the difference between the upper and lower quartiles.

4. The method for establishing a human body electrical impedance and blood sugar relationship model based on an improved weighted least squares support vector machine according to claim 1, characterized in that: In step 3, the human body electrical impedance and blood glucose relationship model based on weighted least squares support vector machine is constructed, given a training set The goal is to find the optimal function G(Z) by minimizing the weighted objective function, which is expressed as: G(Z)=in T φ(Z)+b (4) Where G(Z) is the output blood glucose value, w is the weight vector, Z is the input human body electrical impedance data, b is the bias term, φ(Z) is a nonlinear mapping that maps the input space to a high-dimensional feature space using the RBF kernel function, and its expression is: Among them, K is the kernel function, Z i norm ,Z j norm is the input sample point, ||·|| represents the Euclidean distance between two sample points, and σ is the kernel parameter; The objective optimization function during training is as follows: Among them, w is the weight vector, b is the bias term, γ is the penalty factor, is the residual of sample i, G i and G(Z i norm ) are the training sets The true value and predicted value of the i-th sample in; The method of optimizing the kernel parameters and penalty factors of the model using the butterfly optimization algorithm includes steps S1-S6: Step S1, set the optimization parameter range: kernel parameter σ∈[0.01,0.3] and penalty factor γ∈[300,1500], set the total number of butterfly individuals N=20 and the maximum number of iterations max_iter=100, define the parameter combination of the human body electrical impedance and blood glucose relationship model based on weighted least squares support vector machine as the butterfly position, and randomly generate the initial position h for each butterfly individual k k =(σ k ,γ k ), initialize the butterfly population H = {h1,h2,...,h N }; Step S2, fitness function calculation, using the position h of the butterfly individual k For the training set The data is used for training and the validation set is used for The mean square error is used as the fitness of the butterfly individual, and the fitness function expression is: In the formula, f(h k ) is the butterfly individual at position h k The fitness of G, p is the total number of samples in the validation set, j and are the true blood glucose value and predicted value of the jth sample in the validation set; Step S3, calculating the floral scent intensity of the individual butterfly according to the fitness, and the formula for calculating the floral scent intensity of the individual butterfly is: In the formula, and f(h k ) are the butterfly individual k at position h k The intensity and fitness of floral scent, c = 0.3 is the perception modality, ε = 10 -4 is a small positive number, α = 2.5 is the power index; Step S4: determine the position of the butterfly individual with the strongest flower fragrance intensity as the global optimal position h of the current butterfly population * , initialize the switching probability p = 0.5, and each butterfly individual generates a random number r between [0,1] k , if r k >p, the butterfly individual is attracted by the butterfly individual with the strongest flower fragrance, and updates its position using formula (9). k <p, the butterfly individual is attracted by the neighboring individuals and updates its position using formula (10). The formula for updating the position of the butterfly individual is as follows: in, are the positions of the i-th, j-th, and k-th butterfly individuals at the t-th iteration, h * is the global optimal position, is the butterfly individual k at position h k The intensity of the floral aroma; Step S5: Calculate the fitness of the individual butterfly according to the new position and floral intensity If the new location The floral scent intensity is greater than the original position Then update the position of the individual to If the new location The floral fragrance intensity is greater than h * , then the global optimal position is updated to Update the corresponding floral scent intensity Step S6: Repeat steps S2 to S5, continuously updating the position of the individual butterfly and the intensity of the flower scent until the maximum number of iterations is reached, and output the optimal position h * =(σ * ,γ * ).

Citation Information

Patent Citations

  • Vehicle-mounted network fault diagnosis method based on machine learning

    CN115700593A

  • Composite fault diagnosis method based on improved distributed butterfly optimization algorithm

    CN117688479A