# Using Machine Learning Models and Actual Transaction Data for Predicting Real Estate Prices
## 3 Methods
### Backpropagation Neural Networks  
The backpropagation learning algorithms [33] make up a powerful and popular method to train multilayer perceptron neural networks. The backpropagation neural network containing one or more hidden layers delivers data patterns forward from the input layer through hidden layers to the output layer and generates output values. Feedback errors represented by the difference between the actual output values and the output values of the networks are then sent backward from the direction of the output layer to the input layer. During the process errors' propagation, a chain rule is applied to obtain the updated weights between neuros. By passing data forward and transmitting errors backward iteratively, the training error value decreases. For simplicity and generality, three layers MLP is illustrated for addressing the learning procedures of backpropagation neural networks [34]. Suppose the input data set is represented as \(I\), the \(h\)-\(th\) hidden neuro obtains an input depicted as Equation (13):  
\[HNI_{h}=f\left(\sum_{p=1}^{l}U_{hp}I_{p}+B_{h}\right)=f(NET_{h}),p=1\ldots l,h= 1\ldots m \tag{13}\]  
The \(f(\cdot)\) is the activation function, \(B_{h}\) is the bias of the \(h\)-\(th\) hidden neuro, \(I_{p}\) is the \(p\)-\(th\) input value, \(U_{hp}\) is the weight between the \(p\)-\(th\) input neuro and the \(h\)-\(th\) hidden neuro.  
The output of the \(h\)-\(th\) hidden neuro is represented as Equation (14).  
\[HNO_{q}=\sum_{h=1}^{m}V_{qh}f\left(\sum_{p=1}^{l}U_{hp}I_{p}+B_{h}\right)h=1 \ldots m,q=1\ldots n \tag{14}\]  
Then, the output of the \(q\)-\(th\) output neuro is represented as Equation (15).  
\[Y_{q}=f\left(\sum_{h=1}^{l}V_{qh}HNI_{h}+B_{q}\right)h=1\ldots m,q=1\ldots n \tag{15}\]  
where \(n\) is the number of output nodes, \(Y_{q}\) is the output value of the \(q\)-\(th\) output neuro, \(A_{q}\) is the \(q\)-\(th\) actual value.  
The training error is expressed as Equation (16).  
\[E=\frac{1}{2}\sum_{q=1}^{n}\left(A_{q}-Y_{q}\right)^{2} \tag{16}\]  
Then, by the gradient-descent method and chain rules, updated weights between the output layer and the hidden layer can be obtained and illustrated as Equation (17) and Equation (18).  
\[\Delta V_{qh}(t)=\left(\frac{\partial E}{\partial V_{qh}(t)}\right)= -\left(\frac{\partial E}{\partial Y_{q}}\right)\left(\frac{\partial Y_{q}}{ \partial HNO_{q}}\right)\left(\frac{\partial HNO_{q}}{\partial U_{hp}(t)} \right)= \left(A_{q}-Y_{q}\right)f\left(HNO_{q}\right)(HNI_{h}) \tag{17}\] \[V_{qh}(t+1)=\Omega V_{qh}(t)+\gamma\Delta V_{qh}(t) \tag{18}\]  
where \(V_{qh}(t+1)\) is the weight connecting hidden neuro \(h\) and output neuro \(q\) for (t + 1)-\(th\) epoch, \(\Omega\) is the momentum, \(\gamma\) denotes the learning rate.  
Then, the learning algorithm between the input layer and the hidden layer can be illustrated as Equations (19) and (20).  
\[\begin{array}{l}\Delta U_{hp}(t)=-\left(\frac{\partial E}{\partial U_{hp}(t) }\right)=-\left(\frac{\partial E}{\partial HNI_{h}}\right)\left(\frac{\partial HNI _{h}}{\partial NET_{h}}\right)\left(\frac{\partial NET_{h}}{\partial U_{hp}(t )}\right)\\ =\left.\sum_{q=1}^{n}\left(A_{q}-Y_{q}\right)f\left(HNO_{q}\right)V_{qh}(t) \right)f\left(NET_{h}\right)I_{p}\end{array} \tag{19}\]\[U_{hp}(t+1)=\Omega U_{hp}(t)+\gamma\Delta U_{hp}(t) \tag{20}\]  
where \(U_{hp}(t+1)\) is the weight between input neuro \(p\) and hidden neuro \(h\) for (t+1)-_th_ epoch.