# Integrated Deep Neural Networks-Based Complex System for Urban Water Management

Authors: Xu Gao; Wenru Zeng; Yu Shen; Zhiwei Guo; Jinhui Yang; Xuhong Cheng; Qiaozhi Hua; Keping Yu
Journal: Complexity
 (2020)

---

## Abstract

Although the management and planning of water resources are extremely significant to human development, the complexity of implementation is unimaginable. To achieve this, the high-precision water consumption prediction is actually the key component of urban water optimization management system. Water consumption is usually affected by many factors, such as weather, economy, and water prices. If these impact factors are directly combined to predict water consumption, the weight of each perspective on the water consumption will be ignored, which will be greatly detrimental to the prediction accuracy. Therefore, this paper proposes a deep neural network-based complex system for urban water management. The essence of it is to formulate a water consumption prediction model with the aid of principal component analysis (PCA) and the integrated deep neural network, which is abbreviated as UWM-Id. The PCA classifies the factors affecting water consumption in the original data into three categories according to their correlation and inputs them into the neural network model. The results in the previous step are assigned weights and integrated into the form of fully connected layer. Finally, analyzing the sensitivity of the proposed UWM-Id and comparing its performance with a series of commonly used baseline methods for data mining, a large number of experiments have proved that UWM-Id has good performance and can be used for urban water management system.


---

## Body

## 1. Introductio

Due to the rapid economic development and explosive population growth, water shortages have appeared in many parts of the world [1, 2]. Urban water management system is of great significance to the sustainable development of urban water resources [3, 4]. And it can encourage the water sector to allocate water resources rationally and maximize the long-term value and reliability of available water resources [5–7]. However, the urban water management system is a process that is extremely complex and difficult to control [8, 9]. It includes the storage, distribution, and discharge of urban water [10–12]. And its main purpose is rational development, unified management, and optimal allocation for water resources [13, 14]. To realize the urban water management system, it is necessary to grasp the issue of urban water consumption [15, 16]. The expansion of the industry and the rise in global temperature have increased water consumption [17]; the government’s introduction of water-saving measures and higher water prices will curb the growth rate of water consumption [18]. Based on this difference, it can be found that urban water consumption has certain volatility and ambiguity. Therefore, it is necessary to analyze urban water consumption from multiple angles, which greatly increases the difficulty of predicting [19].Many scholars have made contributions to the field of urban water management. They have successively proposed a series of water management models, including statistical analysis models (autoregressive integrated moving average model [20, 21], exponential smoothing [22, 23], etc.), gray theory models (GM1,1 [24], NGBM1,1 [25], etc.), and neural network models (artificial neural network (ANN) [26, 27], and long- and short-term memory network (LSTM) [28–30], etc.). Statistical analysis methods usually require datasets to follow certain assumptions or distributions [31, 32]. However, the collected real datasets are unlikely to meet statistical assumptions. And gray theory models generally solve the modeling of small sample size and sparse data [33, 34]. But water consumption is affected by many factors, and it is more suitable for deep learning methods for such prediction problems with complex data volume and difficult to fit fluctuation patterns [35, 36]. Al-Zahrani and Abo-Monasar [26] proposed a neural network prediction model combined with coupled time series by considering climate variables. This model mainly combines the drought characteristics of the Middle East, and it can be very helpful in efficiently predicting water consumption in this region. Surendra and Deka [37] used an improved fuzzy-wavelet model to predict urban residential water consumption on the basis of considering climate change. This model introduces denoise and compress methods and uses climate data and water consumption at a certain time for model training and testing, which greatly improves the performance of the model compared with ordinary fuzzy models.However, there are many factors influencing urban water consumption. To measure the relationship between each factor and the relationship between factors and water consumption is quite complex. In addition, current researches rarely classify impact factors through feature selection and consider the comprehensive impact of each category on water consumption. Therefore, this paper proposes a new Urban Water management Mechanism based on Integrated deep neural network (UWM-Id). Firstly, use principal component analysis (PCA) and gray relational analysis (GRA) methods to reduce dimensionality and classify 15 impact factors of urban water consumption. Dimensionality reduction is performed through PCA, and the factors with greater correlation are combined to finally obtain three principal components; dimensionality reduction is performed through GRA, and the impact factors are sorted according to the gray correlation degree. Then select indicators that are more relevant to water consumption by setting thresholds. Then, the indicators contained in the three principal components are, respectively, input into LSTM, and the three LSTMs are fused to output the predicted value. Finally, the indicators selected by the PCA are input into several baseline methods to evaluate the performance of the proposed UWM-Id.The rest part of this paper is organized as follows. The framework and problem of this paper are illustrated in Section2. The detailed principle and process of feature selection and integration model are described in Section 3. Section 4 includes a discussion of the data, experimental settings, and a series of experiments for UWM-Id. Section 5 includes the conclusions.


## 2. Overview

### 2.1. Framework of UWM-Id

This research put forward a novel architecture UWM-Id whose framework design is illustrated in Figure1. The architecture includes four layers: data layer, feature selection layer, model computing layer, and model integration layer.(1)
The data layer is the interface through which various data sources enter the model. The data source is the historical data of water consumption required for this study and indicators that affect water consumption used. The selection index should comply with the content of the evaluation, reflect the relevant content, and be scientific. Therefore, this study selects 15 indicators from the perspective of economic development, political culture, and living facilities based on the above rules.(2)
After data acquisition, data is transmitted to the feature selection layer for feature dimensionality reduction and classification. The impact factors in the dataset are integrated into three principal components through PCA, and each principal component contains one type of factor. Calculate the gray correlation degree between the impact factor and water consumption through GAR, and do the following processing: sort based on the gray correlation degree, and set the threshold and select factors that are more relevant to water consumption.(3)
InputPi through the feature selection layer into the model computing layer with water consumption data, respectively. The model computing layer selects the LSTM that is commonly used for time-series data prediction.(4)
Finally, the prediction results of the three primary LSTMs are synthesized, optimized, and integrated into a new model. Therefore, comprehensive analysis and prediction of water consumption from three aspects improve the accuracy of predicting.Figure 1
Framework design of the UWM-Id.


