## 2 Predictive Modeling Techniques
### Bayesian Belief Network (BBN)
\[CH=\sum\limits_{i=1}^{n}\sum\limits_{j=1}^{q_{i}}\left[log\frac{\Gamma\big{(} \alpha_{ij}\centerdot\centerdot\centerdot\big{)}}{\Gamma\big{(}\alpha_{ij} \centerdot\centerdot\big{)}+\ m_{ij\centerdot\centerdot\centerdot\centerdot \centerdot\big{)}}}+\sum\limits_{k=1}^{r_{i}}log\frac{\Gamma\big{(}\alpha_{ijk}+ \ m_{ijk}\big{)}}{\Gamma\big{(}\alpha_{ijk}\big{)}}\right] \tag{3}\]  
where \(m_{ijk}\) is the number of samples, which are subject to \(X_{i}=k,\pi(X_{i})=j\), \(m_{ij\centerdot\centerdot\centerdot\centerdot\centerdot\centerdot\centerdot \centerdot\centerdot\centerdot\centerdot\centerdot\centerdot\centerdot \center\dot\centerdot\center\dot\centerdot\centerdot\center\dot \center\dot\centerdot\center\dot\centerdot\center\dot\centerdot\center \dot\center\dot\centerdot\center\dot\centerdot\center\dot\center \dot\center\dot\center\dot\center\dot\center\dotdot\center\dotdot\center \dot\center\dotdot\center\dot\center\dot\center\dot\center\dotdot \center\dot\center\dot\dotdot\center\dot\center\dot\dotdot\center \dot\center\dot\dotdot\center\dot\center\dot\dotdot\center\dotdot\), and \(\alpha_{ijk}=P(X_{i}=k\big{|}\pi(X_{i})=j)\). (2) Add an arc \(\big{(}X_{i}\to X_{j}\big{)}\), when \(X_{i}\) (\(i\
eq j\)) makes \(CH\big{(}X_{j},\pi_{j}\cup\ X_{i}\big{)}\) the maximum. \(\pi_{j}\) are the parents of \(X_{j}\). The pseudocode of the K2 algorithm [32] in this study using variables set \(X=\{X_{1}\), \(X_{2}\),..., \(X_{n}\}\) denotes the nodes of variables, such as depth of soil deposit, groundwater table, fines content, earthquake magnitude, thickness of soil layer, soil behavior type index, equivalent clean sand penetration resistance, liquefaction potential, etc., as shown in Table 1. To acquire an optimal network structure, DK is included in the K2 machine learning algorithm. The proposed BBN structure for liquefaction potential assessment is developed by the K2 machine learning algorithm. It is further fine-tuned based on the domain knowledge (DK) of field experts and known relationships between different input factors. Once the topological structure of the BBN is obtained, parameter learning is performed to identify the conditional probability distribution of each variable node under a given BBN. Three basic kinds of algorithms are thus used: maximum likelihood estimation (MLE), gradient descent (GD), and expectation maximization (EM). The MLE is the fastest and simplest algorithm, based entirely on data and independent of prior probabilities; thus, it does not apply to models containing latent variables and datasets with several missing values [33]. EM and GD algorithms work in an iterative process, but \begin{table}
\begin{tabular}{l} \hline \hline Input \(D\): _A complete dataset_; \(X=\{X_{1},X_{2},\ldots,X_{n}\}\). \(\rho\): The order of nodes (Assume it is consistent with variables’ subscripts). \(\mu\): _The maximum number of parents_. Output _Bayesian belief network structure_ \\ \hline Steps \\
1: \(\xi\leftarrow\)_acyclic graph composed by \(X\)_ \\
2: **for**\(j=1\) **to** \(n\) \\
3: \(\pi_{j}\leftarrow\varnothing\) \\
4: \(V_{old}\leftarrow\)_CH_\(\big{(}X_{j},\pi_{j}|D\big{)}\) \\
5: **while(true)** \\
6: \(i\gets argmax1\leq i\leq j\), \(X_{i}\
otin\pi_{j}\) CH\(\big{(}\big{(}X_{j},\pi_{j}\cup\ \{X_{i}\}\big{)}|D\big{)}\) \\
7: \(V_{new}\gets CH\Big{(}\big{(}X_{j},\pi_{j}\cup\ \{X_{i}\}\big{)} \Big{|}D\big{)}\) \\
8: **if**\((V_{new}>V_{old}\) **and**\(\big{|}\pi_{j}\big{|}<\mu\big{)}\) \\
9: \(V_{old}\gets V_{new}\) \\
10: \(\pi_{j}\leftarrow\pi_{j}\cup\ \{X_{i}\}\) \\
11: _add an arc\(X_{i}\to X_{j}\) into \(\xi\)_ \\
12: **else** \\
13: **break** \\
14: **end if** \\
15: **end while** \\
16: **end for** \\
17: **return**\(\xi\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: K2 algorithm pseudocode. EM is suitable for data that contains missing values. In short, EM learning frequently takes a BBN, uses it to perform a desired (E) step, and then proceeds to maximize (M) to find a better network [34].