Modelling of the relationship between systolic blood pressure and glucose with the magnesium ion present in the blood plasma: an approach using artificial neural networks

Artificial neural networks became an attractive alternative for modeling and simulation of complex biological systems. In the present work, a blood plasma model based on artificial neural networks was proposed in order to evaluate the relationship between the magnesium ion pre-sent in the blood plasma and systolic blood pressure and glucose. Experimental and simulated data were used to construct and validate the model. It performed the analysis considering the systolic blood pressure and glucose as a function of magnesium ion concentration at a fixed temperature (37 o C). Predictions of these relationships through the proposed model produced errors, on average, below 1% compared against experimental data not presented in the training step. The proposed methodology revealed quantitative results and correctly predicted behaviors and trends towards the association between magnesium concentrations and systolic blood pressure, and glucose in far agreement with experimental results from literature. These results indicated that artificial neural networks can successfully learn the complexity of the relationships


INTRODUCTION
Magnesium plays an important role in cardiac and vascular functions and participates in glucose metabolism [1].The measurements of diabetic patients have shown that plasma magnesium concentrations are inversely related to plasma glucose values [2].Some studies [3,4] have shown that magnesium deficiency can be associated with coronary diseases such as atherosclerosis and cardiac arrhythmia.Magnesium is an essential element in cardiac and vascular functions and is fundamental in the regulation of blood pressure, as it regulates the rate of calcium, sodium, potassium and the pH inside the cell [5].These elements are important in the process of contraction and relaxation of the vascular smooth muscle.Consequently, the reduction in magnesium levels can generate an increase in the muscular tonus which, in turn, can produce an increase in blood pressure [5].
Other factors can affect the blood pressure, such as biochemical factors, age, sex and race [6].In general, magnesium can be found in three different forms in the blood plasma: ionic form, complex form and connected to plasma proteins.The free ionic form of magnesium ([Mg 2+ ] free ) has the main biological activity, however, assaying the total ionic concentration ([Mg 2+ ] total ) is easier and less expensive [7].
Studies based on the regulatory function of magnesium have been developed across the years [8][9][10].In the latter works, low magnesium levels were found in patients with hypertension and cardiovascular disease (CVD), mainly among black individuals [8].It found lower rates of magnesium in the ionic form in hypertensive patients rather than in those considered normotensives [9] and it verified a significant inverse relation between plasma magnesium and systolic blood pressure (SBP) [10].However, the blood plasma is a complex system, in which metal ions interact, for example, in competition for ligands.Therefore, the Openly accessible at development of methodologies capable of efficiently simulating the relationships between plasma magnesium and SBP as well as between plasma magnesium and glucose can be a valuable tool for helping studies concerning this metal and SBP and glucose.
Efficient computational methodologies have been applied in order to model the interaction between metal ions presenting in blood plasma [11,12].A model was proposed [13], using multiple regression techniques to evaluate the metal ion complexation in blood plasma.This method proved to be efficient in simulating ion-ligands formation and had been used to simulate experimental data [14,15].Alternatively, artificial neural networks (ANNs) have already been used to predict the behavior of metal ions and their ligands in blood plasma [16].Many researchers also pointed out the use of ANNs in biomedicine [17][18][19][20][21][22] and more specific in diagnosis [23,24].Hence, ANNs are considered to be an efficient and reliable tool in simulation and prediction of biological parameters [25,26].A previous work from our group demonstrated the use of ANNs to analyze the temperature and pH effects on the complexation of magnesium and calcium in a blood plasma model.It also analyzed the competition between these metals for ligands.As pointed out, ANNs are suitable when simultaneously analyzing a great number of data, for example, in studies with many individuals [27].
The present work focused on the applicability of the ANN's as a reliable tool for simulating and analyzing the relationship between blood plasma magnesium concentrations and SBP and glucose.In view of this, the experimental data of SBP, glucose and [Mg 2+ ] total from four different groups of individuals (black man, black women, white men, white women) were selected from previous investigation [8] to build a model based on an ANN.This model was then used to examine the relation between SBP versus [Mg 2+ ] and glucose versus [Mg 2+ ], thus evidencing the ability of ANNs in mapping complex nonlinear relationship.As these relationships are learned by the ANN, this model can be applied as a different approach to determine the role of magnesium in SBP or glucose, without the need of a large data set.