### 2.2. Problem Statement

This paper proposes a management mechanism based on integrated neural network (UWM-Id). It provides support for urban water management systems by predicting water consumption. The flowchart of the management mechanism is shown in Figure2.Figure 2
Flowchart of the proposed management mechanism.UWM-Id includes two stages: training and prediction of primary LSTMs (Model1−Model3); raining and prediction of integrated model (Model4). The task of the previous stage is to analyze three different dimensions to predict the annual water consumption. Model1−Model3 can actually be regarded as weak individual learners, respectively. The difference between them comes from the influence of different perspectives on water consumption. The goal of the second stage is to integrate the influence of the three perspectives. On the basis of the previous stage, weights are assigned according to the size of the loss so as to obtain a predicted value closer to the true value of water consumption. At this stage, the above individual learners are strongly combined to make the integrated Model4 more effective.After the second stage, this paper will use GRA to reduce the dimensionality of features, then input the retained features into a series of baseline models, and take them as a comparative experiment to evaluate the performance and superiority of UWM-Id.


## 2.1. Framework of UWM-Id

This research put forward a novel architecture UWM-Id whose framework design is illustrated in Figure1. The architecture includes four layers: data layer, feature selection layer, model computing layer, and model integration layer.(1)
The data layer is the interface through which various data sources enter the model. The data source is the historical data of water consumption required for this study and indicators that affect water consumption used. The selection index should comply with the content of the evaluation, reflect the relevant content, and be scientific. Therefore, this study selects 15 indicators from the perspective of economic development, political culture, and living facilities based on the above rules.(2)
After data acquisition, data is transmitted to the feature selection layer for feature dimensionality reduction and classification. The impact factors in the dataset are integrated into three principal components through PCA, and each principal component contains one type of factor. Calculate the gray correlation degree between the impact factor and water consumption through GAR, and do the following processing: sort based on the gray correlation degree, and set the threshold and select factors that are more relevant to water consumption.(3)
InputPi through the feature selection layer into the model computing layer with water consumption data, respectively. The model computing layer selects the LSTM that is commonly used for time-series data prediction.(4)
Finally, the prediction results of the three primary LSTMs are synthesized, optimized, and integrated into a new model. Therefore, comprehensive analysis and prediction of water consumption from three aspects improve the accuracy of predicting.Figure 1
Framework design of the UWM-Id.


## 2.2. Problem Statement

This paper proposes a management mechanism based on integrated neural network (UWM-Id). It provides support for urban water management systems by predicting water consumption. The flowchart of the management mechanism is shown in Figure2.Figure 2
Flowchart of the proposed management mechanism.UWM-Id includes two stages: training and prediction of primary LSTMs (Model1−Model3); raining and prediction of integrated model (Model4). The task of the previous stage is to analyze three different dimensions to predict the annual water consumption. Model1−Model3 can actually be regarded as weak individual learners, respectively. The difference between them comes from the influence of different perspectives on water consumption. The goal of the second stage is to integrate the influence of the three perspectives. On the basis of the previous stage, weights are assigned according to the size of the loss so as to obtain a predicted value closer to the true value of water consumption. At this stage, the above individual learners are strongly combined to make the integrated Model4 more effective.After the second stage, this paper will use GRA to reduce the dimensionality of features, then input the retained features into a series of baseline models, and take them as a comparative experiment to evaluate the performance and superiority of UWM-Id.


## 3. Methodology

### 3.1. Feature Selection

#### 3.1.1. PCA-Based Method

The factor analysis method refers to a multivariate statistical analysis method based on the dependence relationship within the correlation matrix of the research index, which reduces some variables with overlapping information and intricate relationships into a few uncorrelated comprehensive factors [38, 39].Principal component analysis (PCA) is a type of the factor analysis method, and its principle is shown in Figure3. The basic idea is as follows:(1)
Under the premise of losing little information, multiple indexes are transformed into several unrelated comprehensive indexes (principal componentP) through dimensionality reduction (linear transformation).(2)
Each principal component is a linear combination of the original variables, and the principal components are not related to each other. This makes the principal components have some superior properties than the original variables.Figure 3
Schematic diagram of principal component analysis.X is the initial impact factor matrix of water consumption, X=x1,x2,x3,…,xp′:(1)X=x1,1x1,2⋯x1,mx2,1x2,2⋯x2,m⋮⋮⋱⋮xp,1xp,2⋯xp,m=xi,j,where xi,j is the corresponding value of factor i in year j (i=1,2,…,p; j=1,2,…,m), p is the dimension of X, and m represents the total number of years taken in the sample set.Step 1. First standardize the sample set, as shown in the following formula:(2)xi,j∗=xi,j−X¯jσj,(3)X¯j=∑i=1pxi,jp,(4)σj=∑i=1pxi,j−X¯j2p−1,wherexi,j∗ is the normalized value of xi,j and X¯j and σj are the sample mean and standard deviation, respectively.Step 2. Calculate the correlation coefficient matrix of X∗. The correlation coefficient matrix R of the standardized impact factor set is as follows:(5)R=1pX∗TX∗=r1,1r1,2⋯r1,mr2,1r2,2⋯r2,m⋮⋮⋱⋮rp,1rp,2⋯rp,m.Step 3. Calculate the eigenvalues of R and the corresponding factors. From the characteristic equation R−λE=0, the m characteristic values λj of R can be obtained. Then arrange the eigenvalues from large to small, λ1≥λ2≥⋯≥λp. And calculate the eigenvector corresponding to the eigenvalue expressed as follows:(6)Wj=w1,j,w2,j,…,wp,j,j=1,2,…,m.Step 4. Calculate the variance contribution rate (αi) and cumulative variance contribution rate (αi) of each principal component.(7)αi=λj∑j=1mλj,αi=∑j=1mαj.When the cumulative variance contribution rate reaches more than 85%, the first factor is selected as the main component that affects water consumption and used in the integrated LSTM model. Specifically, the original feature space is subjected to dimensionality reduction processing by formula (8) to simplify the complexity of model solution. P is the variable after factor i takes into account the transformation of principal components, which effectively reduces the types of impact factors.(8)P=xi,1xi,2,…,xi,mw1,1w1,2⋯w1,mw2,1w2,2⋯w2,m⋮⋮⋱⋮wa,1wa,2⋯wa,m.


