An Azure ACES Early Warning System for Air Quality Index Deteriorating

With the development of industrialization and urbanization, air pollution in many countries has become more serious and has affected people’s health. The air quality has been continuously concerned by environmental managers and the public. Therefore, accurate air quality deterioration warning system can avoid health hazards. In this study, an air quality index (AQI) warning system based on Azure cloud computing platform is proposed. The prediction model is based on DFR (Decision Forest Regression), NNR (Neural Network Regression), and LR (Linear Regression) machine learning algorithms. The best algorithm was selected to calculate the 6 pollutants required for the AQI calculation of the air quality monitoring in real time. The experimental results show that the LR algorithm has the best performance, and the method of this study has a good prediction on the AQI index warning for the next one to three hours. Based on the ACES system proposed, it is hoped that it can prevent personal health hazards and help to reduce medical costs in public.


Introduction
The degree of air pollution has risen in recent years and has a direct impact on urban pollution and people's health, especially in developing and industrial countries where there is no or only minimal air quality management [1]. Daily predictions of pollutant concentrations in the atmosphere are very important for regulatory planning. When harmful events are predicted, information is provided to the public and social activities are restricted in advance. If early and effective early warning systems are established, casualties and negative impacts on human beings can be greatly reduced [2]. Air pollution early warning system is a very useful tool for avoiding adverse health effects and formulating effective prevention programs, but the development of a strong early warning system is very challenging, but also necessary [3].
In 2017, Taiwan set a new air quality index (AQI) with reference to American standards. It not only integrates the old PSI (Pollutant Standards Index) and PM 2.5 , which are not easy to interpret, but also is the most widely used index in many different countries in the world [4]. It can precisely remind people of self-protection. According to research, air pollutant exposure is strongly associated with asthma and lung diseases [5,6]. The study published in the American Heart Association Journal Hypertension concludes that short-term exposure to SO 2 , PM 2.5 and PM 10 increases the incidence of hypertension. According to the World Health Organization (WHO), 92% of the world's population lives in areas where air quality levels exceed their organizational limits, and 3 million deaths per year for human health are related to outdoor air pollution. In 2017, about 1.7 million children under the age

Impact of Air Pollution
According to the WEO (World Energy Outlook) report of IEA (International Energy Agency), air pollution has become a major public health crisis. Nearly 6.5 million people around the world have died of poor air quality, making air pollution the fourth leading cause of human death in the world, and affecting the environment, economy, and food safety [17]. Air pollution is mainly caused by a large number of human energy production and use. The WHO report also points out that most of the deaths and diseases caused by air pollution are related to PM 2.5 , i.e., particulate matter with a diameter less than 2.5 micrometers. Among them, carbon black, also known as short-term climate pollutant (SLCP), is the main component of PM 2.5 , which is harmful to human health, mostly from diesel vehicles, diesel engines, and so on [18]. Biomass Boiler and Waste Incineration. Another short-term climate pollutant, ozone, is a mixture of pollutants emitted from urban or nearby rural areas. Therefore, the burning of biomass and fossil fuels, along with people's economic activities and the energy demand of many growing cities in the world, makes poor air quality a serious urban problem.

Air Quality Index AQI
There are many different standards for judging air pollution quality, and there will be some differences in the degree of air pollution judged under different standards. In 2017, Taiwan adopted AQI (Air Quality Index) as the formal criterion, so that people can have more simple and clear air quality information as the criterion for judging. Comparing the difference between AQI and PM 2.5 index, grading color is added to the classification of low concentration, which can make AQI, even in the condition of ordinary air quality, more clearly understand the influence degree of air pollution at present, and keep the concentration (35 µg/m 3 ) of the warning focus of the original PM 2.5 index and give cautious suggestions. Air quality index AQI, a new air quality index set by EPA of Taiwan Executive authorities, refers to American standards. Compared with the old ones, AQI adds the moving average value of PM 2.5 pollutants and ozone (O 3 ) for 8 h to the sub-index of AQI judgment, and becomes the judgment basis of the latest air quality standard in Taiwan.
The AQI value ranges from 0 to 500 and is divided into six different pollution levels by six colors. The calculation of AQI is based on the concentration values of ozone (O 3 ), fine suspended particulate matter (PM 2.5 ), suspended particulate matter (PM 10 ), carbon monoxide (CO), sulfur dioxide (SO 2 ) and nitrogen dioxide (NO 2 ). With its impact on human health, the individualized air quality index (IAQI) of different pollutants was calculated by Formula (1). Then the maximum of each indices was selected by Formula (2) to determine the final air quality index (AQI). Detailed formulas, symbolic descriptions and AQI indicators calculation comparison table shown in Table 1: AQI = max{IAQI 1 , IAQI 2 , IAQI 3 , · · · , IAQI n } (2) Table 1. Table for individualized air quality index (IAQI) and AQI formulas.

