## 2 Eruption Forecasting Algorithm
### Logistic Regression  
Logistic regression is a statistical modeling method used to analyze multivariate problems [55; 56; 57]. It attempts to describe the complex relationship between a set of independent explanatory variables and a response variable. This popular modeling approach is used extensively in medical research, bioinformatics, and marketing analysis [58]. It has also found use in geophysical applications, such as the prediction of landslides and rain rate [59; 60].  
The logistic function, \(f(z)\), is given by  
\[f(z)=\frac{1}{1+e^{-z}} \tag{11}\]  
where \(z\) is a value computed from a logistic model. The range of \(f(z)\) is bound between 0 and 1 over \(\pm\infty\). Unlike other modeling techniques, a probability between 0 and 1 is guaranteed with logistic regression regardless of the value of \(z\). The logistic model is the weighted summation of a set of explanatory variables, which is defined as  
\[z=\beta_{0}+\sum_{m=1}^{N}\beta_{m}X_{m} \tag{12}\]  
where \(\beta_{0}\) is a constant (intercept), \(\beta_{m}\) are the weighting (regression) coefficients, and \(X_{m}\) are the explanatory variables. Values of \(\beta_{0}\) and \(\beta_{m}\) are determined through maximum likelihood estimation via a GLMR. This requires a training dataset consisting of a collection of observations that relate the outcome of a particular event to the explanatory variables.  
Using this technique, we derived a suite of logistic models to compute the prior probability for the \(n^{th}\) event tree node. These models are defined as the conditional probability  
\[P(n)=P(\theta_{n}=1|X_{n,1}...X_{n,N})=\frac{1}{1+e^{-z_{n}}} \tag{13}\]  
where \(\theta_{n}\) is the outcome (_i.e._, 1 or 0) of the event represented by the \(n^{th}\) node and \(z_{n}\) is its respective logistic model. Weighting coefficients for each logistic model are described in Section 2.4.  
The goodness-of-fit (\(G\)) of a logistic model is often assessed using a likelihood ratio test [56]. The test statistic is derived from the difference between the deviance, \(-2 ln(L_{n})\), of the null and full models, where the null model is simply a constant with no associated explanatory variables. The deviance is similar to the residual sums of squares metric from ordinary least squares regression in the sense that it attempts to estimate the discrepancy between the modeled and observed data. Thus, the quality of the regression model decreases with increasing deviance. Here \(G\) is estimated via the ratio  
\[G=\chi^{2}=-2 ln\left(\frac{L_{null}}{L_{full}}\right) \tag{14}\]  
where \(L_{null}\) and \(L_{full}\) are the likelihoods of the null and full models. The test statistic is \(\chi^{2}\) distributed, where its degrees of freedom, \(df\), are equivalent to the number of constrained predictors (explanatory variables) in the logistic model. Statistical significance of the difference is estimated using a hypothesis test which compares the p-value of the test statistic to a predefined significance level (0.05), where the null hypothesis states the null model fits the data better than the full model. If there is strong evidence against the null hypothesis (e.g., \(p<0.05\)), then it can be rejected in favor of the full model.