#### 3.1.2. GRA-Based Method

GRA is a multifactor-based analysis method that originated in the 1980s, which usually takes uncertainty systems as the research object. Water consumption prediction has the characteristics of fewer data and strong uncertainty [40–42]. Therefore, GRA can be used to analyze the factors affecting water consumption.This paper uses water consumption as a reference sequence and 15 indicators that affect water consumption as a comparison series, then calculates the gray correlation coefficient and gray correlation degree between the comparison sequence and the reference sequence, and according to the gray correlation coefficient and correlation degree finds out the key factors affecting urban water consumption and analyzes the influence degree of each index. The specific calculation steps are as follows.Step 1. Determine the reference sequence (urban water consumption):(9)x0=x01,x02,…,x0m.Determine the comparative sequence of water consumption:(10)x1=x11,x12,…,x1m…x1toxp−1,xp=xp1,xp2,…,xpm.Step 2. Dimensionless processing is performed on the reference sequence and the comparison sequence.Step 3. Calculate the correlation factor between the reference sequence and the comparison sequence. Then the correlation factor between the comparison sequence xii=1,2,…,p and the reference sequence x0 is defined as(11)ϑik=miniminkx0k−xik+ρmaximaxkx0k−xikx0k−xik+ρmaximaxkx0k−xik,whereρ∈0,+∞ refers to the resolution; the smaller ρ is, the greater the resolution is.Step 4. Calculate the relevance degree. Since the correlation factor ϑik is the correlation factor value between the reference sequence and the comparison sequence in each component, there are many results and it is not easy to compare. Therefore, it is necessary to concentrate on the correlation factor of each index of each factor vector on one value, which is called the gray correlation degree. The gray correlation degree between x0 and xii=1,2,…,p is defined as(12)γi=1n∑k=1nϑik.Step 5. Sort by the gray correlation degree. Arrange the gray correlation degree between the impact factor and water consumption in order of magnitude to form the correlation sequence, denoted as G. It reflects the degree of correlation between each impact factor and water consumption.Step 6. Set threshold and select features. Set appropriate thresholds and select features that meet the conditions. Then input them into the baseline methods to compare with the UWM-Id proposed in this study.


### 3.2. Model Integration

The basic neural network predictor used by UWM-Id proposed in this paper is LSTM. Refer to Figure4 for the internal neuron structure of LSTM. LSTM solves the vanishing gradient problem of the original recurrent neural network (RNN). It has strong time-series data processing capabilities and is widely used in time-series data modeling [43–45].Figure 4
Internal neuron structure of long- and short-term memory neural network model.LSTM consists of input gate, forget gate, and output gate. The input gate is used to control the input of information; the forget gate determines the retention of the historical state information of the cell; the function of the output gate is to control the output of information. The activation functionσ· makes the output range of the forget gate between 0,1, which is usually the sigmoid function. When the output of the forget gate is 0, it means that all information in the previous state is discarded; when it is 1, it means that all the information in the previous state is retained.(13)ft=σWfht−1,xt+bf,it=σWiht−1,xt+bi,Ct′=tanhWcht−1,xt+bc,Ct=ftCt−1+itCt′,ot=σWoht−1,xt+bo,ht=ottanhCt,where ft is the forget gate coefficient at the timestamp t; it is the input gate coefficient at the timestamp t; Ct′ is the input data obtained through the tanh function; Ct is the updated cell state at the timestamp t; ot is the output gate coefficient; ht is the output data at the timestamp t; ht−1 is the output data at the timestamp t−1; xt is the input data at the timestamp t; Ct−1 is the cell state at the timestamp t−1; Wf· and bf are the weight function and bias of the forget gate corresponding to the neuron from the timestamp t−1 to the timestamp t, respectively; Wi· and bi are the weight function and bias of the input gate corresponding to the neuron from the timestamp t−1 to the timestamp t, respectively; Wc· and bc are the weight function and bias of the input data corresponding to the neuron from the timestamp t−1 to the timestamp t, respectively; Wo· and bo are the weight function and bias of the output gate corresponding to the neuron from the timestamp t−1 to the timestamp t, respectively.Pi after the PCA dimensionality reduction operation is input into the LSTM basic predictor. Then assign weights according to the prediction accuracy obtained by each predictor, and connect them with a fully connected layer.The output is a linear transformation ofςit, which is calculated as(14)y^t=sigmoidw1t⋅ς1t+w2t⋅ς2t+w2t⋅ς2t+bt,where wit and bt are the weight vector and the bias vector of Model1−Model3 at the t-th timestamp, respectively, and y^t denotes the output from the full connection layer.To avoid overfitting, the loss function is the following optimization objective:(15)D=12∑t=1Ty^κt−yt2,(16)κi=κi−αhκx0j,x1j,…,xnj−yjxij,where y^κt and yt are, respectively, the prediction values and the real values of urban water consumption, κ denotes a conventional parameter in gradient descent method, α refers to the learning rate, and hκ represents the internal function of the selected model.The principle of the optimization algorithm is to select data and calculate the difference between the value obtained according to the model and the actual value at this time. If the difference is large, the parameter update amplitude is large, and vice versa. The optimization algorithm adopted here is the stochastic gradient descent (SGD). Traditional GD uses all training data for each iteration. But the SGD algorithm only randomly selects a set of training data to update the parameters in each iteration.


## 3.1. Feature Selection

### 3.1.1. PCA-Based Method