Calculation Symbol Explanation
IAQI IAQI P Individual air quality index of pollutant item P. C P Concentration value of pollutant item P. BP Hi The upper limit for classification of pollutant items and CPs. BP Lo The lower limit for classification of pollutant and CPs IAQI Hi The upper limit of AQI classification corresponding to BPHi for pollutant items. IAQI Lo The lower grading limit of AQI value corresponding to BPLo for pollutant items.
AQI IAQI Individual air quality index. n Pollutant projects.

Study on the Impact of Air Pollution
Pan et al. [19] used the Gauss distribution model to analyze the impact of traffic flow and regional carbon monoxide concentration. Finally, it was confirmed that there was a significant relationship between traffic flow and regional carbon monoxide concentration. Statistical analysis was used to study the effects of air pollution and suicide in Tokyo from 2001 to 2011, and positive results were obtained [20], Hjortebjerg et al. [21] have studied the effects of maternal exposure to air pollution and traffic noise on the number of births of newborns. Deng et al. [22] assessed the association between outdoor air pollution and allergic rhinitis in children, Lee et al. [23] and others have studied the effects of air pollution on Parkinson's disease, Lichter et al. [24] found that air pollution was negatively correlated with the performance of German football players. Kingsley et al. [25] explored the relationship between air pollution in pregnant women's living areas and fetal development according to their geographical location, assessed the levels of pollutants in women and infants, and investigated the results through linear regression.
Research by literature review methods, Vizcaino et al. [26] systematically analyze the adverse effects of outdoor air pollution on human infertility, Chen et al. [27] use the literature to outline the effect of UFP (ultrafine particles) on adverse health effects. Santibáñez-Andrade et al. [28] also used a literature review to explore the relationship between air pollution and lung cancer, and found that air pollution in addition to smoking also has a certain risk for lung cancer. For the time series, Ma et al. [29] analyzed the relationship between patients hospitalized for cardiovascular disease in Beijing and air pollution, and found significant effects with men older than 65 years. Li et al. [30] tried to explore the impact of these variables on PM 2.5 by using PM 10 , weather variables and spatial effects to estimate the temporal and spatial concentration of historical PM 2.5 . The results show that these variables are the most important in autocorrelation prediction.

Research on AQI and Other Air Pollution
There are many studies aimed at predicting air quality index. Machine learning is the most common method used in predictive research. Perez and Gramsch [31] used neural networks to predict PM 2.5 hourly concentration in Chile's capital. Particularly, some events that cause concentration rise at night, such as traffic flow, were added as predictive variables. Their model can predict the concentration of PM 2.5 in the next 24 h, and successfully warn the time when the concentration exceeds the standard from night to midnight. Zhan et al. [32] Established a continuous learning model for predicting daily PM 2.5 concentration in China. In addition to its superior predictive performance, it can also deal with missing values, which can be used to assess the impact of acute human health. Wang et al. [10] used two-phase decomposition technology to improve the difficulty of AQI prediction with Extreme Learning Machine (ELM). Chen et al. [12] used the combination of social media and monitoring sensors to predict smoke health hazards by using AQI index as an input variable, Shaban et al. [33] also carried out systematic monitoring and prediction for the three most harmful gases released by WHO. Detailed air pollution-related research can be shown in Table 2.  [36] IoT Monitoring PM 2. 5 Chen et al., [37] 3. Methodology

System Architecture
The overall ACES (Azure Computing and Evaluate Services) system framework is built on Microsoft Azure Cloud, which uses App Service and Machine Learning to predict the deterioration of AQI index on-line and send warning messages to users. It is composed of different databases, and six modules. First, the data collection and pre-processing module stores and backs up the data after it's collected. Then the Prediction Model Constructing and Applying Module reads the air quality data from the database and performs the prediction of the air quality index data. The results are stored and backed up again and transmitted to the Decision Module for the user with the warning message. If the predicted results compared with the AQI standard and exceed the standard values, the Early Warning Alert Module will be given the instructions to transmit warning messages to users, Finally, the system users can clearly understand the current AQI distribution by browsing the visualization map generated by data visualization module. The system architecture diagram and modules are shown in Figure 1.