Methods
A computational method was used to investigate the relationships between [Mg 2+ ] total and SBP.The artificial neural network was trained with experimental and simulated data.This approach is inspired by biological nervous systems, such as the brain, process information.It is composed of a large number of highly interconnected processing elements called neurons.These neurons work together to solve specific problems, and then ANNs learn from examples [28].This knowledge is stored in the connexions between neurons, through numbers, also known as synaptic weights.And learning involves adjustments to these synaptic weights.The general structure of a multilayer perceptron ANN (see Figure 1) can be configured for a specific application, such as pattern recognition or data classification, through learning processes.ANNs have a remarkable ability to derive meaning from complicated or imprecise data, and can be used to extract patterns and detect trends that are too complex to be noticed by either humans or other computer techniques, such as numerical mathematical methods.In addition, an ANN has the advantage of real time operation, since ANN computations may be carried out in parallel, so special hardware devices can be designed and manufactured to take advantage of the real time operation capability [29].
The ANN structure used in this work is a multilayer perception feed-forward network.Signals travel one way only, from inputs to outputs.There is no feedback loops, i.e. the output of any layer does not affect the previous layers.In this work it used the backpropagation learning algorithm.This algorithm consists of an interactive process where the weights of each neuron are adjusted in such way that the error between the desired output and the actual output is reduced.According to Levenberg-Marquardt method [30], these weights (W) can be updated as The variable β is a parameter with initial value β = 0.01 and changes according to the minimization error.J is the Jacobian matrix and I is the identity matrix.The error between the desired output and the actual output is calculated by the parameter ε, as given by 2 1 ) ( The parameter is the actual output value of layer l and the parameter is the desired output value of layer l.Thus, Eq.2 evaluates the quadratic error of each layer l. The structure of an ANN can be defined as (in, n i , n j , out), where in represents the number of input neurons, n i represents the number of neurons of first hidden layer, n j represents the number of neurons of the second hidden Openly accessible at layer and out represents the number of neurons in the output layer.This structure was used to construct the models implemented in the present work.

Data
The proposed model aimed to evaluate the relationship between SBP and glucose with the [Mg 2+ ] presenting in the blood plasma.Consequently, it was necessary to find experiments in order to correlate these data.The experimental data relating SBP, glucose and [Mg 2+ ] total which is available to train and validate the proposed model were the measurements of Ma et al. [8].They examined the relationships between [Mg 2+ ] total with cardiovascular disease, hypertension, diabetes mellitus, insulin and glucose, of four groups of individuals, participants of the ARIC (Atherosclerosis Risk in Communities) Study [31].About 15,000 participants took part in this study, male and female, black and white, aging from 45 to 64 years old.
In the work of Ma et al. [8], it evaluated the relationship between [Mg 2+ ] total and SBP, and between [Mg 2+ ] total and glucose, among others.However, [Mg 2+ ] free was not considered.Thus, in order to extend the applicability of the proposed model, [Mg 2+ ] free was included in our model, for a fixed pH value of 7.4.To simulate [Mg 2+ ] free from the experimental samples of [Mg 2+ ] total , it used the blood plasma model [13] which had been mentioned before.This approach allowed us to generate approximately 3500 different simulated values for the relation between SBP and [Mg 2+ ] total and [Mg 2+ ] free , and also approximately 3500 different simulated values for the relation between glucose and [Mg 2+ ] total and [Mg 2+ ] free , for each group of individuals (black man, black woman, white man and white woman).
The success of the ANN method depends on the efficiency of the ANN training and validation.It is desirable that the ANN is trained with an experimental data set and validated with a complete different set of data.However, in lack of a different set of experimental data related [Mg 2+ ] to glucose and SBP, the experimental data used before [8] was split into two sets: the first data set was used to train and test the ANN; and the second was used to validate the ANN.In this way, the ANN was validated with data which did not take part in the training step.

ANN Training and Validation
The methodology used to obtain the ANN configuration with the smallest training error consists of changing the number of intermediate layers, as well as the number of neurons in each layer of the ANN under construction.A computer code evaluated each ANN configuration with 1 and 2 hidden layers, and with 3 to 10 neurons in each layer, posteriorly indicating the best ANN configuration.The ANN mean square error was calculated according to Eq.2.The ANN activation functions used were hyperbolic tangent in the hidden layers and a linear function in the output layer.The initial weights were randomly selected.
In order to perform the training and test of the ANN, the first sight could be used as a hold-out procedure, for example a random split of the data, with 2/3 for training and the rest 1/3 for testing.However, this procedure has two inconveniences.First, only 2/3 of the data are used for training and only 1/3 of the data are used for testing, reducing the amount of data available for training and testing.Moreover, the classification accuracy is based on a single random split of the data, which is not very significant from a statistical point of view [32].Therefore, to avoid these drawbacks, a k-fold cross-validation procedure was used.In this procedure, the data set of size N is divided in k mutually exclusive subsets (folds) of approximately equal size (1 < k ≤ N).The training and test are performed k times, using k-1 subsets for training and the remainder for testing.Besides, the training of ANNs is prone to local minimum, i.e., the final result depends on the initial weights.Also, the random splitting (using holdout or K-fold) is dependent of the type of split performed.To overcome these dependencies, it performed multiple runs and the results were presented as the average of these runs.Consequently, for each configuration to be tested, a total of 20 runs of 10-fold cross-validation procedure were used to examine which ANN configuration would present the smallest training error.The error minimization process during the learn phase of the ANN is shown in Figure 2.
The training was performed until 5000 epochs.In this convergence region, the mean square error was approximately 10 -15 , evidencing a correct mapping of the input-output relationship.After the training step, the ANN was ready to be used as a predictor, and the prediction error was calculated according to in which Error pr is the prediction error, v ex is the expected value and v pr is the value predicted by the ANN.
The normal range for [Mg 2+ ] total in human blood plasma is 0,65-1,25 mM [33].As the experimental data for [Mg 2+ ] total from [8] was ranging from 0,7 to 0,9 mM, it was possible to use them in the simulations.The experimental SBP range used is 114-128 mmHg, which is accepted as a normal range as defined by Ma et al. [8], considering prevalent hypertension values of SBP ≥ 140 mmHg.All these data (see Table 1) were utilized to train and validate the proposed ANN.This ANN was then applied to evaluate the relationships between SBP and glucose with [Mg 2+ ] total and [Mg 2+ ] free , of the four groups of individuals, considering pH equal 7.4 and temperature equal 37 o C.

RESULTS AND DISCUSSIONS
The ANN configuration (2,5,2) that exhibited the smallest training is shown in Figure 3.
After the training phase, the ANN can be considered as a practical tool for instantaneous prediction of [Mg 2+ ] total and [Mg 2+ ] free .In this sense, it is only necessary to supply the input data (SPB and pH) (see Figure 3).This easiness was a key point of the proposed methodology.
As the ANN mapped the relationships between SBP, glucose and [Mg 2+ ] of individuals belonging to different groups, it can indifferently predict these relationships for any specific individual or can be used to simultaneously predict the behavior of a group as a whole.
A preliminary analysis was performed by comparing the ANN predictions for the relationship between SBP and [Mg 2+ ] with the data set selected to validate the ANN.The results for data samples of the four examined groups are shown in Table 2.

Openly accessible at
It is important to emphasize that these data were not taken into account in the training step.It selected four individuals of each group, and their SBP and pH (7.4) data were submitted to the ANN.The results obtained with the ANN were compared with the experimental data.The average prediction error is below 1% for both [Mg 2+ ] total and [Mg 2+ ] free , indicating that the ANN correctly mapped the relationship between the input and output data space.Moreover, although a mix of experimental and simulated data were used to train and validate the ANN, the simulated data were generated by an efficient and well established blood plasma model [13], and therefore, it was appropriate to demonstrate the validity of the proposed model.
Based on this preliminary analysis, further assessments were performed to evaluate the effectiveness and accuracy of the proposed model.From the data set used to validate de ANN, it selected only 10 samples for each group of individuals to illustrate clearly the ANN prediction capability.A simultaneous comparison for each group of individuals between the experimental data and the ANN predictions for SBP as a function of [Mg 2+ ] total (see Figure 4a) and SBP as a function of [Mg 2+ ] free (see Fig- ure 4b) are presented.Although the experimental data for each group exhibit different shapes, the ANN accurately classified each individual in its respective group.
As mentioned before, it is instructive to point out that after the training step, it was only necessary to feed the ANN with the values of SBP and pH, and the ANN instantaneously produced the response, i.e., the values of [Mg 2+ ] total and [Mg 2+ ] free for the race and sex corresponding to the input values.
The model was also applied to perform a quantitative analysis in order to demonstrate the efficiency of the proposed methodology in determining the relationship between SBP and magnesium concentration.For example, considering the white women group, simulating an increase in the value of SBP, from 114,18 mmHg to 116,27 mmHg (a variation of about 2%), the ANN predicted a decrease of the [Mg 2+ ] total from 0,80 mM to 0,75 mM (~6%), and a decrease of [Mg 2+ ] free from 0,64 mM to 0,58 mM (~10%).In the same way, considering the white men group, simulating an increase in SBP from 116,91 mmHg to 119,09 mmHg (~2%), the ANN predicted a decrease of [Mg 2+ ] total from 0,86 mM to 0,75 mM (~13%), and a decrease of [Mg 2+ ] free from 0,69 mM to 0,58 mM (~16%).It was possible to observe that for approximately the same variation of SBP (about 2%), the variation of magnesium concentrations for white men (~13% for [Mg 2+ ] total and ~16% for [Mg 2+ ] free ) was greater than those values for white women (~6% for [Mg 2+ ] total and ~10% for [Mg 2+ ] free ).
The quantitative relationship between SBP and magnesium concentration of black individuals was also investigated.For example, considering the black women group, when simulating an increasing in SBP from 120,73 mmHg to 123,00 mmHg (~2%), the ANN predicted a decrease of [Mg 2+ ] total from 0,85 mM to 0,79 mM (~7%), and a decrease of [Mg 2+ ] free from 0,67 mM to 0,61 mM (~9%).Similarly, for the black men group, when increasing SBP from 124,00 mmHg to 126,36 mmHg (~2%), the ANN predicted a decrease of [Mg 2+ ] total from 0,89 mM to 0,74 mM (16%), and a decrease of [Mg 2+ ] free from 0,70 mM to 0,59 mM (16%).Therefore, for an increase of approximately 2% in SBP, the ANN predicted a decrease in magnesium concentrations of approximately 16% for black men and about 8% for black women.
These results allowed extracting two important features of the studied groups.First, the predictions suggested that men have greater average SBP than women (the predicted values for black men (BM) and white men (WM) were greater than the predicted values for black women (BW) and white women (WW), respectively.These observations were in agreement with the work of Eison et al. [34], who verified that women, in general, have lower average SBP than men.Second, the SBP predicted values for black men (BM) and black women (BW) were greater than the SBP predicted values for white men (WM) and white women (WW), and this suggested that black individuals have average SBP values higher than white individuals.The same behavior was verified in the experimental work of Agyemang et al. [35] who showed that the higher prevalence of hypertension in blacks was due to the less effective control of blood pressure than in whites.Also, the work of Li et al. [36] showed that the hypertension and hypertensive complications were more frequent in black people, due to their lower socioeconomic level, and consequently, for their minor access to medical assistance.Fauvel and Laville [37] also showed that hypertension and salt sensitivity were more intense in individuals of black race than other racial groups.In addition, the proposed approach identified the groups as black or white individuals, and classified them by sex.Moreover, the proposed methodology correctly allowed evaluating the relationship between SBP, glucose and [Mg 2+ ] free .In the experimental data used, there were not measurements relating those parameters.However, as an advantage of the proposed approach the model was able to quantitatively predict [Mg 2+ ] free (see Figure 4b).It is interesting to say that all these classifications and analyses were simultaneously performed.

Analysis of Glucose as a Function of Magnesium Concentrations
As mentioned before [2], magnesium concentrations are inversely related to plasma glucose in diabetes patients.Also, several works [38,39,40] have shown that glucose is related to the magnesium levels in blood plasma.For example, the measurements of McNair et al. [38] for glucose as a function of serum magnesium, in patients with cardiovascular disease, showed that the blood plasma glucose levels diminished when the serum magnesium concentration increased.Mather et al. [39] found that plasma magnesium levels in patients with diabetes were inversely dependent on blood glucose concentration.Rosolova et al. [40] also found this inverse relationship for diabetics and non-diabetics patients.Therefore, it is important to have a model that can analyze the relationship between the magnesium ions and glucose present in the blood plasma.In order to evaluate this proposal, a different ANN from the previous one (Figure 3) was trained with the same simulated data set previously described (~3500 samples for each group of individuals).According to a previous work [41], the normal range of glucose is 4,5-5,6 mM.Glucose concentration below 2 mM characterizes the hypoglycemia, while concentration above 6,7 mM indicates hyperglycemia.The experimental data range of glucose available in [8] characterizes a normal region from 5,6-6,7 mM, and a region of hyperglycemia from 6,8 to 8,5 mM.Thus, the range of 5,0-8,5 mM was used in the simulations of glucose concentrations.The ANN configuration applied to analyze the relationship between glucose as a function of [Mg 2+ ] total and [Mg 2+ ] free , for the ethnic groups studied is shown in Figure 5.
The predictions of glucose as a function of [Mg 2+ ] total were simultaneously performed for the four groups of individuals (see Figure 6).Again, it selected 10 samples to be compared with the predictions of the ANN.
As can be observed, there are four different curves to represent four different relationships between glucose and [Mg 2+ ] total .In spite of this complexity, the ANN predictions are quantitative compared against to the experimental data, with average predictions errors below 1%.The experimental behavior for black men and black women showed similar smooth shape, and revealed the inverse association between [Mg 2+ ] total and glucose (see Figures 6a and  6b).In the latter figures one can observe that the ANN predictions also showed quantitative agreement compared to the experimental data.Similarly, the experimental data and the ANN predictions for white men and white women are shown in Figures 6c  and 6d.In these figures, even though one observes different shapes, the ANN was able to learn all data simultaneously.
The relationship between glucose and [Mg 2+ ] free was also evaluated for the two ethnic groups and is shown in Figure 7. Owing to the fact that free magnesium concentration is a fraction of the total concentration, the experimental curves of glucose as a function of [Mg 2+ ] total (see Figure 6) and glucose as a function of [Mg 2+ ] free (see Figure 7) were similar.
All experimental curves represented in Figure 7 exhibit almost the same behavior, i.e., glucose decreases when [Mg 2+ ] free increases, demonstrating again the inverse association between glucose and [Mg 2+ ] free .Qualitatively, these results demonstrated that the ANN simultaneously predicted the inverse association between SBP and [Mg 2+ ] free for the studied groups.While, quantitatively, the predictions were in agreement with the simulated data for [Mg 2+ ] free (the average prediction error was below 1%).
As an example of the quantitative analysis for black men (see Figure 7a) with a glucose value equal to 6,27 mM, the equivalent value for [Mg 2+ ] free is 0,617 mM.For the same experimental value of glucose (6,27 mM), the ANN (Figure 5) predicted a value of [Mg 2+ ] free equal to 0,6175 mM.In this particular case, the ANN prediction error is smaller than 0.1%.Furthermore, the actual approach was also able to characterize the ethnic group.In this example, the results indicated that they belong to a black man.An important fact to be observed is that the proposed model was capable of predicting the inverse association between [Mg 2+ ] free and glucose, even in the lack of experimental data for [Mg 2+ ] free .

Comparing Theoretical Results with Experimental Data
The reliability of the proposed approach was also verified by comparing the ANN predictions against experimental data measured by Mather et al. [39].The latter work consists of a totally different data set from those used to construct the proposed model (see Figure 5).The linear regression of the ANN predictions for glucose as a function of [Mg 2+ ] total , for the white women group [8] studied is shown in Figure 8a.This group consisted of 45-65 years old women, in which there were healthy patients and also patients with CVD, hypertension and diabetes.Our linear regression analysis showed a predominant inverse relationship between [Mg 2+ ] total and glucose for this group (r = -0.95).Openly accessible at glucose and [Mg 2+ ] total of the white women group.As can be seen, our theoretical results were in accordance with the experimental data from different data set, obtained at different times.The difference between the correlation factors (r), approximately 12%, can be attributed to the different biological conditions of the patients, i.e., the first data (see Figure 8a) expressed medium values of glucose concentrations of a heterogeneous group (range = 5,65-6,15 mM), while the second one (see Figure 8b) expressed the conditions of a diabetic patient with high glucose concentration (range = 3-22 mM).In spite of these differences, the two curves clearly demonstrate the inverse relationship between plasma glucose and [Mg 2+ ] total .These analysis showed that the ANN can predict the same trend exhibited in the experimental data.It seems that the use of about 3500 samples to train the proposed ANN was enough to extract the behavior of the relationship between [Mg 2+ ] total and glucose.

CONCLUSIONS
This work has dealt with an alternative methodology in order to study the relationships between the magnesium ion present in blood plasma and systolic blood pressure and glucose, through ANNs.The average prediction errors for the relationship between SBP and serum magnesium as well as between glucose and serum magnesium were below 1%.All simulations showed that SBP and glucose diminished with the increase of magnesium concentration.The simulations also demonstrated that, in general, black individuals have average SBP values higher than white individuals and men's average SBP values are generally higher than women's average SBP values.These results are in fair agreement with the results reported elsewhere [34,35,36,37,38,39,40].
A comparison between experimental data of a patient and the ANN predictions for a different group of patients showed that the ANN correctly predicted the inverse association between glucose and [Mg 2+ ] total and revealsed the effectiveness of the proposed model in mapping the relationship between [Mg 2+ ] total and glucose concentrations.
Our main results indicate that the proposed approach can be an efficient tool for analyzing the role of magnesium in hypertension and diabetes, and can be used to obtain quantitative results which can contribute to the improvement of diagnostic quality.Finally, the present ANN model can be also applied to support researches related to the role of magnesium in human blood plasma.

Figure 3 .
Figure 3. ANN structure used to evaluate the relationship between SBP and magnesium concentrations.

Figure 4 .
Figure 4. (a) SBP as a function of [Mg2+] total , (b) SBP as a function of [Mg2+] free .Experimental data samples[8] for black men (BM), black women (BW), white men (WM) and white women (WW) are represented by squares.Black dots are the ANN predictions.

Figure 5 .
Figure 5. ANN structure used to evaluate the relationship between glucose and magnesium concentrations.

Figure 6 .
Figure 6.Predictions of glucose as a function of [Mg2+] total .Experimental data samples[8] for black men (BM), black women (BW), white men (WM) and white women (WW) are represented by squares.Black dots are the ANN predictions.
Figure 8b shows the relationship between [Mg 2+ ] total and glucose concentrations of a diabetic sixty years old woman [45].In this figure the experimental data exhibited a negative correlation between [Mg 2+ ] total and glucose (r = -0.83).The comparison between Figures8a and 8bshows that the ANN was able to learn the relationship between

Figure 7 .
Figure 7. Predictions of glucose as a function of [Mg2+] free .Experimental data samples [8] for black men (BM), black women (BW), white men (WM) and white women (WW) are represented by squares.Black dots are the ANN predictions.

Table 1 .
Experimental and simulated data and the associated range.

Table 2 .
ANN predictions of the experimental data not present in the training step.