Diabetes evaluation method and system based on pulse waves
Pulse wave features are extracted using CEEMDAN and permutation entropy methods, and the random forest model is optimized using the dung beetle optimization algorithm, which solves the problems of model generalization ability and low computational efficiency in diabetes detection, achieves fast and accurate diabetes assessment and improves the model adaptability and interpretability.
Patent Information
- Application Number
- CN202410751308.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-10-11
AI Technical Summary
In the existing technology, pulse wave-based diabetes detection methods have problems such as insufficient model generalization ability, low computational efficiency, over-fitting or under-fitting, and poor model interpretability, making it difficult to be widely used in the medical field.
The method based on CEEMDAN and permutation entropy was used to denoise and extract features of pulse wave data to construct a data set, and the dung beetle optimization algorithm was used to optimize the random forest model for diabetes assessment, and the adaptability and robustness of the model were improved through data enhancement.
It achieves fast and accurate results for diabetes assessment, balances the generalization ability and computational efficiency of the model, avoids overfitting or underfitting, and improves the interpretability and adaptability of the model.
Smart Images

Figure CN118762830A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of neural network, and in particular relates to a diabetes assessment method and system based on pulse wave. Background Art
[0002] In recent years, researchers at home and abroad have adopted a variety of innovative technologies covering signal processing, feature engineering, model selection and optimization to improve the accuracy and availability of data in the study of diabetes detection based on pulse waves. Among them, some technicians adopted processing based on electromyographic noise and motion artifacts, and used time domain, frequency domain and nonlinear feature extraction techniques to obtain 52 features. After optimization of feature engineering, 29 key features were finally retained for sleep stage classification. The classification results of this method showed an overall classification performance of 74%. However, due to data quality issues, the generalization ability of the model is limited. In addition, this method uses a complex neural network model (GA-DBO-RBF), which may lead to overfitting, thereby affecting the accuracy of training.
[0003] Other technicians used the Stacking ensemble learning algorithm to verify the importance of arterial damage in early detection of diabetes by performing 9-level wavelet decomposition on the pulse signals of diabetic patients, with a high accuracy rate. Among them, the accuracy of the weak learner random forest can reach 91.1%. However, the Stacking ensemble learning algorithm may lead to poor interpretability of the model because it involves multiple learning levels. In the medical field, the interpretability of the model is very important because medical decisions usually require clear understanding and evidence support.
[0004] Other technicians used wavelet denoising, reasonable period segmentation and outlier removal. Through the ShuffleNet neural network, they successfully analyzed and processed the fingertip pulse signal and achieved the detection of hyperglycemia with an accuracy of up to 86%. Because this method lacks the optimization of the ShuffleNet network structure, that is, increasing the number of convolution kernels used in each layer. The network model recognition accuracy is low.
[0005] Other technicians used the selected features as input to 7 widely used machine learning algorithms, and evaluated the performance through stratified 10-fold cross-validation and adopted multiple regularization techniques to prevent overfitting. The experimental results show that the support vector machine based on the radial basis function model performed best, with an average accuracy of 84.7%, a g-mean of 84.54%, and an F-score of 84.03%.
[0006] Other technicians used improved signal preprocessing technology to analyze PPG and ECG signals, and combined with the extreme learning machine (ELM), convolutional neural network (CNN) and fractional order system method to achieve effective blood sugar detection with an accuracy of more than 85%. However, the computational cost required for deep learning is high, which is not conducive to commercialization and daily use.
[0007] Other technicians used a variety of machine learning methods. Through single pulse wave analysis, various frequency domain and time domain features of PPG single pulse were extracted, and these features were used to train the neural network for glucose detection. The experimental results showed that the decision tree algorithm performed best in diabetes prediction, with an accuracy rate of 89.97%. Because only a simple machine learning algorithm was used and the appropriate parameters were not found, the accuracy rate would be lower.
[0008] Therefore, how to design a diabetes assessment method and system that balances model generalization ability and computational efficiency, avoids overfitting or underfitting, and has good adaptability and robustness to data is an urgent problem to be solved by technical personnel in this field. Summary of the invention
[0009] In order to solve the problems existing in the prior art, the present invention proposes a diabetes assessment method and system based on pulse wave.
[0010] The technical solution of the present invention is as follows:
[0011] A method for evaluating diabetes based on pulse wave, comprising:
[0012] Extracting characteristic values related to reflecting basic signal forms and signal change rules from several groups of pulse wave data respectively, and obtaining the evaluation results of diabetes evaluation corresponding to each group of pulse wave data;
[0013] A sample set for model training is constructed based on the extracted feature values and evaluation results, wherein each sample in the sample set includes the feature value of the pulse wave data and its corresponding evaluation result;
[0014] Based on the sample set, a pre-built diabetes classification model is trained, and pulse wave-based diabetes assessment is performed based on the trained diabetes classification model.
[0015] Furthermore, the specific steps of extracting the characteristic values related to reflecting the basic form of the signal and the law of signal change include:
[0016] 1) De-noising the pulse wave data. The specific steps include:
[0017] 1.1) Based on the CEEMDAN method, the pulse wave data is decomposed to obtain the intrinsic mode function of the pulse wave data;
[0018] 1.2) Based on the permutation entropy method, the permutation entropy value of the intrinsic mode function is calculated, and the noisy intrinsic mode function is determined according to the size of the permutation entropy value and the set threshold, and the dividing point between noise and signal in the pulse wave data is delineated, and then the noisy intrinsic mode function is subjected to adaptive threshold processing;
[0019] 1.3) Reconstruct the denoised pulse wave data;
[0020] 2) Smoothing the denoised pulse wave data;
[0021] 3) Extract the time domain eigenvalues, entropy domain eigenvalues and statistical eigenvalues of the smoothed pulse wave data.
[0022] Further, the time domain features include the peak value, slope and time domain ratio of the pulse wave data value;
[0023] The entropy domain feature values include sample entropy and approximate entropy of pulse wave data;
[0024] The statistical characteristic values include the standard deviation and variance of the pulse wave data.
[0025] Furthermore, the specific steps of constructing a sample set for model training based on the extracted feature values and evaluation results include:
[0026] According to the characteristic values of different pulse wave data and their corresponding evaluation results, the original data set Ω = {d j |j=1,2,..,N},d j is the jth array in the original data set, and N is the total array in the original data set; each array in the original data set includes the feature values of all categories of the same pulse wave data and their corresponding evaluation results; for the jth array d in the original data set j , d j =[d 1j ,d 2j ,..,d ij ,..,d Ij ],d 1j ,d 2j ,d ij ,..,d Ij are the eigenvalues and their corresponding evaluation results in the 1st, 2nd, .., i, ..., Ith categories in the jth array; I is the total number of eigenvalue categories;
[0027] Perform data augmentation on the original data set to construct a sample set for model training.
[0028] Furthermore, the pre-constructed diabetes classification model is a random forest model optimized based on a dung beetle optimization algorithm.
[0029] Furthermore, the specific steps of training the pre-built diabetes classification model include:
[0030] Use the dung beetle optimization algorithm to optimize the random forest model and determine the number of decision trees and eigenvalues of the random forest model;
[0031] Based on the determined number of decision trees and eigenvalues, the eigenvalues in the sample set are used as input data, and the evaluation result data corresponding to the eigenvalues are used as labels to train the optimized random forest model.
[0032] Furthermore, the specific steps of optimizing the random forest model using the dung beetle optimization algorithm and determining the number of decision trees and the number of eigenvalues of the random forest model include:
[0033] Step 1) Set the maximum number of generations to T, the population size to N, randomly initialize the population and calculate the fitness value corresponding to the individual;
[0034] Step 2) Update the position of the ball-pushing dung beetle, obtain a random number λ and compare the random number λ with the set value γ. If the random number λ<γ, it is an obstacle-free state and the position is updated using formula (1). Otherwise, it is an obstacle state and the position is updated according to formula (3), where λ is a random number and λ∈[0,1], γ=0.9;
[0035]
[0036]
[0037]
[0038] Where t is the number of iterations; is the position of the e-th dung beetle at the t-th iteration; α is the natural coefficient; k is the deflection coefficient and k∈(0,0.2]; Δx is the change in simulated light intensity; X w is the global worst position; θ is the deflection angle expressed in radians; θ is a random number and θ∈[0,π], if θ is 0, π / 2 or π, the position is not updated;
[0039] Step 3) Update the position of the brooding ball according to formula (5) and use the upper and lower bounds in formula (4) to constrain the boundaries of the new position;
[0040] Lb * =max(X b* ×(1-Q),Lb)
[0041] Ub * =min(X b* ×(1+Q),Ub) (4)
[0042]
[0043] Where, Lb * is the upper limit of the spawning area; Ub * is the lower bound of the spawning area; X b* is the global optimal position of the population; Q = 1-t / T max , T max is the maximum number of iterations; Lb is the global upper bound; Ub is the global lower bound; is the position of the mth egg at the t+1th time; a1 and a2 are two 1×D independent random vectors, and D is the dimension of the solution to the optimization problem; is the position of the mth egg at the tth time;
[0044] Step 4) Update the position of the dung beetle by equation (6);
[0045]
[0046] In the formula, is the position of the h-th dung beetle after the t+1th generation; is the position of the h-th dung beetle after the t-th generation; C1 is a random number that follows a normal distribution; Lb′=max(X b ×(1-Q), Lb) is the upper bound of the most worrying foraging area; C2 is a random vector in the range of (0,1); Ub′=min(X b ×(1+Q),Ub) is the lower bound of the most worrying foraging area; b represents the global optimal position, Ub′ and Lb′ represent the upper and lower bounds of the most worrying foraging area respectively;
[0047] Step 5) Update the position of the thief dung beetle by equation (7);
[0048]
[0049] In the formula, is the position information of the zth thief dung beetle after the t+1th generation; is the position information X of the zth thief dung beetle after the tth generation b is the global worst position; S is a constant and is set to 0.5; g is a D-dimensional random row vector with each component between 0 and 1; X b Indicates the global most worrying position;
[0050] Step 6) Update the global optimal position X b and the worst position X w ;
[0051] Step 7) Determine whether the algorithm has reached the number of iterations. If so, terminate the operation and return to the optimal position, which is the optimal solution to the problem; otherwise, go to step 2).
[0052] A diabetes assessment system based on pulse wave, comprising:
[0053] A pulse wave data acquisition device, used to acquire pulse wave data of a target to be evaluated;
[0054] An evaluation processing device is used to execute any of the methods described above.
[0055] An electronic device comprises a memory and a processor, wherein the memory stores a computer program, and the processor is used to call and run the computer program stored in the memory to execute any of the methods described above.
[0056] A computer-readable storage medium stores a computer program, wherein the computer program implements the steps of any of the above methods when executed by a processor.
[0057] Compared with the prior art, the present invention has the following beneficial effects:
[0058] The present invention proposes a method and system for evaluating diabetes based on pulse wave, which extracts characteristic values related to the basic form of the signal and the law of signal change from several groups of pulse wave data, and obtains the evaluation results of diabetes evaluation corresponding to each pulse wave data; constructs a sample set for model training based on the extracted characteristic values and the evaluation results, trains the model, and performs pulse wave-based diabetes evaluation based on the trained diabetes classification model. The diabetes evaluation method and system evaluation method of the present invention are simple and easy to implement, and the evaluation results obtained are fast and accurate.
[0059] The evaluation method and system of the present invention adopt a random forest model optimized based on a dung beetle optimization algorithm, wherein the dung beetle optimization algorithm is used to optimize the number of decision trees in the random forest model, so that the diabetes evaluation method of the present invention can avoid overfitting or underfitting problems caused by an improper number of trees when processing complex data.
[0060] The diabetes assessment method and system of the present invention adopts a random forest model optimized based on a dung beetle optimization algorithm, wherein the dung beetle optimization algorithm is used to optimize the number of eigenvalues in the random forest model, thereby achieving an optimal balance between the model generalization ability and computational efficiency.
[0061] The diabetes assessment method and system of the present invention enhances the adaptability and robustness of the model to new data by performing data enhancement on the original data set. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 A schematic diagram of the process of the diabetes assessment method in the embodiment;
[0063] Figure 2 It is a flow chart of algorithm classification in the application embodiment;
[0064] Figure 3 This is a training set prediction effect diagram in the application embodiment;
[0065] Figure 4 It is the test set prediction effect in the application embodiment;
[0066] Figure 5 is the confusion matrix of the test set in the application embodiment;
[0067] Figure 6 is the confusion matrix of the training set in the application example. DETAILED DESCRIPTION
[0068] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, various equivalent modifications of the present invention by those skilled in the art all fall within the scope defined by the claims attached to this application.
[0069] Embodiment 1:
[0070] A diabetes assessment method based on pulse wave of the present invention, such as Figure 1 As shown, the specific steps are as follows:
[0071] S1. Extracting characteristic values related to reflecting basic signal forms and signal change rules from several groups of pulse wave data respectively, and obtaining the diabetes assessment results corresponding to each pulse wave data;
[0072] S2. constructing a sample set for model training based on the extracted feature values and evaluation results, wherein each sample in the sample set includes the feature value of the pulse wave data and its corresponding evaluation result;
[0073] S3. Based on the sample set, a pre-built diabetes classification model is trained, and pulse wave-based diabetes assessment is performed based on the trained diabetes classification model.
[0074] Embodiment 2:
[0075] This embodiment is further designed on the basis of the first embodiment in that the specific steps of extracting the characteristic values related to reflecting the basic form of the signal and the law of signal change in this embodiment include:
[0076] 1) De-noising the pulse wave data. The specific steps include:
[0077] 1.1) Based on the CEEMDAN method, the pulse wave data is decomposed to obtain the intrinsic mode functions (IMFs) of the pulse wave data;
[0078] 1.2) Based on the permutation entropy method, the permutation entropy value of the intrinsic mode function is calculated, and the noisy intrinsic mode function is determined according to the size of the permutation entropy value and the set threshold, and the dividing point between noise and signal in the pulse wave data is delineated, and then the noisy intrinsic mode function is processed by adaptive threshold, that is, the wavelet soft threshold noise reduction technology is used for processing;
[0079] 1.3) Reconstructing the denoised pulse wave data according to the intrinsic mode function after adaptive threshold processing;
[0080] 2) Smoothing the denoised pulse wave data; the smoothing process can select a moving average method according to the nature and needs of the diabetes data, determine the size of the smoothing window to be 21, and use the movmean function to smooth the original data according to the selected method and parameters to obtain smoothed data.
[0081] 3) Extract the time domain eigenvalues, entropy domain eigenvalues and statistical eigenvalues of the smoothed pulse wave data.
[0082] Embodiment three:
[0083] This embodiment is further designed on the basis of the second embodiment in that the time domain features in this example include the peak value, slope and time domain ratio of the pulse wave data value; the entropy domain feature values include the sample entropy and approximate entropy of the pulse wave data; and the statistical feature values include the standard deviation and variance of the pulse wave data.
[0084] Embodiment 4:
[0085] This embodiment is further designed on the basis of the first embodiment in that the specific steps of constructing a sample set for model training based on the extracted feature values and evaluation results in this embodiment include:
[0086] According to the characteristic values of different pulse wave data and their corresponding evaluation results, the original data set Ω = {d j |j=1,2,..,N},d j is the jth array in the original data set, and N is the total array in the original data set; each array in the original data set includes the feature values of all categories of the same pulse wave data and their corresponding evaluation results; for the jth array d in the original data set j , d j =[d 1j ,d 2j ,..,d ij ,..,d Ij ],d 1j ,d2j ,d ij ,..,d Ij are the eigenvalues and their corresponding evaluation results in the 1st, 2nd, .., i, ..., Ith categories in the jth array; I is the total number of eigenvalue categories. The evaluation results can be "1"-"2" or "disease"-"no disease".
[0087] Perform data augmentation on the original data set to construct a sample set for model training.
[0088] Embodiment five:
[0089] This embodiment is further designed on the basis of the first embodiment in that the diabetes classification model pre-constructed in this embodiment is a random forest model optimized based on the dung beetle optimization algorithm.
[0090] Embodiment six:
[0091] This embodiment is further designed on the basis of the fifth embodiment in that the specific steps of training the pre-built diabetes classification model in this embodiment include:
[0092] Use the dung beetle optimization algorithm to optimize the random forest model and determine the number of decision trees and eigenvalues of the random forest model;
[0093] Based on the determined number of decision trees and eigenvalues, the eigenvalues in the sample set are used as input data, and the evaluation result data corresponding to the eigenvalues are used as labels to train the optimized random forest model.
[0094] Specifically, a five-fold cross-validation method is used to calculate the random forest misclassification as the objective function, i.e., the minimum average error rate of the model, and the number of decision trees and eigenvalues of the model as the upper and lower limits. The task of the dung beetle optimization algorithm is to find those model parameters that can minimize the error rate. In this process, the dung beetle optimization algorithm will calculate the fitness value of the new position of the dung beetle according to the position update formula of each dung beetle population. Determine whether the fitness value of the current dung beetle population is better than the stored best fitness value. If so, save it, otherwise do not save it until the maximum number of iterations is reached. The optimal number of decision trees and eigenvalues of the model, as well as the eigenvalues and labels of the data set are used as input to construct the optimized random forest model.
[0095] Embodiment seven:
[0096] This embodiment is further designed on the basis of the sixth embodiment in that the random forest model is optimized by using the dung beetle optimization algorithm in this embodiment, and the specific steps of determining the number of decision trees and the number of eigenvalues of the random forest model include:
[0097] Step 1) Set the maximum number of generations to T, the population size to N, randomly initialize the population and calculate the fitness value corresponding to the individual.
[0098] Step 2) Update the position of the ball-pushing dung beetle, obtain a random number λ and compare the random number λ with the set value γ. If the random number λ<γ, the position is updated using formula (1) for an obstacle-free state. Otherwise, the position is updated according to formula (3) for an obstacle-infected state, where λ is a random number and λ∈[0,1], γ=0.9;
[0099]
[0100]
[0101]
[0102] Where t is the number of iterations; is the position of the e-th dung beetle at the t-th iteration; α is the natural coefficient, α is 1 or -1, simulating natural factors that cause the dung beetle to deviate from the original direction, α = 1 means no deviation, α = -1 means deviation from the original direction; k is the deflection coefficient and k∈(0,0.2]; Δx is the simulated change in light intensity, the larger Δx is, the weaker the light is; X w is the global worst position; θ is the deflection angle expressed in radians; θ is a random number and θ∈[0,π], if θ is 0, π / 2 or π, the position is not updated;
[0103] Step 3) Update the position of the brooding ball according to formula (5) and use the upper and lower bounds in formula (4) to constrain the boundaries of the new position;
[0104] Lb * =max(X b* ×(1-Q),Lb)
[0105] Ub * =min(X b* ×(1+Q),Ub) (4)
[0106]
[0107] Where, Lb * is the upper limit of the spawning area; Ub * is the lower bound of the spawning area; X b* is the global optimal position of the population; Q = 1-t / T max , T max is the maximum number of iterations; Lb is the global upper bound; Ub is the global lower bound; is the position of the mth egg at the t+1th time; a1 and a2 are two 1×D independent random vectors, and D is the dimension of the solution to the optimization problem; is the position of the mth egg at the tth time;
[0108] Step 4) Update the position of the dung beetle by equation (6);
[0109]
[0110] In the formula, is the position of the h-th dung beetle after the t+1th generation; is the position of the h-th dung beetle after the t-th generation; C1 is a random number that follows a normal distribution; Lb′=max(X b ×(1-Q), Lb) is the upper bound of the most worrying foraging area; C2 is a random vector in the range of (0,1); Ub′=min(X b ×(1+Q),Ub) is the lower bound of the most worrying foraging area; b represents the global optimal position, Ub′ and Lb′ represent the upper and lower bounds of the most worrying foraging area respectively; the definitions of Q, Lb and Ub are the same as those in formula (4).
[0111] Step 5) Update the position of the thief dung beetle by equation (7);
[0112]
[0113] In the formula, is the position information of the zth thief dung beetle after the t+1th generation; T z t is the position information X of the zth thief dung beetle after the tth generation b is the global worst position; S is a constant and is set to 0.5; g is a D-dimensional random row vector with each component between 0 and 1; X b Indicates the global worst position; X b* The content of is the same as that described in formula (4);
[0114] Step 6) Update the global optimal position X b and the worst position X w ;
[0115] Step 7) Determine whether the algorithm has reached the number of iterations. If so, terminate the operation and return to the optimal position, which is the optimal solution to the problem; otherwise, go to step 2).
[0116] Embodiment eight:
[0117] A diabetes assessment system based on pulse wave of the present invention comprises:
[0118] A pulse wave data acquisition device, used to acquire pulse wave data of a target to be evaluated;
[0119] An evaluation and processing device is used to execute the method described in any of the above embodiments.
[0120] Embodiment nine:
[0121] An electronic device of the present invention includes a memory and a processor, wherein the memory stores a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method described in any of the above embodiments.
[0122] A computer-readable storage medium of the present invention stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any of the above embodiments are implemented.
[0123] Application examples:
[0124] This example uses the pulse wave-based diabetes assessment system of the present invention to simulate the implementation of the pulse wave-based diabetes assessment method of the present invention. In this example, the pulse wave data of several targets to be evaluated are collected through a pulse wave data acquisition device; the PPG waveform of the left fingertips and the blood pressure data of the right forearm of the target to be evaluated are synchronously collected by professional medical staff through the portable hardware device. The sampling rate of the entire data recording process is 1kHz, and the accuracy is 12-bit AD conversion. The data of each subject is divided into three segments, each segment contains 2100 sampling points, corresponding to a duration of 2.1 seconds. Several groups of pulse wave data can be obtained through the pulse wave data acquisition device.
[0125] In the preprocessing stage, this example uses CEEMDAN+PE+wavelet threshold denoising technology to achieve accurate processing of pulse wave signals. First, the CEEMDAN algorithm is used to perform multi-level decomposition of the original signal. Through multiple EMD decompositions and the introduction of white noise, the modal aliasing problem in the traditional EMD method is effectively solved, and 11 intrinsic mode function (IMF) components are obtained. After obtaining the IMF components, the permutation entropy (PE) is introduced to evaluate the complexity and regularity of each component to determine whether the component mainly contains useful signals or noise. When the permutation entropy value of an IMF component exceeds the preset threshold, it is inferred that the component mainly reflects random noise. For the noise-dominated IMF components, the wavelet threshold denoising technology is used for processing, and the soft threshold method is used to denoise the IMF components with a threshold greater than 0.3. All IMF components after wavelet threshold denoising are recombined to achieve denoising reconstruction of the original signal, thereby effectively extracting the true characteristics of the signal and improving the accuracy and reliability of subsequent analysis and processing.
[0126] In the feature value extraction stage, this example extracts 29 types of feature values from the pulse wave data, covering time domain feature values, entropy domain feature values and statistical feature values, thereby constructing a comprehensive feature set. Among them, the time domain feature values mainly include the peak value, slope, time domain ratio, etc. of the signal, which can intuitively reflect the basic form and change law of the signal. For example, the peak value and mean value of the pulse wave can reflect the intensity and average level of blood flow, while the waveform slope is related to the relaxation speed of the heart. In addition to the time domain feature values, the entropy domain feature values also play an important role in pulse wave analysis. Entropy is a method to measure the complexity of the signal. Commonly used entropy features such as sample entropy and approximate entropy help evaluate the predictability and regularity of the signal. In the context of cardiovascular disease, changes in entropy values often imply abnormal physiological states, so entropy domain features have potential application value in distinguishing between healthy and diseased states. Statistical feature values provide another perspective to analyze pulse wave signals, including the standard deviation and variance of the signal. These statistical parameters help capture the distribution characteristics and extreme values of the signal, which is particularly important for identifying abnormal waveforms.
[0127] In this example, the missing values of the pulse wave data are also processed during the stage of constructing the feature data set. Missing values may occur due to a variety of factors, including limitations of the signal capture equipment, poor sensor contact, or changes in the physiological conditions of the subjects. In order to ensure the quality of the data and the accuracy of the research results, it is crucial to process missing values. This example chooses to delete data records with missing values as a solution.
[0128] In order to solve the problem of sample imbalance, this example performs data enhancement on the original data set and constructs a sample set for model training. The data diversity is increased by balancing the sample data volume, so that the model can learn more prosperous features. Sample imbalance is a common problem in machine learning, especially in the medical field, where the data of healthy individuals is often richer than that of diseased individuals. In the data set, the number of samples of disease-free patients is much greater than that of diseased patients, which causes the model to pay too much attention to the features of the majority class (disease-free patients) during the learning process, and does not fully learn the key features for judging the minority class (disease-free patients). This example uses the synthetic minority oversampling technique (SMOTE), which increases the sample size of the minority class by inserting new synthetic samples between the minority class samples. SMOTE not only increases the number of minority classes, but also increases the diversity of data.
[0129] This example uses a random forest model based on the dung beetle optimization algorithm (DBO). DBO divides the population into four roles according to the different social divisions of dung beetles: ball-pushing dung beetles, brooding ball dung beetles, small dung beetles, and thief dung beetles. When the total population is 30, the number of these four roles is set to 6, 6, 7, and 11, respectively. The position of each dung beetle is represented by different symbols, namely R, B, L, and T, which represent the position of the dung beetle in the solution space. When the population size N = 30, the number of these four dung beetles is set to 6, 6, 7, and 11, respectively. If the dimension of the optimization problem is D, and the corresponding objective function is f, then the position of each dung beetle, that is, a solution to the problem, is expressed as X = {x i 1,x i 2···,x i D}, the individual fitness value, that is, the most worrying value, is expressed as f(x i ), R e , B m , L h , T z And the corresponding fitness value is expressed as X i According to different strategies, the positions of the dung beetles of each role are updated, and the survival ability of the dung beetles is evaluated according to the fitness. Assuming that the smaller the fitness value, the better the optimization effect, then the smaller the fitness value, the better the position of the dung beetle, and the stronger its survival ability. The mathematical representation of the optimal and worst positions is as follows:
[0130]
[0131] The final optimal position X b That is the optimal solution to the problem being solved. The specific algorithm classification process is as follows Figure 2 shown.
[0132] In this example, the number of decision trees is set between 100 and 200, and the optimal number of features for each split is set between 1 and 5. In addition, the model is trained with 30 populations, and the total number of iterations is set to 50.
[0133] The prediction evaluation results on the training set and test set are as follows Figure 3 and Figure 4 As shown, Figure 3 and Figure 4 The "DBO-RF" in is the predicted value of the present invention. Figure 3 and Figure 4 It can be seen that the model accuracy of the method of the present invention on the training set reaches 100%, and the model accuracy on the test set reaches 92.9%. Therefore, it can be seen that the evaluation result obtained by the diabetes evaluation method of the present invention is accurate.
[0134] In this example, the random forest model (RF) that has not been optimized by the dung beetle optimization algorithm is used as a comparison model. The model performance of the model constructed by the present invention (DBO-RF) and the comparison model is evaluated by the confusion matrix. The confusion matrix of the test set and the confusion matrix of the training set are shown in Figure 5 and Figure 6 As shown in Table 1, the quality of the model is evaluated by calculating the confusion matrix obtained through training, the precision, recall rate, and F1-Score indicators, and compared with the RF algorithm. The results are shown in Table 1.
[0135] Table 1 Model evaluation results
[0136] Accuracy Accuracy Recall F1 score RF 89.4% 90.0% 89.1% 0.895 DBO-RF 92.7% 94.7% 90.9% 0.927
[0137] According to the data in Table 1, it can be observed that the DBO-RF model of the present invention is superior to the RF model in all evaluation indicators, which shows that the overall performance of the DBO-RF model of the present invention has been significantly improved. In particular, the substantial improvement in precision and recall further proves the advantage of the DBO-RF model of the present invention in effectively identifying positive samples.
Claims
1. A method for evaluating diabetes based on pulse wave, characterized in that: include Extracting characteristic values related to reflecting basic signal forms and signal change rules from several groups of pulse wave data respectively, and obtaining the evaluation results of diabetes evaluation corresponding to each group of pulse wave data; A sample set for model training is constructed based on the extracted feature values and evaluation results, wherein each sample in the sample set includes the feature value of the pulse wave data and its corresponding evaluation result; Based on the sample set, a pre-built diabetes classification model is trained, and pulse wave-based diabetes assessment is performed based on the trained diabetes classification model.
2. The method for evaluating diabetes based on pulse wave according to claim 1, characterized in that: The specific steps of extracting the characteristic values related to reflecting the basic form of the signal and the law of signal change include: 1) De-noising the pulse wave data. The specific steps include: 1.1) Based on the CEEMDAN method, the pulse wave data is decomposed to obtain the intrinsic mode function of the pulse wave data; 1.2) Based on the permutation entropy method, the permutation entropy value of the intrinsic mode function is calculated, and the noisy intrinsic mode function is determined according to the size of the permutation entropy value and the set threshold, and the dividing point between noise and signal in the pulse wave data is delineated, and then the noisy intrinsic mode function is subjected to adaptive threshold processing; 1.3) Reconstruct the denoised pulse wave data; 2) Smoothing the denoised pulse wave data; 3) Extract the time domain eigenvalues, entropy domain eigenvalues and statistical eigenvalues of the smoothed pulse wave data.
3. The method for evaluating diabetes based on pulse wave according to claim 2, characterized in that: The time domain features include the peak value, slope and time domain ratio of the pulse wave data value; The entropy domain feature values include sample entropy and approximate entropy of pulse wave data; The statistical characteristic values include the standard deviation and variance of the pulse wave data.
4. The method for evaluating diabetes based on pulse wave according to claim 1, characterized in that: The specific steps of constructing a sample set for model training based on the extracted feature values and evaluation results include: According to the characteristic values of different pulse wave data and their corresponding evaluation results, the original data set Ω = {d j |j=1,2,..,N},d j is the jth array in the original data set, and N is the total array in the original data set; each array in the original data set includes the feature values of all categories of the same pulse wave data and their corresponding evaluation results; for the jth array d in the original data set j , d j =[d 1j ,d 2j ,..,d ij ,..,d Ij ],d 1j ,d 2j ,d ij ,..,d Ij are the eigenvalues and their corresponding evaluation results in the 1st, 2nd, .., i, ..., Ith categories in the jth array; I is the total number of eigenvalue categories; Perform data augmentation on the original data set to construct a sample set for model training.
5. The method for evaluating diabetes based on pulse wave according to claim 1, characterized in that: The pre-built diabetes classification model is a random forest model optimized based on the dung beetle optimization algorithm.
6. The method for evaluating diabetes based on pulse wave according to claim 5, characterized in that: The specific steps of training the pre-built diabetes classification model include: Use the dung beetle optimization algorithm to optimize the random forest model and determine the number of decision trees and eigenvalues of the random forest model; Based on the determined number of decision trees and eigenvalues, the eigenvalues in the sample set are used as input data, and the evaluation result data corresponding to the eigenvalues are used as labels to train the optimized random forest model.
7. The method for evaluating diabetes based on pulse wave according to claim 6, characterized in that: The specific steps of optimizing the random forest model by using the dung beetle optimization algorithm and determining the number of decision trees and the number of eigenvalues of the random forest model include: Step 1) Set the maximum number of generations to T, the population size to N, randomly initialize the population and calculate the fitness value corresponding to the individual; Step 2) Update the position of the ball-pushing dung beetle, obtain a random number λ and compare the random number λ with the set value γ. If the random number λ<γ, it is an obstacle-free state and the position is updated using formula (1). Otherwise, it is an obstacle state and the position is updated according to formula (3), where λ is a random number and λ∈[0,1], γ=0.9; Where t is the number of iterations; is the position of the e-th dung beetle at the t-th iteration; α is the natural coefficient; k is the deflection coefficient and k∈(0,0.2]; Δx is the change in simulated light intensity; X w is the global worst position; θ is the deflection angle expressed in radians; θ is a random number and θ∈[0,π], if θ is 0, π / 2 or π, the position is not updated; Step 3) Update the position of the brooding ball according to formula (5) and use the upper and lower bounds in formula (4) to constrain the boundaries of the new position; Lb * =max(X b* ×(1-Q),Lb) Ub * =min(X b* ×(1+Q),Ub)(4) Where, Lb * is the upper limit of the spawning area; Ub * is the lower bound of the spawning area; X b* is the global optimal position of the population; Q = 1-t / T max , T max is the maximum number of iterations; Lb is the global upper bound; Ub is the global lower bound; is the position of the mth egg at the t+1th time; a1 and a2 are two 1×D independent random vectors, and D is the dimension of the solution to the optimization problem; is the position of the mth egg at the tth time; Step 4) Update the position of the dung beetle by equation (6); In the formula, is the position of the h-th dung beetle after the t+1th generation; is the position of the h-th dung beetle after the t-th generation; C1 is a random number that follows a normal distribution; Lb′=max(X b ×(1-Q), Lb) is the upper bound of the most worrying foraging area; C2 is a random vector in the range of (0,1); Ub′=min(X b ×(1+Q),Ub) is the lower bound of the most worrying foraging area; b represents the global optimal position, Ub′ and Lb′ represent the upper and lower bounds of the most worrying foraging area respectively; Step 5) Update the position of the thief dung beetle by equation (7); In the formula, is the position information of the zth thief dung beetle after the t+1th generation; is the position information X of the zth thief dung beetle after the tth generation b is the global worst position; S is a constant and is set to 0.5; g is a D-dimensional random row vector with each component between 0 and 1; X b Indicates the global most worrying position; Step 6) Update the global optimal position X b and the worst position X w ; Step 7) Determine whether the algorithm has reached the number of iterations. If so, terminate the operation and return to the optimal position, which is the optimal solution to the problem; otherwise, go to step 2).
8. A diabetes assessment system based on pulse wave, characterized in that: include: A pulse wave data acquisition device, used to acquire pulse wave data of a target to be evaluated; An evaluation processing device for executing the method according to any one of claims 1 to 7.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory stores a computer program, and the processor is configured to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method as claimed in any one of claims 1 to 7 are implemented.