Data Collection and Preprocessing Module
Data Collection and Preprocessing Module is the first step of ACES system. First, two instant mechanisms called Pollutants Real-Time Data and PM2.5 Real-Time Data, contained in Time Module, the corresponding data collection function models "Pollutants Data Collection Model" and "PM2.5 Data Collection Model" are used to collect real-time data. It will request the Web of Taiwan Air Quality Monitoring Network to obtain the data.
Next, the original data is stored in the database and transmitted to the data preprocessing module for the data pre-processing. The first step is data cleaning, and the second step is to convert all data into the content needed for the early warning system, the last step is to integrate the data captured and processed from two different data collection function models, and then compare and merge them into the final required data form and store them in the Azure cloud, the processing module architecture is shown in Figure 2.

Prediction Model Constructing and Application Module
Prediction Model Constructing and Applying Module will be divided into two parts: Firstly, the historical air quality monitoring data will be input into Preprocessing Process in Prediction Model Constructing Module, Training Data and Testing Data are input into Training and Testing processes

Data Collection and Preprocessing Module
Data Collection and Preprocessing Module is the first step of ACES system. First, two instant mechanisms called Pollutants Real-Time Data and PM 2.5 Real-Time Data, contained in Time Module, the corresponding data collection function models "Pollutants Data Collection Model" and "PM 2.5 Data Collection Model" are used to collect real-time data. It will request the Web of Taiwan Air Quality Monitoring Network to obtain the data.
Next, the original data is stored in the database and transmitted to the data preprocessing module for the data pre-processing. The first step is data cleaning, and the second step is to convert all data into the content needed for the early warning system, the last step is to integrate the data captured and processed from two different data collection function models, and then compare and merge them into the final required data form and store them in the Azure cloud, the processing module architecture is shown in Figure 2.

Data Collection and Preprocessing Module
Data Collection and Preprocessing Module is the first step of ACES system. First, two instant mechanisms called Pollutants Real-Time Data and PM2.5 Real-Time Data, contained in Time Module, the corresponding data collection function models "Pollutants Data Collection Model" and "PM2.5 Data Collection Model" are used to collect real-time data. It will request the Web of Taiwan Air Quality Monitoring Network to obtain the data.
Next, the original data is stored in the database and transmitted to the data preprocessing module for the data pre-processing. The first step is data cleaning, and the second step is to convert all data into the content needed for the early warning system, the last step is to integrate the data captured and processed from two different data collection function models, and then compare and merge them into the final required data form and store them in the Azure cloud, the processing module architecture is shown in Figure 2.

Prediction Model Constructing and Application Module
Prediction Model Constructing and Applying Module will be divided into two parts: Firstly, the historical air quality monitoring data will be input into Preprocessing Process in Prediction Model Constructing Module, Training Data and Testing Data are input into Training and Testing processes

Prediction Model Constructing and Application Module
Prediction Model Constructing and Applying Module will be divided into two parts: Firstly, the historical air quality monitoring data will be input into Preprocessing Process in Prediction Model Constructing Module, Training Data and Testing Data are input into Training and Testing processes respectively for training and testing of model building. In the model training phase, the training data will be iterated many times by the regression-type machine learning algorithms provided by Azure Machine Learning service to complete individual model training. In the test phase, the test data are input into individual training models, and the output results are compared with the actual values.
Next, in the Prediction Model Applying Module, the pre-processed data is obtained from the database and then processed by the feature engineering step to produce the data required for the prediction, finally input the best prediction model evaluated in the Prediction Model Constructing Module to predict the concentration of air pollutants and generated the predicted value into the database. The detailed module operation process described in this section is shown in Figure 3. respectively for training and testing of model building. In the model training phase, the training data will be iterated many times by the regression-type machine learning algorithms provided by Azure Machine Learning service to complete individual model training. In the test phase, the test data are input into individual training models, and the output results are compared with the actual values. Next, in the Prediction Model Applying Module, the pre-processed data is obtained from the database and then processed by the feature engineering step to produce the data required for the prediction, finally input the best prediction model evaluated in the Prediction Model Constructing Module to predict the concentration of air pollutants and generated the predicted value into the database. The detailed module operation process described in this section is shown in Figure 3.

Decision Module
The function of decision module is that after receiving the air pollutant concentration prediction value, the AQI calculation formula is used to calculate the side-index value of each pollutant, and then the highest value of the side-index value is selected as the real-time AQI value and compared with the level Table. If the deterioration of AQI exceeds the general standard, the Early Warning Alert Module will be given an early Warning Alert Decision function. The decision execution steps of this module are shown in Figure 4 and Figure 5.

