Parameter Estimation to an Anemia Model Using the Particle Swarm Optimization
* Author to whom correspondence should be addressed.
Sigma Journal of Engineering and Natural Sciences 2019, Vol. 37, Issue 4, pp. 1335-1347; doi.org/10.62051/ytu.sigma-journal-of-engineering-and-natural-sciences-parameter-estimation-to-an-anemia-model-using-the-particle-swarm-optimization
Abstract
Keywords: Anemia; medical model; linear model; particle swarm optimization.
1. Introduction
Anemia is defined clinically as blood hemoglobin value that is below the appropriate reference range for the individual. This decrease in the level of hemoglobin leads to the lack of access to the tissue a sufficient amount of oxygen and therefore appear in the symptoms of a headache, fatigue, inability to focus, attention, weakness, exhaustion, chest pain, cold hands, and feet. Anemia is one of the most common causes of blood diseases worldwide. There are many different types of anemia. Depending on the type, the symptoms of anemia can range from short episodes to chronic conditions. Each type of anemia produces a different case, ranging from moderate to severe and each has its own causes. Anemia can be either temporary or long-term [15]. The progress of medical models considered to produce medical outputs is important tools to deal with the behavior of a medical problem. They depend on the quality of any particular objective achieved on the state of knowledge about the system and how well successful modeling. As indicated in the literature [5-11], mathematical medical modelling has been realized to be a fundamentally important tool for the analysis of pathological characteristics. Response to a *
Corresponding Author: e-mail: sarim@yildiz.edu.tr, tel: (212) 383 43 60 1335
medical model to limits of performance is of major interest and thus the current medical model describes the relationship, between the biomedical variables and the diseases. The observational data may be modelled by a function linearly. Here the parameters for each of the variables in the linear medical model are estimated that to be the optimal model for more accurate prediction of anemia through the biomedical information. Many models have been produced in dealing with various medical problems in the literature such as congenital heart disease [12], diabetic nephropathy [13], osteoporosis [14], and cancers [15, 16]. A frequently encountered medical problem is that of having a set of data, which one wishes to describe it by a mathematical model and determine a set of parameters that characterize the model. In this study, the major emphasis will be the fitting parameters of the model assumed to have some particular medical or mathematical significance through estimating best values in the set of the parameters. Therefore, the main aim here is to develop a medical model to study the effect of the blood variables, sex, and age on the pathologies through a large group of the variables because there has been an increase in the incidence of anemia among different segments of society. Some other estimation methods [17-20] to analyze disease problems in addition to anemia. Heuristic algorithms can be effectively used to find the optimal parameters for the linear model in plenty of medical studies. Therefore, the PSO is one of the most efficient optimization algorithms that are used for a wide range of complex optimization problems. In computational science, the PSO is a computational method that works to improve the problem by repeatedly trying to improve the candidate solution. Therefore, these candidate solutions are created by the method repeatedly for improving the possibility of being the actual solution. The PSO proposed by Kennedy and Earhart [21] has been used to solve various optimization problems in the literature [22-33], to estimate the parameters of models and implemented different strategies of mathematical methods to predict and to optimize problems. Despite the recognized advantages of conventional methods, most of them suffer from various disadvantages such as high cost, difficulty in use, and time-consuming. In this case, optimization can be recalled as a very good alternative to the corresponding methods. In the past several years, the PSO has been successfully applied to areas to simplify optimization problems that had previously experienced serious difficulties. It is demonstrated that the PSO gets better results in a faster, cheaper way and the simplicity of the implementation, which are the most attractive features of this algorithm. Another reason that makes the PSO attractive is that reliable, robust, and considered as an effective meta-heuristic optimization algorithm. The PSO inspired by the behaviour of social models for flocking birds or fish education are based on individual improvement and social collaboration [34-38]. In this study, the PSO approach has been proposed to estimate the best parameter values of the linear medical model. This algorithm is common in the academic community as a typical tool because of its ability to optimize complex search spaces. Thus, the above advantages of the PSO sent us to use in dealing with the current medical problem. It should be borne in mind that fewer blood variables may cause the problem not to be effectively represented. This paper is structured as follows. The next section discusses the study samples of the medical dataset, explain the linear model procedure, the PSO algorithm, and how to test the model and estimate parameters of the linear medical model. Section 3 presents the results and discussion. Finally, conclusions and recommendation for future work have been detailed.
2.1. Study samples of the medical dataset
The data used here were collected from observations of anemia and included (539 subjects, 211 healthy subjects, 328 sick subjects) provided from blood laboratories in Iraq and we have
taken observations of the ages of individuals between (6-56) years. Here, we have some blood diseases are Iron deficiency anemia (1), Deficiency Vitamin B12 (2), Thalassemia (3), Sickle cell (4) and Spherocytosis (5). For each disease, we have samples for the individuals and for each individual readings of the blood variables are Hemoglobin (HB), Red Blood Cell (RBC), Mean Corpuscular Hemoglobin (MCH), White Blood Cell (WBC), Mean Corpuscular Volume (MCV), Haematocrit (HCT), Mean Corpuscular Hemoglobin Concentration (MCHC), Platelets (PLT), and sex (male (1) and female (2)), and age. The number of variables studied for the model is consisting of ten independent variables and a dependent variable. The dependent variable consists of six different types of output (healthy subject: 0 and blood diseases: 1-5).
2.2. Modelling
A linear model is an engine behind a multitude of data applications used for many forms of prediction. Therefore, processes are governed by linear models in various fields of science such as the estimation of the parameters of a linear medical model for predicting anemia. A linear medical model describes a linear relationship between the dependent and independent variables. The derived model is as follows: 𝒚 = 𝛽0 + 𝛽1 𝑥1 + 𝛽2 𝑥2 + ⋯ + 𝛽𝑘 𝑥𝑘 + 𝜖 = 𝛽0 + ∑𝑘𝑖=1 𝛽𝑖 𝑥𝑖 + 𝜖.
The linear model with 𝑘 predictor variables and the observations recorded for each of these 𝑛 levels can be expressed in the following style 𝑦1 = 𝛽0 + 𝛽1 𝑥11 + 𝛽2 𝑥12 + ⋯ + 𝛽𝑘 𝑥1𝑘 + 𝜖1 𝑦2 = 𝛽0 + 𝛽1 𝑥21 + 𝛽2 𝑥22 + ⋯ + 𝛽𝑘 𝑥2𝑘 + 𝜖2 ⋮ (2) 𝑦𝑖 = 𝛽0 + 𝛽1 𝑥𝑖1 + 𝛽2 𝑥𝑖2 + ⋯ + 𝛽𝑘 𝑥𝑖𝑘 + 𝜖𝑖 ⋮ 𝑦𝑛 = 𝛽0 + 𝛽1 𝑥𝑛1 + 𝛽2 𝑥𝑛2 + ⋯ + 𝛽𝑘 𝑥𝑛𝑘 + 𝜖𝑛 . Here 𝑦1 , 𝑦2 , … , 𝑦𝑛 and 𝑥1 , 𝑥2 , … , 𝑥𝑘 stand for the dependent and independent observations, respectively. System (2) can be reexpressed in a more compact way: 𝒚 = 𝜷𝑿 + 𝝐, with 𝑦1 1 𝑥11 𝑦2 1 𝑥21 𝒚 = [ ⋮ ], 𝑿 = [ ⋮ ⋮ 𝑦𝑛 1 𝑥𝑛1
𝑥1𝑘 𝜖1 𝛽0 𝑥2𝑘 𝜖2 𝛽1 ] , 𝜷 = [ ] and 𝝐 = [ ⋮ ] ⋮ ⋮ 𝜖𝑛 𝛽𝑘 𝑥𝑛𝑘
where 𝒚, 𝑿, 𝜷 and 𝝐 indicate to the observations, the parameters of the model and the unobserved random variable that adds noise to the linear relationship, respectively. To obtain the linear model, 𝜷 should be known. 𝜷 is estimated by minimizing the sum of the ̂ , the squared error function 𝑆𝑆𝐸(𝜷) under the consideration of the PSO. Knowing the estimates 𝜷 linear model can now be expressed as [39,40] ̂ 𝑿, ̂=𝜷 𝒚 (5) ̂ is the estimated value for 𝒚. where 𝒚
2.3. Particle Swarm Optimization
The PSO is a population-based stochastic approach, invented by Eberhart and Kennedy [21], for solving continuous and discrete problems. They inspired from social behavior of bird flocking or fish schooling, these animals have a major role in the development of the algorithm. The method optimizes a problem by trying to improve a solution. Each particle traces its coordinates in the area of the problem that relates to the best solutions carried out so far. This value is called pbest. Another "best" value that is tracked by the PSO is the best value, obtained so far by any particle in the neighbors of the particle. This location is called lbest. When the particle considers the whole population as its topological neighbors, the best value is a global best and is called gbest. The PSO idea consists of, at each time step, changing the velocity of each particle towards the pbest and lbest locations. In the PSO, simple software agents, called particles, move in the search space for improvement. These randomly selected particles search solution space using the information of their neighborhood, personal information, and randomness. The position of a particle represents a candidate solution to the existing improvement problem. All particles look for better sites in the search space by changing their velocity at the end of each iteration. Because of each iteration, the position and velocity vectors are expressed as follows: 𝑉𝑖𝑡+1 = 𝜔𝑉𝑖𝑡 + 𝑐1 𝑟1 (𝑃𝑏𝑒𝑠𝑡 − 𝑋𝑖𝑡 ) + 𝑐2 𝑟2 (𝐺𝑏𝑒𝑠𝑡 − 𝑋𝑖𝑡 )
where 𝑡, 𝜔, 𝑐1 , 𝑐2 , 𝑟1 , 𝑟2 , 𝑉𝑖𝑡 , 𝑋𝑖𝑡 , 𝑃𝑏𝑒𝑠𝑡 and 𝐺𝑏𝑒𝑠𝑡 indicate iteration number, weight parameter, acceleration coefficients (cognitive parameter, social parameter), random numbers uniformly distributed between 0 and 1, velocity of individual 𝑖 at iteration 𝑡, position of individual 𝑖 at iteration 𝑡, the best local value of each particle, the best value of swarm, respectively [38,41,42].
2.4. Test for the model
The coefficient of the determination, usually referred to as 𝑅2 , is a measure explaining the change in the relationship between all blood variables, sex, and age and the anemia types. Here, we present some initial considerations. Consider the variance of the observations 𝑦 by analyzing the total sum of squares, denoted by SST and the sum of squared errors, denoted by SSE. That is, 2
Now, the coefficient of the determination is defined by 𝑅2 =
If the percentage explained by the coefficient of the determination is small, compatibility may not be very appropriate. A terminological difference arises in the expression root mean squared error (RMSE). It is the square root of the average squared differences between the prediction and actual observations. The RMSE indicate the concentration of data around the model. In other words, it tells us how the data is centered around the most appropriate line [39,40,43]. It is very common to use the RMSE in the predictions. Then it is given by 𝑅𝑀𝑆𝐸 = √𝑀𝑆𝐸.
2.5. Estimation of the parameters of the linear medical model
The currently linear medical model is a linear equation for our data. The model is as follows: 𝒚 = 𝛽0 + 𝛽1 𝐻𝐵 + 𝛽2 𝑅𝐵𝐶 + 𝛽3 𝑀𝐶𝐻 + 𝛽4 𝑊𝐵𝐶 + 𝛽5 𝑀𝐶𝑉 + 𝛽6 𝐻𝐶𝑇 + 𝛽7 𝑀𝐶𝐻𝐶 + 𝛽8 𝑃𝐿𝑇 + 𝛽9 𝑆𝑒𝑥 + 𝛽10 𝐴𝑔𝑒 (13) where 𝒚 is the type of anemia and 𝛽𝑖 , 0 ≤ 𝑖 ≤ 10, are the parameters to be determined. Here HB, RBC, MCH, WBC, MCV, HCT, MCHC, PLT stand for Hemoglobin, Red Blood Cell, Mean Corpuscular Hemoglobin, White Blood Cell, Mean Corpuscular Volume, Haematocrit, Mean Corpuscular Hemoglobin Concentration, Platelets, respectively. As previously mentioned, the model can be represented in a more compact form as follows: ̂𝑿 ̂=𝜷 𝒚 (14) where 1 𝐻𝐵11 𝑦1 𝑦2 1 𝐻𝐵21 ̂ = [ ⋮ ], 𝑿 = [ 𝒚 ⋮ ⋮ 𝑦539 1 𝐻𝐵539,1
̂ represent the estimates for output (anemia), the independent observations ̂, 𝑿 and 𝜷 Here 𝒚 matrix, and estimated parameters, respectively. This study aims at estimating the parameters 𝜷 by minimizing the sum of the squared error function 𝑆𝑆𝐸(𝛽) under the consideration of the PSO. Hence, the fitness function in the PSO search engine is selected as the 𝑆𝑆𝐸(𝛽), specifically: 𝑆𝑆𝐸(𝛽) = ∑𝑛𝑖=1(𝑦𝑖 − 𝑓(𝑥𝑖 , 𝛽))2 .
For the linear model in equation (13), 𝑆𝑆𝐸(𝛽) = [𝑦𝑖 − (𝛽0 + 𝛽1 𝐻𝐵 + 𝛽2 𝑅𝐵𝐶 + 𝛽3 𝑀𝐶𝐻 + 𝛽4 𝑊𝐵𝐶 + 𝛽5 𝑀𝐶𝑉 + 𝛽6 𝐻𝐶𝑇 + 𝛽7 𝑀𝐶𝐻𝐶 + 𝛽8 𝑃𝐿𝑇 ∑539 𝑖=1 +𝛽9 𝑆𝑒𝑥 + 𝛽10 𝐴𝑔𝑒)]2 . (17) Here 𝑦𝑖 are the dependent observations, 𝛽𝑖 , 0 ≤ 𝑖 ≤ 10, are the parameters to be determined. In this article, the PSO is effectively used to estimate the parameters of the linear medical model in deriving an accurate model by finding a rapid convergence of the minimum value of the sum of the squared error in fewer iterations provides accurate estimates for parameter estimation of the linear medical model (see Tables 1-5). The settings for the main parameters of the PSO method (𝜔, 𝑐1 , 𝑐2 , and the size of the swarm) determine how to optimize the search space. Usually decreases the parameter 𝜔 from around 0.9 to around 0.4 during the computation, the appropriate value for the parameter 𝜔 provides a balance between the global and local exploration capacity of the swarm and thus a better solution [22,35-37]. If the parameter 𝜔 is much less than one, only a small momentum of the previous time step is preserved, thus rapid changes in the direction are possible with this setting. High settings near 1 facilitate global searching. The usual choices for acceleration coefficients are 𝑐1 and 𝑐2 , usually, 𝑐1 is equal to 𝑐2 and ranges between 0 and 4. The size of swarm plays a very important role in the PSO, as is the durability and complexity of the algorithm. By inspiring from the literature [22,36,37], we have produced our PSO algorithm as given in Figure 1.
Initialize the PSO parameters Calculate fitness of the initial population
Choose the particle with the best fitness value as a Pbest and Gbest i=0 Calculate fitness value SSE No SSE < Pbest Yes Set current value as the new Pbest No
i=0 Calculate particle velocity Update particle position Yes i = i+1
3. Results And Discussion
The current study focuses to obtain the best estimate of the parameters through the PSO for the currently derived linear model to detect the link between the biomedical variables and anemia. As opposed to the PSO approach, classical methods in dealing with linear models have some disadvantages as seen in the previous works [29-33], where they require many mathematical operations; like the Jacobean matrix, and matrix operations. The researchers estimated parameters of a great number of models by using the PSO in the literature [22-27]. They discussed different problems/models by using their own approaches. We have here studied a linear model for a great number of biomedical data of anemia through the PSO to estimate the parameters for the model and investigating the relationship between many blood variables and the anemia types as opposed to researchers in the literature [44-47], they used a very limited number of blood variables or a few the anemia types. Here, we have estimated the parameters of the linear model through the PSO algorithm (see Tables 1-4), and the produced results for various versions of the model by the minimum error (see Table 5). In the estimation, when the number of iterations is increasing, the error is decreasing as seen in Figures 2-5. Notice that the iteration reaches its optimum level at 4500. Table 1. Parameter estimation by the PSO algorithm when the iteration is 500 Biomedical Variables Constant HB RBC MCH WBC MCV HCT MCHC PLT Sex Age
Parameters 𝛽𝑖 , 0 ≤ 𝑖 ≤ 10 -3.167 -0.726 -0.634 0.901 0.009 0.125 0.062 -1.408 0.257 0.465 0.010
Figure 2. Sum of squared errors of the PSO algorithm when the iteration is 500
Table 2. Parameter estimation by the PSO algorithm when the iteration is 1000 Biomedical Variables Constant HB RBC MCH WBC MCV HCT MCHC PLT Sex Age
Parameters 𝛽𝑖 , 0 ≤ 𝑖 ≤ 10 7.799 1.399 1.141 -0.275 -0.018 0.114 -0.743 -0.149 0.002 0.596 0.023
Figure 3. Sum of squared errors of the PSO algorithm when the iteration is 1000 Table 3. Parameter estimation by the PSO algorithm when the iteration is 2000 Biomedical Variables Constant HB RBC MCH WBC MCV HCT MCHC PLT Sex Age
Parameters 𝛽𝑖 , 0 ≤ 𝑖 ≤ 10 5.603 0.252 0.270 0.146 0.0002 0.053 -0.304 -0.038 0.0008 -0.208 -0.013
Figure 4. Sum of squared errors of the PSO algorithm when the iteration is 2000 Table 4. Parameter estimation by the PSO algorithm when the iteration is 4500 Biomedical Variables Constant HB RBC MCH WBC MCV HCT MCHC PLT Sex Age
Parameters 𝛽𝑖 , 0 ≤ 𝑖 ≤ 10 6.345 -0.201 -0.461 -0.033 0.001 0.003 -0.022 0.003 0.001 -0.306 -0.009
Figure 5. Sum of squared errors of the PSO algorithm when the iteration is 4500
Table 5. Parameter estimation of the various forms by the PSO algorithm when the iteration is 4500 Models Model 1 for (HB, sex and age) Model 2 for (RBC, sex and age) Model 3 for (MCH, sex and age) Model 4 for (WBC, sex and age) Model 5 for (MCV, sex and age) Model 6 for (HCT, sex and age) Model 7 for (MCHC, sex and age) Model 8 for (PLT, sex and age) Model 9 for (HB, MCH, sex and age) Model 10 for (RBC, WBC, sex and age) Model 11 for (MCV, PLT, sex and age) Model 12 for (MCHC, HCT, sex and age) Model 13 for (HB, WBC, HCT, sex and age) Model 14 for (MCV, MCHC, RBC, sex and age) Model 15 for (HB, RBC, MCH, WBC, sex and age) Model 16 for (MCV, HCT, MCHC, PLT, sex and age)
SSE 500.117 956.017 862.084 891.756 937.336 406.077 876.008 843.894 496.170 885.520 829.614 389.654 384.303 844.280 353.664 378.580
RMSE 0.963 1.332 1.265 1.286 1.319 0.868 1.275 1.251 0.959 1.282 1.241 0.850 0.844 1.252 0.810 0.838
In this study, the size of the swarm is taken to be according to the structure of the linear medical model, the number of estimated parameters, and searching space between (-10 and 10). The acceleration coefficients; cognitive parameter 𝑐1 and social parameter 𝑐2 are selected as 1 and 3, respectively. The algorithm is set to stop after different iterations and different independent experiments to check the durability of the estimation strategy. Estimating the parameters of the medical model is a difficult task for classical methods of optimization. The starting values for the parameters are randomly selected from the search area. The 𝛽 values refer to the estimated parameter values for the real parameters obtained by the PSO. After different independent attempts have been made and different iterations 500, 1000, 2000 and 4500 have been taken to obtain the best parameters, and then we have obtained the best estimated parameters with iterations of 4500 (see Tables 1-4 and Figures 2-5). Since the PSO algorithm is random inherently, convergence behavior and final estimated values can be of attention. For the medical model, the behavior of the error function is interpreted through the PSO approach, which consists of the values evaluated during the process of minimization (see Figures 2-5). The parameter value is suitable for the model, when 𝑆𝑆𝐸 = 347.989, 𝑅𝑀𝑆𝐸 = 0.803, and 𝑅2 = 0.699 by the PSO. This is important because the SSE measures how well the data fit the model and means a better fit the model with the data and small values of the 𝑅𝑀𝑆𝐸 indicate the concentration of data around the model line. The medical model of interest has been seen to be effective significantly, on the prediction of the anemia types, which explain 69.90% of the change in the relation of the model between the observational variables and the anemia types. The results obtained from the 𝑆𝑆𝐸, 𝑅𝑀𝑆𝐸, and 𝑅 2 by using the PSO at the iteration of 4500, that the models produced in terms of a great number of blood variables a better relationship appear than the models produced in terms of fewer number of blood variables for predicting the anemia types (see Tables 4,5).
4. Conclusions And Recommendation
This study has discovered the anemia types through biomedical information under the consideration of eight different blood variables, sex, and age of individuals. Therefore, it has developed an alternative for estimating the parameter approach that depends on the PSO algorithm in a linear medical model. As opposed to classical methods, it has been seen that the PSO approach is more advantageous, it requires less mathematical operations to estimate medical model parameters. It can be concluded that the PSO algorithm has been considered as an effective and very appropriate estimating method for the current and similar to current medical models. The parameter values produced are seen to be the most up-to-date and maybe the best. Thus, the PSO algorithm shows the tendency of rapid convergence for the model with the knowledge that the number of parameters is eleven. For further study, to estimate the parameters of the medical model, various computational methods can be analyzed.
Share and Cite
AHMAD, A.A.; SARI, M. Parameter Estimation to an Anemia Model Using the Particle Swarm Optimization. Sigma Journal of Engineering and Natural Sciences 2019, Vol. 37, pp. 1335-1347. https://doi.org/10.62051/ytu.sigma-journal-of-engineering-and-natural-sciences-parameter-estimation-to-an-anemia-model-using-the-particle-swarm-optimization