The factor analysis method refers to a multivariate statistical analysis method based on the dependence relationship within the correlation matrix of the research index, which reduces some variables with overlapping information and intricate relationships into a few uncorrelated comprehensive factors [38, 39].Principal component analysis (PCA) is a type of the factor analysis method, and its principle is shown in Figure3. The basic idea is as follows:(1)
Under the premise of losing little information, multiple indexes are transformed into several unrelated comprehensive indexes (principal componentP) through dimensionality reduction (linear transformation).(2)
Each principal component is a linear combination of the original variables, and the principal components are not related to each other. This makes the principal components have some superior properties than the original variables.Figure 3
Schematic diagram of principal component analysis.X is the initial impact factor matrix of water consumption, X=x1,x2,x3,…,xp′:(1)X=x1,1x1,2⋯x1,mx2,1x2,2⋯x2,m⋮⋮⋱⋮xp,1xp,2⋯xp,m=xi,j,where xi,j is the corresponding value of factor i in year j (i=1,2,…,p; j=1,2,…,m), p is the dimension of X, and m represents the total number of years taken in the sample set.Step 1. First standardize the sample set, as shown in the following formula:(2)xi,j∗=xi,j−X¯jσj,(3)X¯j=∑i=1pxi,jp,(4)σj=∑i=1pxi,j−X¯j2p−1,wherexi,j∗ is the normalized value of xi,j and X¯j and σj are the sample mean and standard deviation, respectively.Step 2. Calculate the correlation coefficient matrix of X∗. The correlation coefficient matrix R of the standardized impact factor set is as follows:(5)R=1pX∗TX∗=r1,1r1,2⋯r1,mr2,1r2,2⋯r2,m⋮⋮⋱⋮rp,1rp,2⋯rp,m.Step 3. Calculate the eigenvalues of R and the corresponding factors. From the characteristic equation R−λE=0, the m characteristic values λj of R can be obtained. Then arrange the eigenvalues from large to small, λ1≥λ2≥⋯≥λp. And calculate the eigenvector corresponding to the eigenvalue expressed as follows:(6)Wj=w1,j,w2,j,…,wp,j,j=1,2,…,m.Step 4. Calculate the variance contribution rate (αi) and cumulative variance contribution rate (αi) of each principal component.(7)αi=λj∑j=1mλj,αi=∑j=1mαj.When the cumulative variance contribution rate reaches more than 85%, the first factor is selected as the main component that affects water consumption and used in the integrated LSTM model. Specifically, the original feature space is subjected to dimensionality reduction processing by formula (8) to simplify the complexity of model solution. P is the variable after factor i takes into account the transformation of principal components, which effectively reduces the types of impact factors.(8)P=xi,1xi,2,…,xi,mw1,1w1,2⋯w1,mw2,1w2,2⋯w2,m⋮⋮⋱⋮wa,1wa,2⋯wa,m.


### 3.1.2. GRA-Based Method

GRA is a multifactor-based analysis method that originated in the 1980s, which usually takes uncertainty systems as the research object. Water consumption prediction has the characteristics of fewer data and strong uncertainty [40–42]. Therefore, GRA can be used to analyze the factors affecting water consumption.This paper uses water consumption as a reference sequence and 15 indicators that affect water consumption as a comparison series, then calculates the gray correlation coefficient and gray correlation degree between the comparison sequence and the reference sequence, and according to the gray correlation coefficient and correlation degree finds out the key factors affecting urban water consumption and analyzes the influence degree of each index. The specific calculation steps are as follows.Step 1. Determine the reference sequence (urban water consumption):(9)x0=x01,x02,…,x0m.Determine the comparative sequence of water consumption:(10)x1=x11,x12,…,x1m…x1toxp−1,xp=xp1,xp2,…,xpm.Step 2. Dimensionless processing is performed on the reference sequence and the comparison sequence.Step 3. Calculate the correlation factor between the reference sequence and the comparison sequence. Then the correlation factor between the comparison sequence xii=1,2,…,p and the reference sequence x0 is defined as(11)ϑik=miniminkx0k−xik+ρmaximaxkx0k−xikx0k−xik+ρmaximaxkx0k−xik,whereρ∈0,+∞ refers to the resolution; the smaller ρ is, the greater the resolution is.Step 4. Calculate the relevance degree. Since the correlation factor ϑik is the correlation factor value between the reference sequence and the comparison sequence in each component, there are many results and it is not easy to compare. Therefore, it is necessary to concentrate on the correlation factor of each index of each factor vector on one value, which is called the gray correlation degree. The gray correlation degree between x0 and xii=1,2,…,p is defined as(12)γi=1n∑k=1nϑik.Step 5. Sort by the gray correlation degree. Arrange the gray correlation degree between the impact factor and water consumption in order of magnitude to form the correlation sequence, denoted as G. It reflects the degree of correlation between each impact factor and water consumption.Step 6. Set threshold and select features. Set appropriate thresholds and select features that meet the conditions. Then input them into the baseline methods to compare with the UWM-Id proposed in this study.


## 3.1.1. PCA-Based Method

The factor analysis method refers to a multivariate statistical analysis method based on the dependence relationship within the correlation matrix of the research index, which reduces some variables with overlapping information and intricate relationships into a few uncorrelated comprehensive factors [38, 39].Principal component analysis (PCA) is a type of the factor analysis method, and its principle is shown in Figure3. The basic idea is as follows:(1)
Under the premise of losing little information, multiple indexes are transformed into several unrelated comprehensive indexes (principal componentP) through dimensionality reduction (linear transformation).(2)
Each principal component is a linear combination of the original variables, and the principal components are not related to each other. This makes the principal components have some superior properties than the original variables.Figure 3
Schematic diagram of principal component analysis.X is the initial impact factor matrix of water consumption, X=x1,x2,x3,…,xp′:(1)X=x1,1x1,2⋯x1,mx2,1x2,2⋯x2,m⋮⋮⋱⋮xp,1xp,2⋯xp,m=xi,j,where xi,j is the corresponding value of factor i in year j (i=1,2,…,p; j=1,2,…,m), p is the dimension of X, and m represents the total number of years taken in the sample set.Step 1. First standardize the sample set, as shown in the following formula:(2)xi,j∗=xi,j−X¯jσj,(3)X¯j=∑i=1pxi,jp,(4)σj=∑i=1pxi,j−X¯j2p−1,wherexi,j∗ is the normalized value of xi,j and X¯j and σj are the sample mean and standard deviation, respectively.Step 2. Calculate the correlation coefficient matrix of X∗. The correlation coefficient matrix R of the standardized impact factor set is as follows:(5)R=1pX∗TX∗=r1,1r1,2⋯r1,mr2,1r2,2⋯r2,m⋮⋮⋱⋮rp,1rp,2⋯rp,m.Step 3. Calculate the eigenvalues of R and the corresponding factors. From the characteristic equation R−λE=0, the m characteristic values λj of R can be obtained. Then arrange the eigenvalues from large to small, λ1≥λ2≥⋯≥λp. And calculate the eigenvector corresponding to the eigenvalue expressed as follows:(6)Wj=w1,j,w2,j,…,wp,j,j=1,2,…,m.Step 4. Calculate the variance contribution rate (αi) and cumulative variance contribution rate (αi) of each principal component.(7)αi=λj∑j=1mλj,αi=∑j=1mαj.When the cumulative variance contribution rate reaches more than 85%, the first factor is selected as the main component that affects water consumption and used in the integrated LSTM model. Specifically, the original feature space is subjected to dimensionality reduction processing by formula (8) to simplify the complexity of model solution. P is the variable after factor i takes into account the transformation of principal components, which effectively reduces the types of impact factors.(8)P=xi,1xi,2,…,xi,mw1,1w1,2⋯w1,mw2,1w2,2⋯w2,m⋮⋮⋱⋮wa,1wa,2⋯wa,m.