Decision Module
The function of decision module is that after receiving the air pollutant concentration prediction value, the AQI calculation formula is used to calculate the side-index value of each pollutant, and then the highest value of the side-index value is selected as the real-time AQI value and compared with the level Table. If the deterioration of AQI exceeds the general standard, the Early Warning Alert Module will be given an early respectively for training and testing of model building. In the model training phase, the training data will be iterated many times by the regression-type machine learning algorithms provided by Azure Machine Learning service to complete individual model training. In the test phase, the test data are input into individual training models, and the output results are compared with the actual values. Next, in the Prediction Model Applying Module, the pre-processed data is obtained from the database and then processed by the feature engineering step to produce the data required for the prediction, finally input the best prediction model evaluated in the Prediction Model Constructing Module to predict the concentration of air pollutants and generated the predicted value into the database. The detailed module operation process described in this section is shown in Figure 3.

Decision Module
The function of decision module is that after receiving the air pollutant concentration prediction value, the AQI calculation formula is used to calculate the side-index value of each pollutant, and then the highest value of the side-index value is selected as the real-time AQI value and compared with the level Table. If the deterioration of AQI exceeds the general standard, the Early Warning Alert Module will be given an early Warning Alert Decision function. The decision execution steps of this module are shown in Figure 4 and Figure 5.

Early Warning Alert Module
Early Warning Alert Module only operates when it receives instructions from Decision Module to send warnings. After receiving high level data and instructions, it checks the area where AQI exceeds the standard with the area where all users in the database are located and send alert to users in relevant areas. the process of sending warning messages by this module is shown in Figure 6.

System Environment
The ACES early warning system of this study is built using Visual Studio 2017 version and Microsoft Azure cloud platform. The Azure uses the level of effectiveness of functions as shown in Table 3 below. ACES early warning system will use four kinds of services in Azure, namely App Service, SQL Database, Machine Learning Studio and Storage. Firstly, App Service will be established to deploy the completed system project to the cloud. Then, the database of system data storage will be

Early Warning Alert Module
Early Warning Alert Module only operates when it receives instructions from Decision Module to send warnings. After receiving high level data and instructions, it checks the area where AQI exceeds the standard with the area where all users in the database are located and send alert to users in relevant areas. the process of sending warning messages by this module is shown in Figure 6.

Early Warning Alert Module
Early Warning Alert Module only operates when it receives instructions from Decision Module to send warnings. After receiving high level data and instructions, it checks the area where AQI exceeds the standard with the area where all users in the database are located and send alert to users in relevant areas. the process of sending warning messages by this module is shown in Figure 6.

System Environment
The ACES early warning system of this study is built using Visual Studio 2017 version and Microsoft Azure cloud platform. The Azure uses the level of effectiveness of functions as shown in Table 3 below. ACES early warning system will use four kinds of services in Azure, namely App Service, SQL Database, Machine Learning Studio and Storage. Firstly, App Service will be established to deploy the completed system project to the cloud. Then, the database of system data storage will be

System Environment
The ACES early warning system of this study is built using Visual Studio 2017 version and Microsoft Azure cloud platform. The Azure uses the level of effectiveness of functions as shown in Table 3 below. ACES early warning system will use four kinds of services in Azure, namely App Service, SQL Database, Machine Learning Studio and Storage. Firstly, App Service will be established to deploy the completed system project to the cloud. Then, the database of system data storage will be established with the function of SQL Database. Then, Learning Machine Studio will be established. Functions and Storage can be completed.

Establishment and Deployment of Prediction Model
The Machine Learning prediction model used in the operation of the system is constructed by using Machine Learning Studio. First, the data set for training is uploaded. Then the experiments are established for each model. The prediction model can be built according to the requirements in each experiment. the prediction model is deployed to the network using Web Service, detailed picture shown in Figure 7.
established with the function of SQL Database. Then, Learning Machine Studio will be established. Functions and Storage can be completed.

Establishment and Deployment of Prediction Model
The Machine Learning prediction model used in the operation of the system is constructed by using Machine Learning Studio. First, the data set for training is uploaded. Then the experiments are established for each model. The prediction model can be built according to the requirements in each experiment. the prediction model is deployed to the network using Web Service, detailed picture shown in Figure 7.

Procedure
The experimental procedure is divided into three stages: model training, testing and prediction. And, all the data set used and their duration are shown in Figure 8. The goal of model training is to find the best window size in training, that is, by using historical data set {X(t − n), X(t − n + 1), …, X(t)} what is the best n in forecasting Y(t + 1). Then, in model testing stage, three machine learning algorithms are tested to find the best algorithm in prediction for next prediction stage. A detailed flow chart of experiment is shown in Figure 9.

Procedure
The experimental procedure is divided into three stages: model training, testing and prediction. And, all the data set used and their duration are shown in Figure 8. The goal of model training is to find the best window size in training, that is, by using historical data set {X(t − n), X(t − n + 1), . . . , X(t)} what is the best n in forecasting Y(t + 1). Then, in model testing stage, three machine learning algorithms are tested to find the best algorithm in prediction for next prediction stage. A detailed flow chart of experiment is shown in Figure 9.

