## 3 ARIMA-ML Framework
### Model Parameter Determination Module  
Based on the physical interpretations introduced in Section 2 and reference [23], an instrumented shear-type \(n\)-DOF framed structural system can be modeled by fitting ARMA\((2n,2n)\) or ARIMA\((2n,I,2n)\) models to the collected data assuming stationary conditions and considering measurement noise. However, in practice, many other sources of noise, in addition to the measurement errors, may influence the accuracy of the model fitting, e.g., installation errors and model idealization errors. Thus, the values of \(p\) and \(q\) can be determined in a statistical manner, i.e., considered as being close to \(2n\) but varied based on the observations of autocorrelation function (ACF) and partial autocorrelation function (PACF) making use of the TS properties. [PERSON] & Stoffer [16] stated the following about the ACF and PACF for the model selection:  
* A TS suitable for the AR\((p)\) model is observed after a time lag \(p\) as ACF tails off (ACF values gradually decrease with the lag increase) and PACF cuts off (most of the PACF values are within a certain range, e.g., bounds of the PACF confidence intervals, with the lag increase). * A TS suitable for the MA\((q)\) model is observed as ACF cuts off and PACF tails off after lag \(q\). * A TS suitable for the ARMA\((p,q)\) model is observed as both ACF and PACF tails off after lags \(p\) and \(q\). Therefore, a group of \((p,q)\) pairs can be determined based on the above observations, where values of \(p\) and \(q\) are close to \(2n\), or \(q=0\) if only applying the AR/ARI model. To further narrow the selection of \((p,q)\) pairs, _Bayesian information criterion_ (BIC) sub-model analysis is conducted. The BIC values, from Equation (18), are computed for sub-models of ARMA\((p_{max},q_{max})\) with partial orders, which use the combinations of the orders from \(1\) to the highest orders \(p_{max}\) and \(q_{max}\) in the \((p,q)\) pairs. The results demonstrate the contribution from each order, and then a small group of candidate models are selected. Subsequently, _Akaike information criterion_ (AIC) analysis is performed, where average AIC values, Equation (19), are computed for each candidate model with all segments. These average AIC values evaluate the overall fitting performance of each candidate model. \[BIC=k\ln{(n)}-2\ln{(\widehat{L})}, \tag{18}\]  
\[AIC=2k-2\ln{(\widehat{L})}, \tag{19}\]  
where \(n\) is the number of samples, \(k\) is the number of coefficients in the model, and \(\widehat{L}\) is the maximum value of the likelihood function for the model, referring to [16]. In BIC and AIC analyses, the lower (algebraically) the value, the better the fit. Models using different \((p,q)\) pairs are diagnosed by the residuals to avoid violating the assumptions of the AR series models. The residuals, computed from differences between ground truth and fitted data, should share similar properties to white noise, i.e., _independent and identical distribution_ (i.i.d. ), a zero mean, and a limited value of the standardized (STD) residuals (e.g., less than 2 as suggested in [28]). Statistical methods to examine the residuals include standardization plots, quantile-quantile (QQ) plots for normality, and ACF plots for autocorrelation. However, for processing a large amount of data, manually checking each TS segment with these plots is inefficient, especially if there are many TS data to analyze as in the case of a large instrumented structural system, e.g., a continuously monitored long span bridge with many sensors. Therefore, _Ljung-Box statistics_[29] is applied herein to automatically diagnose the residuals based on the hypothesis testing [30]. Once the null hypothesis is accepted with \(p\)-value exceeding the threshold of 0.05, the residuals check is satisfied. This module is summarized as follows:  
1. Select multiple \((p,q)\) pairs based on physical interpretations and TS properties, e.g., the initial value of \(p\) is considered close to \(2n\). 2.