## 3.1.2. GRA-Based Method

GRA is a multifactor-based analysis method that originated in the 1980s, which usually takes uncertainty systems as the research object. Water consumption prediction has the characteristics of fewer data and strong uncertainty [40–42]. Therefore, GRA can be used to analyze the factors affecting water consumption.This paper uses water consumption as a reference sequence and 15 indicators that affect water consumption as a comparison series, then calculates the gray correlation coefficient and gray correlation degree between the comparison sequence and the reference sequence, and according to the gray correlation coefficient and correlation degree finds out the key factors affecting urban water consumption and analyzes the influence degree of each index. The specific calculation steps are as follows.Step 1. Determine the reference sequence (urban water consumption):(9)x0=x01,x02,…,x0m.Determine the comparative sequence of water consumption:(10)x1=x11,x12,…,x1m…x1toxp−1,xp=xp1,xp2,…,xpm.Step 2. Dimensionless processing is performed on the reference sequence and the comparison sequence.Step 3. Calculate the correlation factor between the reference sequence and the comparison sequence. Then the correlation factor between the comparison sequence xii=1,2,…,p and the reference sequence x0 is defined as(11)ϑik=miniminkx0k−xik+ρmaximaxkx0k−xikx0k−xik+ρmaximaxkx0k−xik,whereρ∈0,+∞ refers to the resolution; the smaller ρ is, the greater the resolution is.Step 4. Calculate the relevance degree. Since the correlation factor ϑik is the correlation factor value between the reference sequence and the comparison sequence in each component, there are many results and it is not easy to compare. Therefore, it is necessary to concentrate on the correlation factor of each index of each factor vector on one value, which is called the gray correlation degree. The gray correlation degree between x0 and xii=1,2,…,p is defined as(12)γi=1n∑k=1nϑik.Step 5. Sort by the gray correlation degree. Arrange the gray correlation degree between the impact factor and water consumption in order of magnitude to form the correlation sequence, denoted as G. It reflects the degree of correlation between each impact factor and water consumption.Step 6. Set threshold and select features. Set appropriate thresholds and select features that meet the conditions. Then input them into the baseline methods to compare with the UWM-Id proposed in this study.


## 3.2. Model Integration

The basic neural network predictor used by UWM-Id proposed in this paper is LSTM. Refer to Figure4 for the internal neuron structure of LSTM. LSTM solves the vanishing gradient problem of the original recurrent neural network (RNN). It has strong time-series data processing capabilities and is widely used in time-series data modeling [43–45].Figure 4
Internal neuron structure of long- and short-term memory neural network model.LSTM consists of input gate, forget gate, and output gate. The input gate is used to control the input of information; the forget gate determines the retention of the historical state information of the cell; the function of the output gate is to control the output of information. The activation functionσ· makes the output range of the forget gate between 0,1, which is usually the sigmoid function. When the output of the forget gate is 0, it means that all information in the previous state is discarded; when it is 1, it means that all the information in the previous state is retained.(13)ft=σWfht−1,xt+bf,it=σWiht−1,xt+bi,Ct′=tanhWcht−1,xt+bc,Ct=ftCt−1+itCt′,ot=σWoht−1,xt+bo,ht=ottanhCt,where ft is the forget gate coefficient at the timestamp t; it is the input gate coefficient at the timestamp t; Ct′ is the input data obtained through the tanh function; Ct is the updated cell state at the timestamp t; ot is the output gate coefficient; ht is the output data at the timestamp t; ht−1 is the output data at the timestamp t−1; xt is the input data at the timestamp t; Ct−1 is the cell state at the timestamp t−1; Wf· and bf are the weight function and bias of the forget gate corresponding to the neuron from the timestamp t−1 to the timestamp t, respectively; Wi· and bi are the weight function and bias of the input gate corresponding to the neuron from the timestamp t−1 to the timestamp t, respectively; Wc· and bc are the weight function and bias of the input data corresponding to the neuron from the timestamp t−1 to the timestamp t, respectively; Wo· and bo are the weight function and bias of the output gate corresponding to the neuron from the timestamp t−1 to the timestamp t, respectively.Pi after the PCA dimensionality reduction operation is input into the LSTM basic predictor. Then assign weights according to the prediction accuracy obtained by each predictor, and connect them with a fully connected layer.The output is a linear transformation ofςit, which is calculated as(14)y^t=sigmoidw1t⋅ς1t+w2t⋅ς2t+w2t⋅ς2t+bt,where wit and bt are the weight vector and the bias vector of Model1−Model3 at the t-th timestamp, respectively, and y^t denotes the output from the full connection layer.To avoid overfitting, the loss function is the following optimization objective:(15)D=12∑t=1Ty^κt−yt2,(16)κi=κi−αhκx0j,x1j,…,xnj−yjxij,where y^κt and yt are, respectively, the prediction values and the real values of urban water consumption, κ denotes a conventional parameter in gradient descent method, α refers to the learning rate, and hκ represents the internal function of the selected model.The principle of the optimization algorithm is to select data and calculate the difference between the value obtained according to the model and the actual value at this time. If the difference is large, the parameter update amplitude is large, and vice versa. The optimization algorithm adopted here is the stochastic gradient descent (SGD). Traditional GD uses all training data for each iteration. But the SGD algorithm only randomly selects a set of training data to update the parameters in each iteration.