Establishment and Deployment of Prediction Model
The Machine Learning prediction model used in the operation of the system is constructed by using Machine Learning Studio. First, the data set for training is uploaded. Then the experiments are established for each model. The prediction model can be built according to the requirements in each experiment. the prediction model is deployed to the network using Web Service, detailed picture shown in Figure 7.

Procedure
The experimental procedure is divided into three stages: model training, testing and prediction. And, all the data set used and their duration are shown in Figure 8. The goal of model training is to find the best window size in training, that is, by using historical data set {X(t − n), X(t − n + 1), …, X(t)} what is the best n in forecasting Y(t + 1). Then, in model testing stage, three machine learning algorithms are tested to find the best algorithm in prediction for next prediction stage. A detailed flow chart of experiment is shown in Figure 9.   Figure 10. After testing from training data of SO2, it is shown that if window size is set to be 4 since it has the best performance in all measure than other window size as shown in Table 4. Therefore, all the model proposed in next section are all base on this result which is the output value of SO2(t + 1) is predicted by the input set of {SO2(t), SO2(t − 1), SO2(t − 2), SO2(t − 3)}. The predicted value of SO2(t + 1) is defined as SO2y(t + 1).

Model Training
Due to the limitations Azure Machine Learning Studio, only per hour model can be established for each pollutant. AQI index came from six pollutants, SO 2 , CO, O 3 , PM 10 , PM 2.5 , NO 2 , in order to predict next six hours, a total of 36 separate prediction models are generated. The input data of model training is adjusted by "Time Series" method, which has been shown in Shaban et al. [33]. For example, the output value of SO 2 (t + 1) can be predicted by {SO 2 (t)}, or {SO 2 (t), SO 2 (t − 1)}, or {SO 2 (t), SO 2 (t − 1), SO 2 (t − 2)}, . . . , etc. base on window size 1, 2, 3, . . . etc. as shown in Figure 10. After testing from training data of SO 2 , it is shown that if window size is set to be 4 since it has the best performance in all measure than other window size as shown in Table 4. Therefore, all the model proposed in next section are all base on this result which is the output value of SO 2 (t + 1) is predicted by the input set of {SO 2 (t), SO 2 (t − 1), SO 2 (t − 2), SO 2 (t − 3)}. The predicted value of SO 2 (t + 1) is defined as SO 2 y(t + 1).  Figure 10. After testing from training data of SO2, it is shown that if window size is set to be 4 since it has the best performance in all measure than other window size as shown in Table 4. Therefore, all the model proposed in next section are all base on this result which is the output value of SO2(t + 1) is predicted by the input set of {SO2(t), SO2(t − 1), SO2(t − 2), SO2(t − 3)}. The predicted value of SO2(t + 1) is defined as SO2y(t + 1).   When it comes to predicting the next six hours (t + 1, t + 2, ..., t + 6), the predicted value SO 2 y(t + 1) of SO 2 (t + 1) is added to the prediction of SO 2 (t + 2) whose input set is {SO 2 y(t + 1), SO 2 (t), SO 2 (t − 1), SO 2 (t − 2), SO 2 (t − 3)} and so on. Finally, the prediction value of SO 2 (t + 6) is came from the prediction of the input set of {SO 2 y(t + 5), SO 2 y(t + 4), SO 2 y(t + 3), SO 2 y(t + 2), SO 2 y(t + 1), SO 2 (t), SO 2 (t − 1), SO 2 (t − 2), SO 2 (t − 3)}. A generic representation of model training is shown in Figure 11. Note that, AQI index has six pollutants and each pollutant use 15 variables to predict which will show in Section 4.2. When it comes to predicting the next six hours (t + 1, t + 2, ..., t + 6), the predicted value SO2y(t + 1) of SO2(t + 1) is added to the prediction of SO2(t + 2) whose input set is {SO2y(t + 1), SO2(t), SO2(t − 1), SO2(t − 2), SO2(t − 3)} and so on. Finally, the prediction value of SO2(t + 6) is came from the prediction of the input set of {SO2y(t + 5), SO2y(t + 4), SO2y(t + 3), SO2y(t + 2), SO2y(t + 1), SO2(t), SO2(t − 1), SO2(t − 2), SO2(t − 3)}. A generic representation of model training is shown in Figure 11. Note that, AQI index has six pollutants and each pollutant use 15 variables to predict which will show in Section 4.2. Figure 11. Genetic representation of model training.

