# Fire Risk Assessment Models Using Statistical Machine Learning and Optimized Risk Indexing
## 3 Fire Risk Assessment Models Using Statistical Machine Learning and Optimized Risk Indexing
### Statistical Machine Learning for Fire Occurrence Prediction  
Since the response variable contains frequency data, we use count data analysis methods among statistical machine learning models [15]. In the discrete probability distributions, Poisson and binomial distributions can be applied to analyze the fire occurrence data. In the proposed study, we focused on building a model for the possibility of fire, so we built a predictive model based on the binomial distribution. A random variable Y is distributed to a binomial distribution with n and p when Y is represented as follows [16].  
\[\mathrm{P(Y=y)=}\left(\begin{array}{c}n\\ y\end{array}\right)p^{y}(1-p)^{n-y}\;\;y=0,\;1,\;\ldots,\;n \tag{1}\]  
where n is the number of Bernoulli trials, and p is the probability of success. The expectation (E(Y)) and variance (Var(Y)) of Y are np and np(1-p) respectively. Each y has a binary data value (1: occurred fire or 0: no occurred fire) representing whether a fire has occurred. So, we build a logistic regression model based on binary response variable (Y) to forecast fire risk. The logistic regression model is defined as the following model [17]:  
\[\log\left(\frac{p}{1-p}\right)=\beta_{0}+\beta_{1}x_{1}+\beta_{2}x_{2}+\cdots+ \beta_{k}x_{k}+\varepsilon \tag{2}\]  
where p is P(Y = 1), which is the probability of occurred fire, and \(\log\left(\frac{p}{1-p}\right)\) is logit function of p. \((x_{1},\;x_{2},\;\ldots,\;x_{k})\) are the explanatory variables that affect Y. In addition, error term \(\varepsilon\) is followed to normal distribution with mean=0 and variance = \(\sigma^{2}\). From the logistic model of equation (2), we get the following model for predicting the probability of occurred fire (p):  
\[\mathrm{p}=\frac{1}{1+\exp(-(b_{0}+b_{1}x_{1}+b_{2}x_{2}+\cdots+b_{k}x_{k}))} \tag{3}\]  
where \(b_{i}\) represents the estimate for regression parameter \(\beta_{i}\) under minimizing \(\varepsilon\). We consider another method of statistical machine learning.  
We apply deep neural networks (DNN) to fire risk assessment. \((y,\;x_{1},\;x_{2},\;\ldots,\;x_{k})\) is the data set for DNN [18]. Like the logistic regression model, y is a response variable representing fire occurrence or not. Also, \((x_{1},\;x_{2},\;\ldots,\;x_{k})\) are explanatory variables affecting Y. Our DNN consists of input, hidden and output layers. Input and hidden layers are related to X and Y respectively. We design the size and structure of hidden layers to improve model performance. Figure 1 shows the proposed DNN model for fire risk prediction.  
In Figure 1, \(w\) is connecting weight vector from input to hidden layers, and \(w^{T}x\) is linear combination \(x\) with \(w\). Also, we call \(w^{T}x\) combination function. \(\theta^{T}h\) is also a linear combination \(h\) with \(\theta\), where \(\theta\) is a vector of connecting weights from hidden to output layer. \(f(\cdot)\) is a function to transform \(\theta^{T}h\) into the values between 0 to 1. This function is called as activation function, and we use logistic growth function as follows [9; 12]:  
\[\text{f}\left(\theta^{T}h\right)=\frac{1}{1+e^{\theta^{T}h}} \tag{4}\]  
We train the DNN model based on perceptron cost function that minimizes the difference between predicted value \(\hat{y}\) and real value \(y\).