## 4. Experiments and Analysis

### 4.1. Dataset

This paper takes Chongqing as an example of research. In this study, 15 indicators that may affect urban water consumption are selected from the aspects of weather, economy, and politics to carry out water consumption predicting and modeling. The above data comes from theChongqing Water Resources Bulletin (http://www.cqwater.gov.cn/) and the 2004–2019 China National Statistical Yearbook (http://www.cq.gov.cn/).The data mainly containsx0 (water consumption (108cu⋅m)), x1 (resident population (104persons)), x2 (households with access to tap water (104household)), x3 (urbanization rate (%)), x4 (total number of employed persons (104persons)), x5 (precipitation (mm)), x6 (hospitals and health centers (unit)), x7 (average relative humidity (%)), x8 (gross domestic product (GDP) (108yuan)), x9 (electricity consumption (108kw⋅h)), x10 (number of students in institutions of higher learning (person)), x11 (average temperature (℃)), x12 (natural gas consumption (108cu⋅m)), x13 (Engel’s coefficient (%)), x14 (irrigated area (104hectares)), and x15 (water price (ton/yuan)). Table 1 displays the annual statistics of water consumption and the weather, economic, and political indicators in Chongqing from 2003 to 2018.Table 1
Annual statistics on water consumption and other indicators in Chongqing from 2003 to 2018.
Yearx0x1x2x3x4x5x6x7x8x9x10x11x12x13x14x15200363.172803.19146.9641.901499.991025.001682802555.72178.7525.5318.9021.6643.1064.972.46200467.452793.32153.9443.501471.341182.101574783048.03180.9430.3918.4022.4944.3061.682.48200571.462798.00207.0145.201456.301019.801463773486.22203.0635.7918.6025.9341.6061.812.66200673.202808.00208.4346.701454.77839.601450753929.67232.8240.5119.2027.5741.1062.132.66200777.432816.00224.0248.301468.871439.201447814698.25281.3144.5819.0032.7942.4063.372.80200882.772839.00234.3450.001492.43985.301396825817.55341.4048.5018.6037.4042.4065.892.80200985.302859.00255.1651.601513.001198.901404806559.99374.3652.3319.0039.0339.0067.202.80201086.392884.62300.2653.001539.951044.701449787957.49416.1556.5918.7041.1937.9068.533.50201186.802919.00317.9655.001585.16992.8014077410048.07482.4361.3017.7042.7638.0069.293.50201282.942945.00343.0757.001633.141104.4014057211456.26499.4867.0218.3050.4137.8070.303.50201383.912970.00362.3758.301683.511026.9015027112832.82545.4970.7619.9049.9635.8067.523.50201480.472991.40414.7459.601696.941452.5015107914322.91599.1974.0518.6055.3836.0067.733.50201579.983016.55475.8160.901707.371448.7015687515789.80624.6076.7119.6062.2235.2068.723.50201677.483048.43540.5062.601717.521345.80160679.517674.33624.6778.4618.5071.0834.3069.063.50201777.443075.16604.6264.101714.551196.20164078.519424.73622.4380.5218.4070.6633.2069.433.50201877.203101.79647.5765.501709.511128.20168478.220363.19627.8982.7918.3066.8532.3069.693.50This study uses the PCA method to process the matrix of water consumption impact factors. The eigenvalues of the principal components, their corresponding variance contribution rates, and cumulative variance contribution rates are obtained by PCA, as shown in Table2. This paper selects the principal component when αi>85%. Therefore, the eigenvalue vectors corresponding to the first three principal components are selected to change the original eigenmatrix for further load decomposition. It can be observed from Table 2 that the difference between the transformed features is more obvious.Table 2
Original eigenmatrix principal component analysis results.
Principal componentEigenvalueαi (%)αi (%)P110.61470.75770.757P21.57410.49581.252P31.1517.67188.924The impact factors contained in each principal component are expressed in Figure5. P1 contains indicators such as population, total number of employed persons, and GDP, so it is defined as a socioeconomic factor. P2 contains indicators such as precipitation and average relative humidity, so it is defined as a natural weather factor. P3 includes electricity consumption and gas consumption, so it is defined as an energy factor.Figure 5
Indicators included in the main component display.Use GRA to obtain the gray correlation degree between total water consumption and each impact factor. And sort them according to the degree of gray correlation, as shown in Figure6. According to the gray theory, when the correlation degree is greater than or equal to 0.8, it is a strong correlation degree. Therefore, the top 9 correlation factors x14, x11, x1, x4, x7, x15, x3, x6, and x13 are selected as the input of the baseline models in Figure 6.Figure 6
The gray correlation degree of each indicator and water consumption is sorted from large to small.


### 4.2. Experimental Settings

This paper selects the average absolute error (MAE) and root mean square error (RMSE) of the predicted mechanism as the measure, expressed by the formula(17)MAE=1N∑O=1NyO−yO′,RMSE=1N∑O=1NyO−yO′2,where yO represents the real value of water consumption at the year O, yo′ represents the predicted value of water consumption at the year O, and N is the total number of test sets in water consumption prediction model. For the above metrics, the lower values of these metrics represent better performance.In this experiment, it is necessary to select several water consumption prediction models as the baseline method to evaluate the performance of UWM-Id. Therefore, we compare the proposed UWM-Id with baseline models in order to verify whether UWM-Id can reflect good performance in the case of integrated predictions through different perspectives. The selected baselines are as follows:(1)
Random Forest (RF): it is a predictive model that integrates multiple decision numbers through the idea of integrated learning.(2)
Multilayer Preceptor (MLP): Ii is a feedforward ANN in which every neuron is fully connected.(3)
LSTM: it is a kind of sequential neural network model specially designed to solve the long-term dependence problem.This experiment adopts the SGD optimizer to optimize the model, and the default learning rate (α) is 0.005. And during the experiment, we randomly split the dataset into training set and test set; the default ratio is 7 : 3.


## 4.1. Dataset

This paper takes Chongqing as an example of research. In this study, 15 indicators that may affect urban water consumption are selected from the aspects of weather, economy, and politics to carry out water consumption predicting and modeling. The above data comes from theChongqing Water Resources Bulletin (http://www.cqwater.gov.cn/) and the 2004–2019 China National Statistical Yearbook (http://www.cq.gov.cn/).The data mainly containsx0 (water consumption (108cu⋅m)), x1 (resident population (104persons)), x2 (households with access to tap water (104household)), x3 (urbanization rate (%)), x4 (total number of employed persons (104persons)), x5 (precipitation (mm)), x6 (hospitals and health centers (unit)), x7 (average relative humidity (%)), x8 (gross domestic product (GDP) (108yuan)), x9 (electricity consumption (108kw⋅h)), x10 (number of students in institutions of higher learning (person)), x11 (average temperature (℃)), x12 (natural gas consumption (108cu⋅m)), x13 (Engel’s coefficient (%)), x14 (irrigated area (104hectares)), and x15 (water price (ton/yuan)). Table 1 displays the annual statistics of water consumption and the weather, economic, and political indicators in Chongqing from 2003 to 2018.Table 1
Annual statistics on water consumption and other indicators in Chongqing from 2003 to 2018.
Yearx0x1x2x3x4x5x6x7x8x9x10x11x12x13x14x15200363.172803.19146.9641.901499.991025.001682802555.72178.7525.5318.9021.6643.1064.972.46200467.452793.32153.9443.501471.341182.101574783048.03180.9430.3918.4022.4944.3061.682.48200571.462798.00207.0145.201456.301019.801463773486.22203.0635.7918.6025.9341.6061.812.66200673.202808.00208.4346.701454.77839.601450753929.67232.8240.5119.2027.5741.1062.132.66200777.432816.00224.0248.301468.871439.201447814698.25281.3144.5819.0032.7942.4063.372.80200882.772839.00234.3450.001492.43985.301396825817.55341.4048.5018.6037.4042.4065.892.80200985.302859.00255.1651.601513.001198.901404806559.99374.3652.3319.0039.0339.0067.202.80201086.392884.62300.2653.001539.951044.701449787957.49416.1556.5918.7041.1937.9068.533.50201186.802919.00317.9655.001585.16992.8014077410048.07482.4361.3017.7042.7638.0069.293.50201282.942945.00343.0757.001633.141104.4014057211456.26499.4867.0218.3050.4137.8070.303.50201383.912970.00362.3758.301683.511026.9015027112832.82545.4970.7619.9049.9635.8067.523.50201480.472991.40414.7459.601696.941452.5015107914322.91599.1974.0518.6055.3836.0067.733.50201579.983016.55475.8160.901707.371448.7015687515789.80624.6076.7119.6062.2235.2068.723.50201677.483048.43540.5062.601717.521345.80160679.517674.33624.6778.4618.5071.0834.3069.063.50201777.443075.16604.6264.101714.551196.20164078.519424.73622.4380.5218.4070.6633.2069.433.50201877.203101.79647.5765.501709.511128.20168478.220363.19627.8982.7918.3066.8532.3069.693.50This study uses the PCA method to process the matrix of water consumption impact factors. The eigenvalues of the principal components, their corresponding variance contribution rates, and cumulative variance contribution rates are obtained by PCA, as shown in Table2. This paper selects the principal component when αi>85%. Therefore, the eigenvalue vectors corresponding to the first three principal components are selected to change the original eigenmatrix for further load decomposition. It can be observed from Table 2 that the difference between the transformed features is more obvious.Table 2
Original eigenmatrix principal component analysis results.
Principal componentEigenvalueαi (%)αi (%)P110.61470.75770.757P21.57410.49581.252P31.1517.67188.924The impact factors contained in each principal component are expressed in Figure5. P1 contains indicators such as population, total number of employed persons, and GDP, so it is defined as a socioeconomic factor. P2 contains indicators such as precipitation and average relative humidity, so it is defined as a natural weather factor. P3 includes electricity consumption and gas consumption, so it is defined as an energy factor.Figure 5
Indicators included in the main component display.Use GRA to obtain the gray correlation degree between total water consumption and each impact factor. And sort them according to the degree of gray correlation, as shown in Figure6. According to the gray theory, when the correlation degree is greater than or equal to 0.8, it is a strong correlation degree. Therefore, the top 9 correlation factors x14, x11, x1, x4, x7, x15, x3, x6, and x13 are selected as the input of the baseline models in Figure 6.Figure 6
The gray correlation degree of each indicator and water consumption is sorted from large to small.


## 4.2. Experimental Settings

This paper selects the average absolute error (MAE) and root mean square error (RMSE) of the predicted mechanism as the measure, expressed by the formula(17)MAE=1N∑O=1NyO−yO′,RMSE=1N∑O=1NyO−yO′2,where yO represents the real value of water consumption at the year O, yo′ represents the predicted value of water consumption at the year O, and N is the total number of test sets in water consumption prediction model. For the above metrics, the lower values of these metrics represent better performance.In this experiment, it is necessary to select several water consumption prediction models as the baseline method to evaluate the performance of UWM-Id. Therefore, we compare the proposed UWM-Id with baseline models in order to verify whether UWM-Id can reflect good performance in the case of integrated predictions through different perspectives. The selected baselines are as follows:(1)
Random Forest (RF): it is a predictive model that integrates multiple decision numbers through the idea of integrated learning.(2)
Multilayer Preceptor (MLP): Ii is a feedforward ANN in which every neuron is fully connected.(3)
LSTM: it is a kind of sequential neural network model specially designed to solve the long-term dependence problem.This experiment adopts the SGD optimizer to optimize the model, and the default learning rate (α) is 0.005. And during the experiment, we randomly split the dataset into training set and test set; the default ratio is 7 : 3.


## 5. Results and Analysis

First, we evaluate and compare the proposed UWM-Id with three baseline methods. Tables3–5, respectively, list the model performance (MAE and RMSE) of UWM-Id and the baseline under the ratio of training set to test set of 6 : 4, 7 : 3, and 8 : 2. And on the basis of determining the ratio of the training set and the test set, the learning rate is set to 0.01, 0.008, and 0.005, respectively. In the above table, the cells that display the results include the evaluation value and the ranking of this evaluation value in UWM-Id and the baseline methods. After our calculations, the performance of the proposed UWM-Id model is improved by 40%, 33%, and 20% compared with RF, MLP, and LSTM, respectively. It can be directly observed from these tables that the proposed UWM-Id is better than the baselines in almost all cases. And the baseline methods used for comparison can also be well used to predict urban water consumption.Table 3
Experimental results with the ratio of 6 : 4 between training set and test set.
MethodsLearning rate: 0.01Learning rate: 0.008Learning rate: 0.005MAE (rank)RMSE (rank)MAE (rank)RMSE (rank)MAE (rank)RMSE (rank)RF0.085 (4)0.128 (4)0.081 (4)0.103 (4)0.078 (4)0.097 (4)MLP0.074 (3)0.097 (3)0.067 (3)0.085 (3)0.069 (2)0.089 (3)LSTM0.062 (2)0.084 (2)0.052 (1)0.073 (2)0.059 (3)0.085 (2)UWM-Id0.049 (1)0.063 (1)0.053 (2)0.069 (1)0.043 (1)0.060 (1)Table 4
Experimental results with the ratio of 7 : 3 between training set and test set.
MethodsLearning rate: 0.01Learning rate: 0.008Learning rate: 0.005MAE (rank)RMSE (rank)MAE (rank)RMSE (rank)MAE (rank)RMSE (rank)RF0.083 (4)0.115 (4)0.080 (4)0.102 (3)0.075 (4)0.099 (4)MLP0.071 (3)0.107 (3)0.069 (3)0.106 (4)0.065 (3)0.095 (3)LSTM0.060 (2)0.081 (2)0.057 (2)0.078 (2)0.053 (2)0.073 (2)UWM-Id0.046 (1)0.061 (1)0.049 (1)0.065 (1)0.041 (1)0.058 (1)Table 5
Experimental results with the ratio of 8 : 2 between training set and test set.
MethodsLearning rate: 0.01Learning rate: 0.008Learning rate: 0.005MAE (rank)RMSE (rank)MAE (rank)RMSE (rank)MAE (rank)RMSE (rank)RF0.086 (4)0.125 (4)0.074 (4)0.092 (4)0.064 (4)0.081 (3)MLP0.075 (3)0.098 (3)0.067 (3)0.090 (3)0.059 (3)0.083 (4)LSTM0.063 (2)0.087 (2)0.051 (1)0.083 (2)0.048 (2)0.074 (2)UWM-Id0.049 (1)0.076 (1)0.053 (2)0.078 (1)0.038 (1)0.064 (1)Although UWM-Id cannot achieve the best performance in some cases, the gap will not be too great. This phenomenon can be attributed to two main reasons. First, the UWM-Id proposed in this paper uses the PCA method to reduce and classify the impact factors of urban water consumption, while other methods use the GRA method to reduce the dimensionality of features. The advantage of PCA lies in the more accurate and fine-grained classification and representation of features. Secondly, the UWM-Id proposed in this paper adopts an integrated model. The three types of features processed by the PCA method are input into the LSTM models, and then they are integrated by a fully connected layer according to the weight to capture the characteristic structure of water consumption under different perspectives.In addition, we also conducted another set of experiments to evaluate the stability of the proposed UWM-Id. In this set of experiments, UWM-Id was only evaluated for parameter sensitivity alone and would not be compared with other baseline methods. The process of this experiment is as follows: set a series of values for the two parameters in the parameter combination; then input them into the UWM-Id model one by one; finally, test whether the experimental results are stable as a whole.Figures7 and 8, respectively, show the MAE and RMSE values of UWM-Id under different parameter settings. They all have three subgraphs, corresponding to the following parameter combinations: (a) training set ratio and optimizer, (b) learning rate and optimizer, and (c) learning rate and training set ratio. It can be seen from the above large number of subgraphs that, after adjusting the learning rate, optimizer, and dataset, the experimental results hardly change, which proves the stability of the proposed UWM-Id. The primary reason for this phenomenon is that UWM-Id integrates features from different perspectives of water consumption, making it less susceptible to parameter changes.Figure 7
The MAE value of UWM-Id under different parameter combinations, (a) the training set and optimizer, (b) the learning rate and optimizer, and (c) the learning rate and training set.
(a)(b)(c)Figure 8
The RMSE value of UWM-Id under different parameter combinations, (a) the training set and optimizer, (b) the learning rate and optimizer, and (c) the learning rate and training set.
(a)(b)(c)Based on the above two sets of experiments, the UWM-Id model was assessed from model performance and stability. Experimental results indicate that the UWM-Id proposed in this paper can effectively predict urban water consumption.


## 6. Conclusions

The urban water management system is a nonlinear, changeable process that is affected by many factors. It is complicated to consider the influence of multiple factors at the same time. Moreover, there are few or no examples of managing urban water resources by analyzing urban water consumption from multiple perspectives. Therefore, this paper established an urban water management framework based on integrated deep neural networks (UWM-Id). This study took Chongqing, China, as an example, and established a water management mechanism based on water consumption forecasts. Through PCA, the influencing factors of water consumption are divided into three categories: the socioeconomic factor, the natural weather factor, and the energy factor. Then, input these three types of factors into the UWM-Id established in this paper, and conduct a series of experiments. The experimental results prove that the proposed UWM-Id has better accuracy and stability. It can provide certain assistance to the urban water management system.



---

*Source: 8848324-2020-11-28.xml*