Model Prediction
Because AQI index use 6 pollutants and pollutants at time t + 1 can be predicted with values at time t − 3, t − 2, t − 1 and t. Burgos et al. [38] substitute the future real values with the values predicted by their study, and then complete all stages of the prediction. This is more like an incremental learning in this prediction process. Five predicted vectors, Y(t + 1) to Y(t + 5), are replaced with XY(t + 1) to XY(t + 5) and the pollutant prediction process of the next one to six hours will be completed, and the results will be used for subsequent AQI calculation. The detailed generic model prediction process is shown in Figure 12. That is, the pollutant prediction process of the next one to six hours will be completed, and the results will be used for subsequent AQI calculation. The detailed model prediction process is shown in Figure 12 below.

Model Prediction
Because AQI index use 6 pollutants and pollutants at time t + 1 can be predicted with values at time t − 3, t − 2, t − 1 and t. Burgos et al. [38] substitute the future real values with the values predicted by their study, and then complete all stages of the prediction. This is more like an incremental learning in this prediction process. Five predicted vectors, Y(t + 1) to Y(t + 5), are replaced with X Y (t + 1) to X Y (t + 5) and the pollutant prediction process of the next one to six hours will be completed, and the results will be used for subsequent AQI calculation. The detailed generic model prediction process is shown in Figure 12. That is, the pollutant prediction process of the next one to six hours will be completed, and the results will be used for subsequent AQI calculation. The detailed model prediction process is shown in Figure 12 below.

Air Quality Index Data
This study collects air quality monitoring data from January 2016 to May 2018 in Taiwan for training and testing model, establishes the prediction model of AQI pollutant concentration, and obtains the latest air quality monitoring data through the system's real-time data collection program for real-time prediction, supplemented by the relevant variables contained in the monitoring data that may affect the prediction results. As shown in Table 5, yi(t + 1),…,yi(t + 6) are the output variables where I = 1, 2, …, 6, xj(t − 3),…,xj(t) are the input variable where j = 1, 2, …, 15, and xyi(t + 1),…,xyi(t + 5) are the input variable of the next stage which are the predicted value of yi(t + 1),…,yi(t + 5) in the model.

Evaluation
After the establishment of the prediction model, the performance of each model and the predicted index results are compared. The corresponding evaluation indicators are used to evaluate each model. Therefore, the indicators of model evaluation and the air quality index evaluation will be explained in this section.

Evaluation Indicators
Through the prediction models trained by three machine learning algorithms, we need to use appropriate model evaluation indicators to judge each model. We can verify the prediction accuracy errors between the predicted AQI values of the system and the actual AQI values published by the government afterwards, and select the best model with the highest performance. The following indicators are selected to evaluate the prediction model for the model of regression algorithm in this study: (1) Mean Absolute Error (MAE) The mean absolute error has the same unit as the original data. It can only be compared between models whose errors are measured in the same unit. It is used to measure how close the prediction is to the actual results. Its calculation formula is shown in Formula (3): (2) Root Mean Squared Error (RMSE) The root mean square error is a popular formula to measure the error rate of regression models, but only when the errors are compared between the models measured in the same unit, a single value of error in the aggregate model will be generated. By means of square difference, the measurement ignores the difference between over-prediction and under-prediction, and can be used to measure the difference between the predicted value and the actual value. The calculation formula is shown in (4): (

3) Coefficient of determination
Usually referred to as R 2 , this paper describes the proportion of mean square deviation of dependent variables explained by regression models, whose values range from 0 to 1. The calculation formulas are shown in Formulas (5)-(8):

Assessment Indicators of Air Quality Index
The evaluation of the predicted value of AQI pollutants predicted by the model is based on the comparison

Data Collection and Processing
The data collected in this study are from air real time data of monitoring stations published by EPD of the Executive. After data pre-processing and deletion, 940,000 data were collected in 2016 and 2017, and 190,000 data were collected in January-May 2018. Therefore, the total number of historical datasets is about 1.14 million.

Data Collection
The historical data from January 2016 to May 2018 were obtained from Excel files classified according to the year and month of each station published by EPD, the first-hand collected data were not entirely consistent with the needs of this study. Therefore, the results of data pre-processing are described in the next section. The original collection structure of historical and real-time data is shown in Tables 7 and 8.  Due to the large number of historical data files classified according to the year and month of each station, it is necessary to use a function to pre-process Excel files, through data cleaning, conversion and merging, and not all monitoring stations monitored the same items, among which the THC, NMHC, CH4, UVB, PH_RAIN and RAIN_COND fields are less than half of the total data, so the data fields are not equal. Then field was deleted to reduce 21 items to 15 items. Finally, in view of the lost value processing caused by the maintenance of the station equipment and other reasons, after the small sample interpolation method and the actual test of the deleted data, this study finds that the performance of deleting the data directly is higher, and the data processing of instant collection will be processed and transformed directly in the code during the operation of the system, and the data will be processed to meet the prediction.

