Microsoft Word - 110-121 Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (4) 2020 110          Comparison of Artificial Neural Network and Box- Jenkins Models to Predict the Number of Patients with Hypertension in Kalar Layla A. Ahmed Department of Mathematics, College of Education, University of Garmian, Kurdistan Region, Iraq layla.aziz@garmian.edu.krd Abstract Artificial Neural Network (ANN) is widely used in many complex applications. Artificial neural network is a statistical intelligent technique resembling the characteristic of the human neural network. The prediction of time series from the important topics in statistical sciences to assist administrations in the planning and make the accurate decisions, so the aim of this study is to analysis the monthly hypertension in Kalar for the period (January 2011- June 2018) by applying an autoregressive –integrated- moving average model 𝐴𝑅𝐼𝑀𝐴 and artificial neural networks and choose the best and most efficient model for patients with hypertension in Kalar through the comparison between neural networks and Box- Jenkins models on a data set for predict. Comparisons between the models has been performed using Criterion indicator Akaike information Criterion, mean square of error, root mean square of error, and mean absolute percentage error, concluding that the prediction for patients with hypertension by using artificial neural networks model is the best. Keywords: Hypertension, time series, autoregressive-integrated-moving average model, artificial neural networks. 1.Introduction Last years, after increasing the number of patients with chronic hypertension disease, it was to be highlighted to study this disease and the use of statistical methods and artificial intelligence techniques. Hypertension is defined as the abnormal high blood pressure (more than 120/8 mm. Hg) in the arteries [1]. Uncontrolled high blood pressure makes you more likely to get heart disease, stroke, and kidney disease [2]. Ibn Al Haitham Journal for Pure and Applied Science Journal homepage: http://jih.uobaghdad.edu.iq/index.php/j/index Doi: 10.30526/33.4.2516 Article history: Received 7 January 2020, Accepted 20 February 2020, Published in October 2020   111  Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (4) 2020 The time series forecasting assumes that the future values a linear combination of historical data. There are various time series forecasting models; however, the most highly frequently approach to fit such model is Box and Jenkins for fitting ARIMA model. Box and Jenkins (1970) generalized the ARIM model to deal with seasonality [4]. Tiao and Box (1979) described a practical to ARMA modeling of multivariate time series data by three stages: identification, estimation of the parameters and model checking [5]. Artificial Neural Network is extensively used in construction industry [6], analyzing the business data stored in database [7-8], robotics industry systems, decision support systems, automated control systems, and prediction systems [9]. Artificial neural network is a calculation method resembling the characteristic of the human neural network. The important characteristics of neural network involve nonlinearity, capacity to handle large data, and generalization [10]. The main aim is to choose the best and efficient model for forecasting the number of patients with hypertension in Kalar. Through the comparison between neural networks and Box- Jenkins models. In this paper, introduction, autocorrelation function, partial autocorrelation function, and autoregressive moving average model are introduced. Next, the neural network model is introduced and then the results of these models are compared. Finally, conclusions and recommendation for this study are given. 2.Methodology 2.1. Autocorrelation Function (ACF) The autocorrelation function is the correlation of time series 𝑧 , 𝑧 , … . , 𝑧 with itself. The correlation coefficient between 𝑧 and 𝑧 is called lag-k autocorrelation of 𝑧 and denoted by 𝜌 , which is under the assumption of weak stationary and is defined [4], [11]: 𝜌 ∑ ̅ ̅ ∑ ̅ , 𝑘 1,2, … , 𝑚𝑎𝑥 𝑘 (1) Where 𝑧̅ ∑ 𝛾 𝑐𝑜𝑣 𝑧 , 𝑧 With the following Properties: 1 𝜌 1 𝜌 𝜌 , 𝜌 1 2.2. Partial Autocorrelation Function (PACF) The correlation coefficient between 𝑧 and 𝑧 after removing the impact of the intervening 𝑧 , 𝑧 ,…., 𝑧 is called partial autocorrelation function at lag- k, denoted by 𝜙 , and defined(12):   112  Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (4) 2020 ϕ ⎩ ⎪ ⎪ ⎨ ⎪ ⎪ ⎧ 1 , k 0 ρ , k 1 . . . . . . . . . . . . . . . . . .. . . . . . . .. . . . . . . . . . . . . . . . . . .. . . . . . . . . 0 , k 2 (2) Calculating partial autocorrelation function of sample form: ϕ ∑ , 𝟏 ∑ , (3) Where ϕ ϕ , ϕ ϕ , , j 1,2, … , k 1 2.3. Autoregressive Moving Average Model (ARMA) The autoregressive moving average model is denoted by 𝐴𝑅𝐼𝑀𝐴 𝑝, 𝑑, 𝑞 Where 𝑝: The order of autoregressive. 𝑞: The order of moving average. 𝑑: The order of non-seasonality difference. For stationary time series, the general form of an ARMA model can be written as: 𝜙 𝐵 𝑥 𝛿 𝜃 𝐵 𝑎 (4) A non-stationary series should be first transformed into a stationary one by considering relevant differences: ∇ 𝑥 1 𝐵 𝑥 𝑥 𝑥 (5) 1 𝐵 : The d th difference. B : The backward shift operator. For non- stationary time series, the general form of an ARMA model can be written as [12], [13]: 𝜙 𝐵 1 𝐵 𝑥 𝛿 𝜃 𝐵 𝑎 (6) Where 𝜙 𝐵 1 𝜙 𝐵 𝜙 𝐵 ⋯ 𝜙 𝐵 , is the autoregressive operator of order p. 𝜃 𝐵 1 𝜃 𝐵 𝜃 𝐵 ⋯ 𝜃 𝐵 , is the moving average operator of order q. 𝑎 𝑁𝐼𝐷 0, 𝜎 (7) 2.4. Model Building The Box–Jenkins iterative approach for constructing linear time series models consists of four stages [3], [12]: identification, estimation of the parameters, diagnostic checking and forecasting. The Identification stage is the most important. It consists of the appropriate model from ARIMA models.   113  Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (4) 2020 The major approaches of appropriate ARIMA models are nonlinear least squares and maximum likelihood estimation. Diagnostic model checking involves testing the assumptions of the model to identify any area where the model is inadequate. For goodness of fit test for the suggested ARIMA model such that: 𝑄 𝑛 𝑛 2 ∑ 𝑛 𝑘 (8) 𝐻 𝜌 𝑎 0 𝐻 𝜌 𝑎 0 9 If 𝑄 lies in the extreme 5% of the right side tail of the chi- square distribution, we reject the hypothesis where the residuals are random. 2.5 Neural Networks 2.5.1 Biological Neural The biological neuron receives inputs from all components of body, combines the input, performs a nonlinear operation and offers the output result [14]. Human brain is highly complex, nonlinear and parallel computer [15]. The human brain includes about 100 billion neurons. The mean neuron is as complex as a small computer and has as many as 10000 physical connections with other cells [16]. A neuron contains of four parts called cell body, dendrites, axon, and synapses [14], [17]. Figure 1: Biological neural network 2.5.2 Artificial Neural Network (ANN) Artificial neural network is a computational model that functions like a human brain through biological neurons [18]. The Artificial neural networks perform helpful calculations and simulate complex modeling in the functioning of the human brain. The first artificial neuron model was proposed in 1943 by McCulloch and Pitts [19-20]. The neural networks approach is widely applied in biological, engineering, medical, financial [21]. The artificial neural network can be designed using either feed forward or fed back approach. There are three types of layers, input layer, hidden layer, and output layer in an artificial neural network [9-10], as shown in Figure 2.   114  Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (4) 2020 Figure 2: Artificial neural network A statistical model is [7], [16]: 𝑦 𝑓 𝑎 (10) Where 𝑦 is the output of the nth layer; 𝑓 𝑎 is the activation function widely employed by the logistic sigmoid, hyperbolic tangent sigmoid and squared functions [9], [21]. The sigmoid activation function, commonly used and applied in this study, and 𝑎 is the sum of the weight of the previous layer, which is obtained by [22]: 𝑎 ∑ 𝑤 𝑥 𝑏 (11) Where 𝑤 is the linkage weight from the neuron I to neuron 𝑗; 𝑥 is the input data from neuron 𝑖 to 𝑗; 𝑏 is the bias on the neuron 𝑖, and 𝑛 is the total number of input neurons. Efficiencies of human neurons and processing elements of ANN can be compared as synapses act like a weight of the arriving stimulus and inspired the weights of ANN; dendrites a cumulates the arriving weighted stimulus, inspired the summing function of ANN; cell body, that reasons conversion of collected stimulus in to a new stimulus, inspires activation function; axon, which distributes the new stimulus to the conformable neurons, inspires the output and output links; and finally, threshold value with a role of activating or inactivating increase and decrease of the stimulus, inspires the bias [17]. The hidden nodes can be in single layer or multi-layers. Usually, the multiple layers neurons are called as multiple layers perception [22]. The multiple layers perception neural network is an important architecture, and it is also one of the most widely used architectures that are applicable to different application problems [23]. The criteria of comparison between the models: 𝐴𝑘𝑎𝑖𝑘𝑒 information criterion 𝐴𝐼𝐶 [24], [25-26], mean square of error 𝑀𝑆𝐸 [10], root mean square of error 𝑅𝑀𝑆𝐸 [21], and mean absolute percentage error 𝑀𝐴𝑃𝐸 [27]. The formulas are expressed as below: AIC 2LogL 2𝑚 AIC n 1 Logπ 𝑛𝐿𝑜𝑔𝜎 2𝑚 AIC nln𝜎 2𝑚 (12) Where: L: The likelihood function. 𝜎 : The mean square of residuals.   115  Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (4) 2020 𝑚: Parameters of the model. 𝑀𝑆𝐸 ∑ 𝑌 𝑌 (13) 𝑅𝑀𝑆𝐸 ∑ 𝑌 𝑌 (14) 𝑀𝐴𝑃𝐸 ∑ | | 100 (15) Where 𝑌 is the actual value and 𝑌 is the predicted value, and n is the size sample. The final model is used to generate predictions about the future values and then calculate the forecast errors as developments of new values watch from the time series [23]. 3. Data Analysis and Results 3.1. Data Description The data of current study were the monthly observations that included (5169) patients of hypertension in Kalar city and were obtained from the records of the general hospital- Kalar for the period (Jan. 2011- Jun. 2018) in order to reach an appropriate model to be used to forecast the monthly hypertension. SPSS 22 and Minitab17 statistical software were used. Table 1 below shows the descriptive statistics of the series and indicates the mean of the time series that 57.43 , the sample size is 90 months. From the data, we considered that the number of patients were female 60.03% females and 39.97% males. Table 1: Descriptive statistics of the data Gender No. of patients Mean Max. Min. Std. Dev. Percent Male Female 2066 3103 22.8889 34.4778 68 76 8 9 9.7778 15.83 39.97 60.03 Total 5169 144 17 23.9996 100 3.2. Results of Box- Jenkins Figure 3, represents the series monthly hypertension and we show that data are stationary in the variance, but not stationary in the mean when we plot autocorrelation functions and partial autocorrelation function for the data. Figure 3: Plot of the data 90817263544536271891 160 140 120 100 80 60 40 20 0 Inde x Y Time Series Plot of Y   116  Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (4) 2020 Figure 4: ACF of the data Figure 5: PACF of the data We treat the outlier problem, then take the first difference for the data and plot ACF and PACF again for the difference time series; we show that the series become stationary in the mean and variance. 3.3. Choosing Appropriate Model We choose the appropriate model through the use of 𝐴𝑘𝑎𝑖𝑘𝑒𝑠 information criterion (AIC) as shown in table (2). The best model is the 𝐴𝑅𝐼𝑀𝐴 2 ,1,1 , because the values of AIC are minimum. Since the model is: 1 𝜙 𝐵 𝜙 𝐵 1 𝐵 𝑦 𝛿 1 𝜃 𝐵 𝑎 (16) Table 2: Iterations of ARIMA models 222018161412108642 1.0 0.8 0.6 0.4 0.2 0.0 -0.2 -0.4 -0.6 -0.8 -1.0 Lag A u to c o rr e la ti o n 222018161412108642 1.0 0.8 0.6 0.4 0.2 0.0 -0.2 -0.4 -0.6 -0.8 -1.0 La g P a rt ia l A u to c o rr e la ti o n Model Res. VAR. AIC 𝐴𝑅𝐼𝑀𝐴 1 ,1, 0 370.6 528.446 𝐴𝑅𝐼𝑀𝐴 1 ,1, 1 319.2 517.158 𝐴𝑅𝐼𝑀𝐴 0 ,1, 1 328.5 517.714 𝐴𝑅𝐼𝑀𝐴 0 ,1, 2 327.0 519.306 𝐴𝑅𝐼𝑀𝐴 1 ,1, 2 330.9 522.362 𝐴𝑅𝐼𝑀𝐴 2 ,1, 2 333.9 525.165   117  Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (4) 2020 3.4. Estimating the Parameters Type Coefficient SE. Coefficient T P Value 𝐴𝑅1 0.3548 0.1122 3.16 0.002 𝐴𝑅2 0.1418 0.1129 1.26 0.212 𝑀𝐴1 1.006 0.0097 103.63 0.000 𝐶𝑜𝑛𝑠𝑡𝑎𝑛𝑡 0.066 0.044 1.48 0.14 Modified Box Pierce Ljung Box Chi Square Statistic 𝐿𝑎𝑔 12 24 36 48 𝐶ℎ𝑖 𝑆𝑞𝑢𝑎𝑟𝑒 8.6 18.1 26.6 34.2 𝐷𝐹 8 20 32 44 𝑃 𝑉𝑎𝑙𝑢𝑒 0.379 0.579 0.737 0.856 Number of observations: Original series 90, after taking the difference 89 Residuals: SS = 26371.1, MS =310.2, and d. f = 85 1 0.3548𝐵 0.1418𝐵 1 𝐵 𝑦 0.066 1 1.006𝐵 𝑎 3.5. Diagnostic Model Checking After checking the stationary for the series, the autocorrelation functions and partial autocorrelation function of the residuals are plotted as shown in figures 6 and 7. It is clear that the autocorrelation functions and partial autocorrelation function of the residuals are values that fall within the confidence limits of probability 95%. )1(96.1)()1(96.1 nern   The test is based on first 24 autocorrelations P-value = 0.579 > 0.05 Accept 0H , residuals are random 𝐴𝑅𝐼𝑀𝐴 2 ,1, 1 310.2 516.612 𝐴𝑅𝐼𝑀𝐴 2 ,1, 0 336.5 521.855 𝐴𝑅𝐼𝑀𝐴 3 ,1, 0 338.5 524.383 𝐴𝑅𝐼𝑀𝐴 3 ,1, 1 325.7 522.952 𝐴𝑅𝐼𝑀𝐴 0 ,1, 3 330.8 522.335 𝐴𝑅𝐼𝑀𝐴 2 ,1, 3 304.7 519.02 𝐴𝑅𝐼𝑀𝐴 3 ,1, 3 318.7 525.02   118  Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (4) 2020 Figure 6: ACF of residual Figure 7: PACF of residual After verification of the suitability of the model that the model used for forecasting values for monthly hypertension based on 𝐴𝑅𝐼𝑀𝐴 2 ,1,1 , Table 2 showed that. 3.6 Results of ANN The data were randomly divided into two independent training and testing subsets, 80% of the data was considered for network training and 20% of data was used for network reliability and used for testing. Table 3 shows that the best model includes five units in the hidden layer, as well as four lags. Table 3: Results of ANN model for the data Table 4 contains a comparison between of ARIMA (1, 1, 2) and ANN5 (4) of the data in order to determine the best appropriate model for prediction hypertension through the use of MSE, RMSE, and MAPE. The results of this analysis show that the best model is the ANN5 (4), because the values of MSE, RMSE, and MAPE are minimum. After verification of the suitability of the model that the model used for forecasting values of the number of patients for two years in monthly (July 2014-June 2016), Figure 8 showed that. Table 4: Comparison of models 222018161412108642 1.0 0.8 0.6 0.4 0.2 0.0 -0.2 -0.4 -0.6 -0.8 -1.0 La g A u to c o rr e la ti o n 222018161412108642 1.0 0.8 0.6 0.4 0.2 0.0 -0.2 -0.4 -0.6 -0.8 -1.0 Lag P a rt ia l A u to c o rr e la ti o n Number of lags 1 2 3 4 5 SSE 21.354 28.266 30.696 18.817 29.594 RMSE with 5units 0.553 0.716 0.787 0.53 0.722   119  Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (4) 2020 Year Actual ARIMA Forecast ANN5(4) Forecast Aug.2017 56 51.84 51.07 Sep. 29 54.69 38.84 Oct. 53 56.88 51.83 Nov. 47 58.13 51.83 Dec. 67 58.94 66.45 Jan. 2018 42 59.48 47.23 Feb. 20 59.85 47.21 Mar. 61 60.12 80.72 Apr. 68 60.34 80.72 May. 66 60.52 47.23 Jun 102 60.68 80.72 MSE 0 415.60 206.34 RMSE 0 20.39 14.37 MAPE 0 40.18% 29.18% Figure 8: Plot of time series 4. Conclusions The results of application show that 60.03 of patients with hypertension are females and 39.97 of patients with hypertension are males. The statistical tests show that the data are stationary in the variance, but not stationary in the mean. The model for monthly prediction of hypertension by using Box- Jenkins is the model of 𝐴𝑅𝐼𝑀𝐴 2 ,1,1 , and by using artificial neural network model is 𝐴𝑁𝑁5 4 . The model obtained by using artificial neural network is a suitable model for prediction, because when we use this model on data, it gives us less value of mean squares error, root mean squares error, and mean absolute percentage error. This is accuracy signs of this model. We recommend that the health and medical practitioners should use the 𝐴𝑁𝑁 models for the forecasting of hypertension disease cases in Kalar, because of their efficiency in prediction and their low error rates. 1101009080706050403020101 250 200 150 100 50 0 T ime Y   120  Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (4) 2020 References 1. R., Siyad A. Hypertension, Hygeia Journal for Drugs and Medicines. 2011, 3, 1, 1-16. 2. Tawfiq, LNM; Oraibi. YA. Fast Training Algorithms for Feed Forward Neural Networks. Ibn Al-Haitham Journal for Pure and Applied Science. 2017, 26, 1: 1275-1280 3. Ahmed, L. A. Using ARIMA Time Series Model to Forecast Production in Spinning Factory- Kifri, 2nd Scientific Conference, University of Garmian, 2015, 1,125-140. 4. Chatfield, C. The Analysis of Time Series: An Introduction; 2nd Edition, Chapman and hall, London New York, 1980; ISBN 0412224607. 5. Li W. K. ; McLeod, A.I. Distribution of the Residual Autocorrelations in Multivariate ARMA Time Series Models, Royal Statistical Society, Series B (Methodological), 1981, 43, 2, 231-239. 6. Golnaraghi, S. Z. et al. Application of Artificial Neural Network(s) in Predicting Formwork Labour Productivity, Advances in Civil Engineering, 2019, article ID 5972620, 1-11, http:// doi.org/10.1155/2019/5972620. 7. Maliki, O. S. et al. Comparison of Regression Model and Artificial Neural Network Model for the Prediction of Electrical Power Generated in Nigeria; Advances in Applied Science Research, 2011, 2, 5, 329-339. 8. Lee, K. Y.; Chung, N. ; Hwoung, S. Application of an Artificial Neural Network Model for Predicting Mosquito abundances in Urban Areas; Ecological Informatics, 2016, 36, 172-180. 9. Al- Maqaleh, B. M.; Al- Mansoub, A. A ; Al- Badani, F. N. Forecasting Using Artificial Neural Network and Statistics Models, International Journal Education and Management Engineering, 2016, 3, 20-32., doi:10.5815/ijeme.2016.03.03. 10. Ranganayki, V. ; Deepa, S. N. An Intelligent Ensemble Neural Network Model for Wind Speed Prediction in Renewable Energy Systems, The Scientific World Journal, 2016, Article ID 9293529, 1-15, http://dx.doi.org/10.1155/2016/9293529. 11. Yassen, A. A. Comparative Study of Artificial Neural Network and ARIMA Models for Economic Forecasting, M.Sc. Thesis, University of Al- Azahra, Gaza, 2011. 12. Dobre, I. and; Alexandru, A. A. Modeling Unemployment Rate Using Box-Jenkins Procedure, Journal of Applied Quantitative Methods, 2008, 3, 2, 156-166. 13. John, E. E. and Patric, U. U. Short- Term Forecasting of Nigeria Model; Science Journal of Applied Mathematics and Statistics, 2016, 4, 3, 101-107, doi:10.11648/j.sjams.20160403.13. 14. Singh, V. Application of Artificial Neural Networks for Predicting Generated Wind Power, International Journal of Advanced Computer Science and Applications, 2016, 7, 3, 250-253. 15. Tosun, E. K., Aydin, K. ; Bilgili, M. Comparison of Linear Regression and Artificial Neural Networks Model of a Diesel Engine Fueled with Biodiesel- Alcohol Mixtures; Alexandria Engineering Journal, 2016, 55, 3081-3089, doi:10.1016/j.aej.2016.08.011. 16. Balaji, S. A. ; Baskaran, K. Design and Development of Artificial Neural Networking System Using Sigmoid Activation Function to Predict Annual Rice Production in Tamilnadu; International Journal of Computer Science, Engineering and Information Technology, 2013, 3, 1, 13-31, doi:10.512/ijcseit.2013.3102.   121  Ibn Al-Haitham Jour. for Pure & Appl. Sci. 33 (4) 2020 17. Guresen, E. ; Kayakutlu, G. Definition of Artificial Neural Networks with Comparison to Other Networks; Procardia Computer Science, 2011, 3, 426-433, doi:10.1016/j- procs.2010.12.071. 18. Idris, M. A.; Jami, M. S. and Hammed, A. M. , Optimization process of moringa oleifera seed extract using artificial neural network (ANN); Malaysian Journal of Fundamental and Applied Sciences, 2019, 15, 2, 254-259. 19. BuHamara, S.; Smaoui, N. and Gabr, M. The Box- Jenkins Analysis and Neural Networks: Prediction and Time Series Modeling, Applied Mathematical Modeling, 2003, 7, 805-815, doi: 210.1016/s0307-904x (03)00079-9. 20. Zakaria, M.; Al- Shebany, M., ; Sarhan, S. Artificial Neural Network: A Brief Overview; International Journal of Engineering Research and Applications, 2014, 4, 2, version.1, 7-12, 21. Alhashimi, S. A. Muttaleb. Prediction of Monthly Rainfall in Kirkuk Using Artificial Neural Network and Time Series Mode; Journal of Engineering and Development, 2014, 18, 1, 2016129-143. 22. Yusof, K. K. et al. The evaluation on artificial neural networks (ANN) and multiple linear regressions (MLR) models over particulate matter (PM10) variability during haze and non-haze episodes: A decade case study; 2019, 15, 2, 164-172. 23. Jalham, I. S. Filtrated Artificial Neural Network Approach to Predict the Mechanical Behavior of Polystyrene Reinforced with Bakellite; Engineering Sciences, 2013, 39, 1, 66-74. 24. Iwok, I. A. Seasonal Modeling of Fourier Series with Linear Trend, International Journal of Statistics and Probability, 2016, 5, 6, 65-72, doi: 10.5539/ijsp.vn6p65. 25. Obubu, M. et al. Modeling and Forecasting of Armed Robbery Cases in Nigeria Using Auto Regression Integrated Moving Average (ARIMA) Models; European Journal of Statistics and probability, 2016, 4, 4, 28-41. 26. Ping, Y. P.; Hamizah, N. ; Maizah, H. A. Forecasting Malaysian Gold Using GARCH Model; Applied Mathematical Sciences, 2013, 7, 58, 2879-2884. 27. Yazdi, F. M. Application of Neural Networks for 24- Hour- Ahead Load Forecasting; International Journal of Electrical and Computer Engineering, 2009, 3, 2. 248-251.