# Modeling of Water Losses in Hydraulic Tunnels under Pressure Based on Stepwise Regression Method
## 3 Methodology for Modeling of Total Water Losses in Hydraulic Tunnels
### Data Preprocessing and Feature Engineering  
The collected dataset consisted of various data related to HT water losses, including measurements of water losses in the tunnel, temperature of concrete, temperature of water and rock, opening and closing of cracks, groundwater levels, etc. Regression models are very sensitive to the occurrence of outliers and missing values in the data. Therefore, the processes of outlier detection and handling, and possible missing data imputation are of crucial importance. This is considered in the first part of the methodology (Figure 1, block 1). The second part of the methodology relates to feature engineering (Figure 1, block 2). Feature engineering is the act of extracting features from raw data and transforming them into formats that are suitable for predictive modeling [25]. Feature engineering encompasses several stages in our methodology. Building adequate predictive models involves proper selection of predictors and dependent variables and determining valid value intervals for these variables (2.1). Correlation analysis (2.2) is of great importance in this process, because it provides a basis for proper selection of input and output variables, and their potential regressors [19]. Modeling HT water losses involves choosing regressors from a large pool of possible candidate predictors, of which only a few are likely to be important. In our methodology, the dimensionality reduction paradigm is realized through PCA (2.3). The key idea here, as explained in Section 2.1, is to replace redundant features with a few new features that adequately summarize the information contained in the original feature  
Figure 1: Developed methodology for modeling of total water losses in hydraulic tunnels: (**a**) Schematic overview; and (**b**) stepwise regression modeling method. space. In our methodology, PCA consists of three main steps, which are briefly described in the following three paragraphs. In the first step, data suitability for PCA is assessed in terms of sampling adequacy and strength of the relationship among the variables. Sampling adequacy is assessed based on sample size and Kaiser-Meyer-Olkin (KMO) test of sampling adequacy [26]. The strength of the relationship among the variables is assessed based on examining the correlation matrix and Bartlett's test of sphericity [27]. In the second step, the number of principal components to be extracted is selected. Deciding on the number of principal components is a considerable challenge in using PCA. In our methodology, three well-known methods are available to assist in this decision: [PERSON]'s criterion [26], [PERSON]'s scree test [28], and [PERSON]'s parallel analysis [29]. In the third step, the principal components are subjected to rotation to gain a better understanding and interpretation of the data. Here, rotation refers to the post-processing of PCA results to obtain a so-called'simple structure' [30], where the division of variables into separate components is more easily interpretable. Two general types of rotation are available: orthogonal, where the new principal axes are also orthogonal to each other, and oblique where the new principal axes are not required to be orthogonal. Our methodology suggests the application of the most frequently used rotation methods: the Varimax method, and the direct Oblimin method, as the most commonly used orthogonal and oblique rotation methods, respectively. A comparison of these rotation methods is given in [18]. Regression models are very sensitive to multicollinearity and singularity, so methodology stages 2.2 and 2.3 are necessary to avoid the pitfalls of model overfitting. Based on previous stages the final pool of candidate regressors is defined in stage 2.4. Candidate regressors are derived by various mathematical transformations of physical quantities that describe the processes related to HT.