Experimental Results and Performance
This section will describe and explain the training, testing and prediction results of the model respectively. This study was carried out in Douliu City, Taiwan. The trend breakdown and regression analysis produced in each stage of this chapter will take Douliu Monitoring Station as an example.

Model Training
This study tested the performance of three supervised machine learning algorithms: Decision Forest Regression (DFR), Linear Regression (LR) and Neural Network Regression (NNR). According to the results of each performance evaluation index, the best model was selected and the machine learning algorithm used as the follow-up research was determined. Prediction model with Table 9 is the result of using data from August 2016 to December 2017 for model training and using data from January 2016 to July 2016 for testing and evaluating the first-hour performance of six pollutant algorithms. Most of the LRs have the best or the second-best performance under each performance index. After the algorithm has determined and established a total of 36 prediction models for six pollutants, the data used in the training model are re-entered into the prediction model to try to understand the prediction performance of each model based on training data. The most important AQI numerical prediction R 2 ranges from 0.897 of Y(t + 1) to 0.97 of Y(t + 6). The six pollutants also showed poor performance in Y(t + 1) as a whole, but the performance of each indicator increased obviously from Y(t + 2). Although the performance decreased gradually from Y(t + 2) to Y(t + 6), the change was not significant, perhaps the data itself was the same as the data set used in the training model. The overall performance of the detailed training phase data forecast is shown in Table 10. Table 10. Overall Performance in Training Stage.

Pollutant
Performance

Model Testing
In this study, all the data from January 2018 to May 2018 were used to the test model. In this stage, all data were pre-processed and input into the pollutant prediction model established in the previous stage. The prediction performance of the test stage was through the overall performance Table, trend breakdown chart and regression analysis of Douliu City. The overall performance of the detailed test phase data prediction is shown in Table 11. The overall prediction results show that although the predicted performance of each pollutant is good at Y(t + 1), the performance indicators from Y(t + 2) to Y(t + 6) begin to decrease dramatically. Except that the R 2 of AQI can keep at 0.683 at the lowest level, the R 2 of other pollutants is lower than 0.5. Although the air quality warning standard can be maintained within the ideal standard range, other pollutant predicted as AQI calculations may need to be adjusted to make the calculated more accurate for Y(t + 2) to Y(t + 6). However, it indicates that the public can take into account that the next hour prediction in AQI index is the best in next six hour's prediction and its average performance of R 2 is over 0.981 (in Table 11) since it is approach to 1 which is the idea value of R 2 . AQI predicted results in Douliu City in May 2018) is also shown in Figure 13 for demonstration, its R 2 is 0.9611 also approach to 1 too. From Table 11, we can also conclude that our proposed system has an excellent prediction in next two hours since its R 2 are over 0.936 in model testing.

Pollutant
Performance   From the overall performance of the actual predicted in third stage, it is also found that the performance of each pollutant at Y(t + 1) is well, but from Y(t + 2) to Y(t + 6) there is a gradual decline. The overall performance of the detailed prediction stage is shown in Table 12. AQI index remain the best performance in R 2 , it reaches 0.947, Y(t + 1) almost close to 1 in next hour prediction.

Model Prediction
From 1 June 2018 to 30 June 2018, all the predicted results and actual values are analyzed and compared. From the overall performance of the actual predicted in third stage, it is also found that the performance of each pollutant at Y(t + 1) is well, but from Y(t + 2) to Y(t + 6) there is a gradual decline. The overall performance of the detailed prediction stage is shown in Table 12. AQI index remain the best performance in R 2 , it reaches 0.947, Y(t + 1) almost close to 1 in next hour prediction.

Pollutant
Performance In the prediction stage, the trend break-line chart and regression analysis chart of Douliu City for the next hour in June 2018 is shown in Figure 14. Basically, most of the pollutant performance indicators and AQI are almost the same as May 2018 in Figure 13. Nevertheless, after close examine the performance in every month in 2018, the results are almost the same. It shows our proposed ACES system's robustness.  In the prediction stage, the trend break-line chart and regression analysis chart of Douliu City for the next hour in June 2018 is shown in Figure 14. Basically, most of the pollutant performance indicators and AQI are almost the same as May 2018 in Figure 13. Nevertheless, after close examine the performance in every month in 2018, the results are almost the same. It shows our proposed ACES system's robustness.

Discussion
The method proposed in this study has a good performance in predicting the results of AQI in the first hour in the test and prediction stage, while the predictive performance of AQI in the fourth to sixth hours is relatively low. Compared to other pollutants, the performance of SO2 in the six pollutants is relatively not well. Although the predictive performance of the six pollutants is not the same, the AQI values calculated in the end all show good performance. A possible reason is the maximum AQI is selected as the representative. When the pollutant value is incorporated into the

Discussion
The method proposed in this study has a good performance in predicting the results of AQI in the first hour in the test and prediction stage, while the predictive performance of AQI in the fourth to sixth hours is relatively low. Compared to other pollutants, the performance of SO 2 in the six pollutants is relatively not well. Although the predictive performance of the six pollutants is not the same, the AQI values calculated in the end all show good performance. A possible reason is the maximum AQI is selected as the representative. When the pollutant value is incorporated into the AQI formula, the influence of the prediction error of the pollutant value itself may be indirectly reduced by the calculation method of the formula.
The reason why the predictive performance of model Y(t + 1) to Y(t + 6) declines gradually may be that the variables characteristic used in the current model are not considered traffic, factories and other possible variables. Maybe that's why the next hour prediction is good enough and decay as times go by.
Azure machine learning studio is still in developing progress, therefore, this study only chooses the matured three machine learning algorithm in prediction. Maybe by adding code from R and Python or use another matured machine learning algorithm in prediction will achieve a better result in the fourth to sixth hours' AQI index prediction. The poor performance of the prediction model in the fourth to sixth hours may also be that the old data need to be retrained. This study did not carry out the model retraining. When the system is officially running, a threshold value of error standard can be set to check the prediction performance every time or regularly. If the error is greater than the set threshold, the latest data will be added to the model training data to retrain the model. A possible detailed model retraining process is shown in Figure 15. AQI formula, the influence of the prediction error of the pollutant value itself may be indirectly reduced by the calculation method of the formula. The reason why the predictive performance of model Y(t + 1) to Y(t + 6) declines gradually may be that the variables characteristic used in the current model are not considered traffic, factories and other possible variables. Maybe that's why the next hour prediction is good enough and decay as times go by.
Azure machine learning studio is still in developing progress, therefore, this study only chooses the matured three machine learning algorithm in prediction. Maybe by adding code from R and Python or use another matured machine learning algorithm in prediction will achieve a better result in the fourth to sixth hours' AQI index prediction. The poor performance of the prediction model in the fourth to sixth hours may also be that the old data need to be retrained. This study did not carry out the model retraining. When the system is officially running, a threshold value of error standard can be set to check the prediction performance every time or regularly. If the error is greater than the set threshold, the latest data will be added to the model training data to retrain the model. A possible detailed mode

Conclusions
For the achievements and contributions of this study, first of all, a set of air quality deterioration early warning system integrated by Azure services is proposed, and its cloud-based architecture has many advantages over the use of local servers, such as easy maintenance and management, providing a series of highly integrated and compatible functions, and easy expansion of efficiency. The experimental results show that the ACES system has good prediction results for the AQI index for the next one to three hours, and it also provides users with visual distribution map service of air pollution in Taiwan's counties. Unaware of the shortcomings of future AQI predictions in hourly units, an information-based intervention to help people in advance or avoid approaching areas with serious air pollution will reduce personal health hazards and medical costs. Finally, comparing this study with some other related study, we find that although the prediction range of this study is relatively short, most of the studies seldom use cloud platform, and don't have fully applied such as early warning and the visualization map. The study comparison is shown in Table 13.

Conclusions
For the achievements and contributions of this study, first of all, a set of air quality deterioration early warning system integrated by Azure services is proposed, and its cloud-based architecture has many advantages over the use of local servers, such as easy maintenance and management, providing a series of highly integrated and compatible functions, and easy expansion of efficiency. The experimental results show that the ACES system has good prediction results for the AQI index for the next one to three hours, and it also provides users with visual distribution map service of air pollution in Taiwan's counties. Unaware of the shortcomings of future AQI predictions in hourly units, an information-based intervention to help people in advance or avoid approaching areas with serious air pollution will reduce personal health hazards and medical costs. Finally, comparing this study with some other related study, we find that although the prediction range of this study is relatively short, most of the studies seldom use cloud platform, and don't have fully applied such as early warning and the visualization map. The study comparison is shown in Table 13. In the future, institute has limited types of data related to air pollution and some sensitive data are difficult to obtain, so it cannot consider various factors that may affect air quality, such as urban traffic or factory exhaust. If there is an opportunity, more different kinds of data like open data can be added to improve the research. As for the model retraining mechanism, threshold issue and feature correlation analysis can also be further studied for future prospects.