Comparison of Machine Learning Techniques for Condition Assessment of Sewer Network

Assessment of sewer condition is one of the critical steps in asset management and support investment decisions; therefore, condition assessment models with high accuracy are important that can help utility managers and other authorities correctly assess the current condition of the sewage network and effectively initiate maintenance and rehabilitation strategies. The main objective of this research is to assess the potential application of machine learning (ML) algorithms for predicting the condition of sewer pipes with a case study in Ålesund city, Norway. Nine physical factors (i.e., age, diameter, depth, slope, length, pipe type, material, pipe form, and connection type) and ten environmental factors (i.e., rainfall, geology, landslide area, building area, population, land cover, groundwater, traffic volume, distance to road, and soil type) were used to assess the sewer conditions employing seventeen ML models. After processing the sewer inspections, 1159 of 1449 individual pipelines were used to train the sewer condition model. The performance of ML models was validated using the 290 remaining inspected sewer pipes. The area under the Receiver Operating Characteristic (AUC-ROC) curve and accuracy (ACC) showed that the Random Forest (AUC-ROC = 77.6% and ACC = 78.3%) is a sensitive model for predicting the condition of sewer pipes in the study area. Based on the Random Forest model, maps of predicted conditions of sewers were generated that may be useful for utilities and water managers to establish future sewer system maintenance strategies.


I. INTRODUCTION
The collection, transport, treatment, and discharge of stormwater, and wastewater are the main roles of sewage networks in urban areas [1]. Stormwater and wastewater collection systems play a critical role in minimizing the negative effects of floods during heavy rainfall events and protecting the environment from contamination [2]. However, due to intrinsic and extrinsic factors, sewer networks are subjected to deterioration, breakages, and collapse during their lifespan with dire consequences for infrastructure, the environment, and public health [3].
The associate editor coordinating the review of this manuscript and approving it for publication was Wei Liu. Studies have shown an increasing rate of breakages and collapse of sewer networks as a corollary of limited rehabilitation investments, climate change, and rapid urbanization [2]. By 2040, investment needs for water infrastructure in Norway have been previously estimated at e28 billion [4], and this amount was recently raised to e32 billion [5]. Consequently, maintenance strategies are being implemented to increase the life cycle of the sewer network and reduce the expenditure on replacement and rehabilitation [6]. To achieve this, condition models for the prediction of sewer conditions can be valuable tools to support the maintenance, rehabilitation and to investment decision strategies for the sewer network [7].
For condition modeling of sewer pipes, a determination of contributing factors of sewer conditions is important.
According to a review, factors influencing sewer conditions can be categorized into: physical (e.g., age, diameter, and length), environmental (e.g., rainfall, soil type, and groundwater), and operational factors (e.g., sediment level, flow rate, and infiltration) [8]. Besides, the roles of the aforementioned factors on the model prediction reliability are not equal; therefore, assessing the significance of the contributing factors is a pivotal task that may enhance the predictive ability of the models [9].
Geographic Information System (GIS) can play an important role in data management, modeling, and visualization in condition assessment. GIS can be applied to store, manage, calculate, visualize, and analyze spatial and non-spatial information and data on the contributing factors of sewer conditions in different layers [10]. Based on the GIS database, prediction models of the future condition of sewer pipes can be autonomously constructed and updated.
Condition models can be classified into physical, statistical, and machine learning [11], [12], [13], [14]. In the physical models, parameters related to conditions of the sewer pipes (e.g., material, diameter, type of effluent, etc.,) are employed to fit mathematical equations to the sewer's status [15]. Therefore, these models are effective for sewer network analysis during the construction period and initial operational phases. However, the scarcity of data needed for the simulation of deterioration mechanisms is one of the limitations of these models [13].
Sewer deterioration is a complex process affected by many factors, therefore statistical models are likely to have more advantages compared to the physical models in terms of calculating speed and straightforward function form when the monitoring time-series data is long enough [16]. Successful applications of statistical models in sewer deterioration assessment have been reported in the literature [17], [18], [19], [20]. These models are based on some assumptions that need to be satisfied to achieve highly accurate performance [13]. However, these assumptions are generally difficult to achieve with the deterioration process. For example, the distance between consecutive conditions is constant or the sewer status in each condition should be a normal distribution [8]. According to Zamanian, et al. [21], sewer deterioration is a non-linear process, and it is difficult for statistical models to predict this process with high accuracy.
Machine learning (ML) models can capture the linear and non-linear relationships between input factors and sewer condition state, even if these relationships are unclear or when data is incomplete [22]. Additionally, these models can effectively deal with different types of inputs and outputs, including numeric, nominal, or categorical [23]; therefore, they are applied in various studies involving sewer condition prediction [14], [24]. However, the accuracy of deterioration prediction models using ML algorithms needs to be improved by increasing the number of input factors and inspections or using an adequately distributed dataset [6].
Although different ML algorithms are used to model the condition of sewer pipes, their accuracies are dissimilar due to different characteristics in the study area, data quality, variation, and randomness between studies and used algorithms [25]. As a result, no ML model is the best for modeling sewer conditions in all areas. Besides, a comprehensive comparison between different types of ML models for modeling the condition of sewer pipelines is still missing. This study is an attempt to partially fill this gap in the literature by exploring and verifying the potential application of ML algorithms for sewer condition assessment. The significance of input factors was briefly analyzed to provide helpful information for water engineers/managers in prioritizing significant factors of the sewer condition in maintenance strategies in Ålesund city, Norway.

II. THE STUDY AREA AND GIS DATABASE A. DESCRIPTION OF THE STUDY AREA
The sewer network of Ålesund, a coastal city located in the west of Norway, was used in this study. The city has an area of approximately 607.3 km 2 and lies between latitudes of 6 • 05'08'' N and 6 • 40'56'' N, and between longitudes of 62 • 25'07'' E and 62 • 30'37'' E (FIGURE 1).
Ålesund city is in an area heavily influenced by ocean currents with cold, rainy winters and cool summers. The variation in temperatures throughout the year is 13.6 • C with average temperatures of the coldest month (February) and the warmest month (August) being −0.6 • C and 13.0 • C, respectively [26]. The city is also located in a high rainfall density region with an average rainfall of 2100 mm per year. The average rainfall in the driest month (May) and the wettest month (December) are 104 mm and 230 mm, respectively. Along with the general trend of climate change, the weather in the city is affected by unavoidable fluctuations in temperature, precipitation, and extreme weather events that put pressure on the sewer network system [27], [28].

B. GENERAL DESCRIPTION OF DATA USED
Based on the literature [29] and data availability, a total of ten physical factors (i.e., age, diameter, depth, slope, length, pipe type, material, network type, pipe form, and connection type) and ten environmental factors (i.e., rainfall, geology, landslide area, building area, population, land cover, groundwater, traffic volume, distance to road, and soil type) were considered in this study. It should be stated that operational factors including, but not limited to, flow rate, blockages, infiltration, or inflows were not considered because of data unavailability at the time of this study.

1) PHYSICAL FACTORS
Physical factors of sewer pipe networks are elements that relate to the pipeline's physical characteristics and components. These factors are considered indispensable for pipe deterioration rate or remaining useful life [30]. Data on the physical characteristics of pipes are generally recorded,  , and managed by water utilities and/or relevant agencies. In this study, the physical factors were provided in the tabular datasets by the Department of Water and Sewage of Ålesund in 2021. Eight physical factors (i.e., age, diameter, length, pipe type, material, network type, pipe form, and connection type) are available in the dataset, the remaining factors (i.e., depth and slope) are obtained from Digital Elevation Model (DEM) with pixels of 5 m × 5 m using a GIS tool. An overview of the physical factors used in this study is shown in FIGURE 2. The number on top of the bar chart represents the number of sewer pipes corresponding to pipe type.
The age of sewer pipes was considered one of the most significant factors affecting the sewer condition process [8]. This factor immediately affects the pipe deterioration after the sewer is installed, and the aging speed is quicker during the operation [31]. In this study, the age of the sewer pipes was calculated as the difference between the installation year and the inspection year. The oldest sewer pipelines were installed in the 1900s and the newest pipes were replaced/set up in 2020 (FIGURE 2a).
The influence of material on the sewer condition process of sewer pipes is well established in previous studies [3], [6], [32]. For example, although concrete pipes are significantly resistant to abrasion, they are vulnerable to the corrosive action of hydrogen sulfide [33]. The materials of the sewer pipes are shown in FIGURE 2b.
Pipe diameters affect the deterioration process. For instance, larger pipes are less affected by deterioration compared to smaller ones [17]. Detailed information on sewer pipes according to their diameter is shown in FIGURE 2c. Pipes in shallow depths are more vulnerable than the deeper ones because of stresses from surface load, road traffic, illegal connection, tree root intrusion, or road maintenance/ construction activities [34]. The depths of the sewer pipes were unavailable in the database and were therefore computed as the distance from the ground surface to the mid-point of the pipes (FIGURE 2d). The height of the ground surface was interpolated from the DEM.
The sewer pipe slope directly relates to water flow that mainly causes corrosion, sediment deposition, and clogging in the sewer pipes. For example, flat concrete pipes are more vulnerable due to hydrogen sulfide gas emissions because wastewater in these pipes cannot drain speedily [32]. The information on pipe slope was not available in the dataset and was computed as the difference between the inverted elevation of the start and end manholes using the GIS tool (FIGURE 2e). The start and end manholes were classified based on the flow direction of each pipe. When water flows from the start point to the endpoint, the slope value is positive when the start point is higher than the endpoint and vice versa.
The sewer network in the study area consists of three different types: wastewater, stormwater, and combined pipes. The effect of pipe type on pipe condition has been established in previous studies. For instance, combined sewers are more likely to be deteriorated than sanitary pipes due to high potential infiltration and exfiltration during rainfall events [35]. Pipe length was shown as one of the factors affecting sewer conditions where pipes with long lengths had a higher probability of failure than shorter ones, and the failures often occurred at the connection positions [36]. Therefore, connection type was considered a factor for constructing the sewer condition model in this study. Some types of sewer connections are shown in FIGURE 2f. The sewer network with different forms and types can deteriorate differently. For example, clay pipes with circular shapes were easily prone to fractures [32]. Therefore, different pipe forms (FIGURE 2g)  and network types (FIGURE 2h) were considered in this study.
The sewer network in the study area contains about 31293 wastewater, stormwater, and combined pipelines with a total length of 703.0 km. After combining with the inspected data, a total of 1449 individual pipelines were used to model the sewer condition status. A summary of statistical indexes of physical variables is represented in TABLE 1.

2) ENVIRONMENTAL FACTORS
Environmental factors used in this study are mainly extrinsic elements that relate to the relative geo-location of the sewers. The data have been collected from many sources with different formats and spatial resolutions (TABLE 2). It is worth noting that TABLE 2 shows the original spatial resolution of the environmental factors, and these data were processed to transfer them into the same coordinate system, format, and spatial resolution. In this study, post-processed data were re-sampled to the same spatial resolution (5 m × 5 m) and transformed into a grid spatial database before running ML models.
Rainfall results in rising groundwater which leads sewer pipes to deteriorate more quickly [35]. In this study, rainfall VOLUME 10, 2022  data were obtained from annual average rainfall over several years at nine weather stations near the study area. Detailed information about these stations is shown in TABLE 3. A rainfall map was generated using data at the aforementioned stations, and the Inverse Distance Weighting (IDW) method, which is the most common spatial interpolation method [37], was used to interpolate rainfall values in the study area (FIGURE 3a).
The geological characteristics around a sewer pipe can affect its condition processes. For instance, it has been shown that changes in geological structures affect infiltration and groundwater in coastal urban areas, resulting in sewer deterioration [38]. Additionally, hydraulic conductivity in different geological types can affect sewer deterioration differently [39]. FIGURE 3b shows the geological map used as input in sewer condition assessment.
Landslide has been implicated in sewer network because of failures caused by road subsidence [40]. Similarly, sewer pipes under building areas are more vulnerable to deterioration than those found in non-built areas [8]. In this study, landslide and building areas were considered as input factors for constructing sewer condition models (FIGURE 3c).
Population density is considered a critical factor for sewer deterioration. For example, a large population may lead to a huge volume of wastewater discharge into the wastewater collection network, resulting in the deterioration of the system [21]. In this study, a population map was prepared based on the statistical data received from the Norwegian Mapping Authority (FIGURE 3d). Land cover affects soil infiltration rate, evapotranspiration, or surface runoff and has been considered a variable in water quality change that has a strong correlation with the current condition of sewer pipes [41]. In this study, five classes of land cover, which were obtained from the Sentinel-2 images level 1C by using the object-based classification [42], were used (FIGURE 3e).
Groundwater is considered an essential factor that influences sewer pipes [38], because groundwater at or above sewer pipes leads to water infiltration into the pipe, facilitating the deterioration processes. In addition, the availability of groundwater around the sewer pipe can destabilize the soil around the sewers leading to failures or collapses. In this study, a groundwater map was prepared using the IDW method and 31 drills data around the study area (FIGURE 3f).
Road traffic has been shown to have an impact on the deterioration process of sewers. Studies have shown that the condition of sewers located under roads as well as those in close proximity to roads are significantly affected [36]. In this study, traffic volume was calculated from the statistical data provided by the Norwegian Public Roads Administration (FIGURE 3g). There is no universal guideline for selecting the distance to road in modeling the sewer deterioration process. For instance, while Ahmadi, et al. [43] only considered pipes located under roads, the ratio of pipe length along the road was counted in the study by Yin, et al. [6]. Remarkably, Laakso, et al. [9] emphasized the pipes close to the tree (about 5 m) had a higher deteriorated degree compared to further ones, and the pipes far from roads will suffer from less influence compared to near ones. By using a similar approach for road distance, we consider a 5m-range road distance for the first road class; therefore, larger distances can be accepted for classifying further pipes into different road classes. In this study, five ordinal road classes were used based on the road's buffers of 0-5 m, 5-10 m, 10-20 m, 20-50 m, and >50 m (FIGURE 3h).
Soil type is one of the significant factors in the deterioration models because it affects runoff generation and groundwater and the influence of soil on sewers with larger sizes or buried deeper is more significant than the others [44]. In this study, 14 soil classes were used to construct the sewer condition models (FIGURE 3i).

III. BACKGROUND TO MACHINE LEARNING ALGORITHMS USED
Many ML algorithms have been proposed and applied not only in the water sector but also in other fields [7], [8], [9], [23], [45]. In this study, the following classification-based ML methods were selected based on their popular applications in classification problems.

A. CLASSIFICATION AND REGRESSION TREE
Classification And Regression Tree (CART) was first proposed by Breiman, et al. [46] to solve regression and classification problems based on tree-based structures. In this method, the sewer dataset (also called the root node) was divided into binary values (good or bad condition) at each node using a series of recursive binary splits based on evaluating every possible predictor [47]. Finally, the predicted sewer's status was defined based on the most commonly occurring class of the node. The CART was selected in this study because this algorithm provided the largest information on the sewer status at each decision node using the input sewer factors [48]. This algorithm was used as a base classifier while constructing the ensemble techniques (e.g., AdaBoost or Gradient Tree Boosting).

B. RANDOM FOREST
Random Forest (RF) was developed by Breiman [49] to significantly improve classification accuracy by creating an ensemble of trees and letting them vote for the most popular class. In the RF model, the sewer input dataset was randomly split into classification trees, and the model was trained through bagging or bootstrap aggregating. The final sewer's condition status was obtained by aggregating the prediction from each tree. The RF model was applied for this study using the bootstrap technique to control the sub-sample size and get the average prediction from sub-decision trees to improve the predictive accuracy and control over-fitting.

C. ADABOOST CLASSIFICATION
AdaBoost method, which was introduced by Freund and Schapire [50], uses an adaptive re-sampling technique for controlling bias and variance to improve predictive performance. The AdaBoost randomly selects subsets from the sewer dataset; these subsets were assigned equal weights to implement a classifier for each iteration. The misclassified cases in the previous iteration will be reassigned with higher weights while the weights are kept for the correctly classified cases. A new normalized training subset is created, and a new iteration process continues. The iterative process is terminated if specific stopping criteria are satisfied, and the final sewer's status is the product of the weighted sum of all ensemble predictions.

D. GRADIENT TREE BOOSTING
Gradient boosting introduced by Friedman [51] sequentially fits a parameterized function (base learner) to pseudo residuals by least squares at each iteration using additive models. In Gradient Tree Boosting (GTB), a decision tree was used as a base learner. In the GTB model, a subset of the sewer dataset is randomly generated (without replacement) for each iteration. After that, this subsample is used in place for the full sample to fit the base classifier and update the model at the current iteration. The final sewer's condition status is obtained by minimizing the loss of function.

E. HISTOGRAM-BASED GRADIENT BOOSTING
Histogram-based Gradient Boosting (HGB) introduced by Guryanov [52] is a modification of the GTB and can increase the learning process and the model's prediction performance. This method divides the sewer training dataset into bins and constructs a histogram of feature values during the training phase. After every split decision tree, values of accumulated predictions of the sewer status are updated based on the deducted linear coefficient of split nodes. The iteration process is stopped when the stopping condition (e.g., the limit of tree depth or the number of leaves in the tree) is reached. Then, the sewer's condition status is defined using the best split points based on the feature histograms [53].

F. EXTREMELY RANDOMIZED TREES
Extremely Randomized Trees (ERT) is proposed by Geurts, et al. [54]; this algorithm splits nodes by making a small number of randomly chosen splits-points from the sewer dataset for each of the selected sewer condition status without re-sampling the dataset when building a tree. By using this approach, decision trees generated are entirely randomized whose structures are independent of the sewer's status. The sewer's status predicted by the single tree is aggregated to yield the final sewer's condition.

G. GAUSSIAN PROCESS
Gaussian Process (GP) model was introduced by Rasmussen [55] for classification and regression problems that generalize the Gaussian probability distribution. In the case of sewer condition status prediction, the sewer condition was transferred into {−1, +1}, a latent function f was used to predict the class membership probability for a new test pipe. The value of the function f was then mapped into the [0, 1] interval using the probit function [56], where values of 0 and 1 denote the good and bad conditions of sewer pipes, respectively. Williams and Barber [57] introduced to use of Laplace's method for Gaussian approximation to the posterior over the latent function values. In this study, a Laplace method was applied to find a Gaussian approximation to the posterior because of its simplicity, scalability, and accuracy [58]. The predictive distribution of the sewer's status can be calculated by getting the weights of all possible predictions by their calculated posterior distribution [59]: . ,x n ] T and y = [y 1 , . . . ,y n ] T are vectors containing factors and sewer condition status, respectively; n is the number of sewer inspections; y * and x * are predicted sewer condition status and vector-containing factors of one sewer pipe, respectively; f * and (.) are variables corresponding to the test point x * and the probit function, respectively.

H. GAUSSIAN NAIVE BAYES
The Gaussian Naive Bayes (GNB) classifies sewer status (good or bad condition) based on an assumption of having a Gaussian distribution on input factors using the Naive Bayes method [60]. The sewer status can be predicted using the Gaussian probability density function by substituting the parameters with the new input values [61]: where σ y and µ y are the variance and mean of the feature i th , respectively; class y contains sewer condition status (good or bad condition).

I. BERNOULLI NAIVE BAYES
The Bernoulli Naive Bayes (BNB) classifies sewer status based on the Bayes theorem using sewer input data that are distributed according to multivariate Bernoulli distributions. The sewer status predicted by BNB is made based on the rule as follows [48]: where P (x i |y) is the likelihood of the features, x i is the vector of the input factor the feature i th , and y is sewer class (good or bad condition).

J. K-NEAREST NEIGHBORS
K-nearest neighbor (KNN) rule was first introduced by Cover and Hart [62] for classification problems. In the KNN model, the weight function is used to assess the degree of contribution of the nearer neighbors to the fit; the nearest neighbors are computed using search algorithms, the number of nearest neighbors is found using the grid-search method, and the distance metric is used to calculate the distance of one test observation from all the observations of the training dataset and find the nearest neighbors. For sewer condition prediction, the distance from the sewer pipe x i in the test dataset of each sample in the training dataset is computed. The top K points, which have the closest distance to x i , are stored, and the status probability of sewer x i is computed as follows [7]: where I y j = D equals 1 if the instance y j is in class D, otherwise, it equals 0, A is the dataset that contains K points, and D is the sewer status class (good or bad condition).

K. LOGISTIC REGRESSION
The logistic Regression (LR) model predicts the probability of the sewer condition status based on their relationship with input factors. The assumption of a linear relationship between factors and sewer condition status is unnecessary because this model uses the linear relationship between the logit of the input factors and the sewer status. The maximum likelihood method is generally used to estimate the intercept and coefficients based on the factors and sewer conditions. This method maximizes the probability of the sewer status given the fitted regression coefficients [63]. Although LR was designed for regression problems, this method was commonly used for classification problems (especially for binary classification) [64], [65].

L. RIDGE CLASSIFICATION
The Ridge regression method was introduced by Hoerl and Kennard [66] for solving the multicollinearity problem of covariates in samples. This method assumes that samples from each sewer condition class belong to a linear subspace, and a new test sample can be represented as a linear combination of class-specific training samples [67]. Ridge Classification (RC) algorithm is developed based on the Ridge regression, it converts the condition status of sewer pipes into [−1, +1] and solves the problem as a regression task, minimizing the size of the coefficients by imposing a penalty, and the sewer condition class is assigned based on the highest value of the prediction result.

M. MULTI-LAYER PERCEPTRON NEURAL NETWORK
Multi-layer Perceptron Neural Network (MLP) is a fully connected class of feedforward Artificial Neural Networks (ANN). This network has three sequential layers: the input layer, the hidden layer, and the output layer. The number of neurons in the input layer equals the number of factors, two neurons in the output layer represent the expected sewer status (good or bad condition), and the number of hidden layers and hidden neurons is generally found by trial and error [68].
Before training the MLP model, each factor (i.e., physical and environmental factors) was assigned to each neuron and a bias unit was added to the input layer. Then, randomly generated weights were assigned for elements in the input layer, the weighted sums for neurons were calculated and the activation functions were used to transfer the results to the hidden layer. Similar processes were implemented in the hidden layer and the results were driven to the output layer. The error (the difference between the predicted sewer condition status and the measured condition) was calculated and minimized at the output layer. Finally, the derivation of the error function (loss function) with each weight in the network was determined and the model was updated. This was an iterative process over multiple epochs until the ideal weights were determined and the final sewer condition status was predicted based on these weights.

Support Vector Machine (SVM) was proposed by Cortes and
Vapnik [69] to distinctly classify the data points using a hyperplane in N-dimensional space (N is the number of features). In the SVM model, the sewer pipe condition status is determined by maximizing the distance from the hyperplane VOLUME 10, 2022 to the data points of both good and bad conditions. The hyperplanes can be computed as follows [70]: where n is the number of inspected pipes, x i ∈ R n , y i ∈ R, x, and y are vectors that contain input factors and sewer's condition status respectively, w is the coefficient vector, b is and bias of the hyperplane in the feature space, ∅ is the non-linear mapping function, and ε i are positive slack variables. The predicted condition status of the sewer pipe using the SVM is calculated as follows [71]: where auxiliary variables α i are Lagrange multipliers, C is the regularization parameter, and K (x, x i )is Kernel function.

IV. THE PROPOSED METHODOLOGY FOR SEWER CONDITION ASSESSMENT USING MACHINE LEARNING
The development of the sewer condition modeling for the study area involved the following interlinked steps: (1) Collecting physical characteristics and preprocessing auxiliary data to obtain environmental characteristics of the sewer pipes, (2) Dividing the inspected sewer pipes into training and validation datasets, (3) Eliminating redundant features, (4) Constructing conditional assessment models based on different ML algorithms, (5) Validating models' performance and accuracy, and (6) Preparation of condition maps of sewer pipelines. This procedure is shown in FIGURE 4.

A. GIS DATABASE
In this study, GIS was used to preprocess the environmental factors, which were highly related to spatial information. For instance, satellite images have been processed by GIS to create a land-use map using supervised classification in ArcGIS Pro software. Interpolated maps (i.e., rainfall, population, and groundwater) were computed using spatial analysis tools in GIS (e.g., raster calculator, interpolated function) to integrate environmental variables into sewer pipelines. Based on the information obtained from the GIS database, ML algorithms were applied for spatial modeling of the conditions of the sewer network. Physical factors are normally recorded during the installation, operation, and maintenance of the sewer pipes. These data are managed by the local municipality or water agencies; therefore, these factors are easily assigned to each sewer pipe. In this study, the tabular data of physical variables were assigned for sewer pipe using GIS. However, environmental factors are collected from multi-source data (TABLE 2). Hence, environmental factors need to be aggregated for each sewer pipe.
From a spatial perspective, pipes in the sewer network are represented by ''lines''. However, a pipeline can cross many regions with different environmental characteristics (e.g., different land cover or soil type). Therefore, the location of the pipe geometry center is used to assign environmental factors. The data aggregation process is shown in FIGURE 4. In this study, the inspected grades were used as dependent variables for modeling the condition of the sewer pipes. The current conditions of the sewer pipes were assigned using damage scores obtained through the closed-circuit television (CCTV) method. Next, these damage scores were coded into damage classes representing the sewer conditions. According to Haugen and Viak [72], the conditions of sewer pipes in Norway are classified into five-grade scales based on their damage scores (TABLE 4).
There are different approaches for processing dependent variables to model the conditions of sewer pipes in the literature. For example, sewers in six-grade scales were aggregated into three grades [12]; in contrast, five grades of sewers were kept to develop models [73]. In this study, pipes in classes 1-2-3 were grouped into one class (good condition) and pipes in the remaining classes were aggregated into another class (bad condition) before building the condition models. Moreover, aggregating multi-output classes into smaller outputs will reduce the imbalance of the classification. The distribution of sewer classes according to age and material is shown in FIGURE 5, the data shows a slight imbalance in the dataset as a majority (approximately 62%) of inspected sewer pipes in Ålesund city are in good condition class.
After the GIS database was created, environmental factors were converted to raster format with a grid size of 5 m × 5 m in the WGS84-UTM32T (EPSG:32632). After that, the raster values were assigned for each pipe based on their geographical location. Categorical factors (i.e., pipe type, network type, pipe form, connection, geology, landslide area, land cover, building area, road class, and soil type) were coded by integer values. Furthermore, concrete, other, polypropylene, and polyvinyl chloride (PVC) pipes were coded by values 0, 1, 2, 3, and 4, respectively, for correlation analysis in this study.

B. PREPARATION OF TRAINING AND VALIDATION DATASETS
For the model development, a total of 1449 individual pipelines were used to train and validate the condition models of the sewage network. There is no universal guideline for choosing the ratio of training and validation datasets when modeling the condition of the sewage network. For example, a ratio of 80/20 was used for training/testing datasets [7]; in contrast, a ratio of 75/10/15 was used in another study to train, validate, and test the model [6]. In this study, this data was randomly divided with a ratio of 80% and 20% for training and testing datasets, respectively.

C. FEATURE SELECTION METHODS
In general, using redundant variables not only decreases the performance of ML models but also burdens computation. Feature selection techniques help to reduce dimensionality and clearly understand data [74]. Therefore, identifying and removing less significant factors before modeling is critical in preprocessing step [75].  The feature selection techniques used can generally be classified into three: filter, wrapper, and embedded methods. A brief description of the methods is as follows: • Filter methods determine an optimal subset of variables mainly based on their statistical properties and relationship with the target variable. These methods do not remove the multicollinearity of features because they do not account for the interaction between variables [74]. Detailed information on the filter methods can be found in the study by Song, et al. [76].
• Wrapper methods select a subset of features by removing and adding the subsets accordingly based on the role of variables [77]. These methods often have higher performance than filter-based methods, these approaches however are more time-consuming [45]. Details on some wrapper methods can be found in the study by Nanda, et al. [78].
• Embedded methods apply the model-tuning process to perform feature selection [77]. These methods are a combination of the best qualities of filter and wrapper methods in which the variable selection process and classification have been implemented simultaneously using a learning algorithm [45]. Assessment of the importance of variables using embedded methods can be found in the study by Bhavan and Aggarwal [79]. In this study, six feature selection methods (two filter methods including Pearson's R (PR) and mutual information (MI), two wrapper methods including Boruta and Stepwise Feature Selection (SFS), and two embedded methods including Random Forest (RF) and Recursive Feature Elimination (RFE)) were used to assess the contribution of variables to ML models. The less important variables, which were defined by the majority of feature selection methods, were eliminated before constructing the ML models. The packages ''Boruta'', ''stepAIC'', ''randomForest'', ''caret'', and ''kerlab'' in the R Studio software were applied to implement the feature selection methods.

D. CONSTRUCTION OF SEWER CONDITION ASSESSMENT MODELS
The performance of the ML models highly depends on their hyperparameters. The typical hyperparameters of each ML model are shown in TABLE 5. The Scikit-learn and Keras libraries in Python were used to develop ML models in this study.
In this study, the MLP with a single hidden layer was investigated using the Scikit-learn library to predict the sewer status. The log-loss function was optimized in this model using stochastic gradient descent or Limited-memory Broyden-Fletcher-Goldfarb-Shanno (LBFGS) method because this method is especially appropriate for multi-variable optimization [80]. For comparison purposes, the multi-layer ANN architectures using the Keras library were also applied to predict sewer status. Hence, the ANN architectures with one, two, and three hidden layers were investigated. The Bayesian global optimization with Gaussian processes method was used for tuning some hyperparameters (e.g., the number of hidden layers, the number of neurons in the hidden layer, activation functions, and optimization functions) [81]. The ANN was built and trained using the Keras library in Python, the early-stopping technique was used to avoid over-fitting.
The grid-search method with 5-fold cross-validation was selected to find the optimal values of hyperparameters. The training dataset was randomly split into 5 equal-sized subsets and the cross-validation process was repeated 5 times for each of the five subsets to find the optimal solution. The optimum values of hyperparameters of each ML model were used to build the conditional assessment models.

E. MODEL VALIDATION
In this study, the efficiency of the developed models was assessed using Geometric Mean (GM), Accuracy (ACC), F-Score, Matthew's correlation coefficient (MCC), the area under the Receiver Operating Characteristic curve (AUC-ROC), and the area under the Precision-Recall curve  (AUC-PRC). These are expressed as follows (7)- (10), shown at the bottom of the page, whereas ACC and AUC-ROC are the most popular criteria for assessing the classification performance of ML algorithms, GM, F-Score, MCC, and AUC-PRC are sensitive to imbalanced datasets [82].
Other Because multiple assessment criteria were used, the TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) method for multiple-criteria decision-making was applied to rank the predictive performance of ML algorithms. This method proposed by Yoon and Hwang [83] is a multi-criteria decision analysis method that is based on the concept that the chosen alternative should have the shortest geometric distance from the positive ideal solution and the longest geometric distance from the negative ideal solution. This method was widely used to compare the performance of multiple ML algorithms using multiple criteria [84], [85]. In this study, the R package ''topsis'' introduced by Ihaka and Gentleman [86] was used to implement the TOPSIS method.

F. GENERATION OF SEWER CONDITION MAP
In general, the input factors affecting the sewer condition status are dynamic elements (e.g., rainfall or population). However, some other factors can be assumed to be unchanged over time. For example, a collapsed/damaged concrete pipe can be replaced by a newly similar concrete pipe, and similar things can happen with other factors such as diameter, pipe type, or network pipe. Therefore, in this study, we assume that there is only a fluctuation in rainfall, groundwater, and population density during the operational period of the sewer network while predicting future sewer condition status, the other factors are assumed as unchanged. The reason for choosing rainfall, groundwater, and population density as dynamic elements is that these factors are sensitive over time.
In this study, we assumed that the change in rainfall mainly causes the change in groundwater. Hence, the groundwater at the time t (GWL t ) was calculated using the interpolation method: where GWL 0 and Rainfall 0 are the groundwater and rainfall at the time t 0 , and Rainfall t is rainfall at time t (t= 2022, 2042, 2072). The value of each pixel of the groundwater map at time t was calculated in the following steps: • Step 1: Determining the residual value of each pixel of the rainfall map between time t 0 and t: Rainfall t − Rainfall 0 . This step was implemented using the raster calculation function in GIS software.
• Step 2: Computing the value for each pixel using formula (11) to create the groundwater map at time t. According to Worldometer [87], the annual population change (APC) in Ålesund city is 0.62% (2020-2021). To calculate the population in the years 2022, 2042, and 2072, we assumed that the population change is directly proportional to the APC. The value of pixel i in population density maps in the years 2022, 2042, and 2072 were calculated as follows: where P i 2018 and P i t are the population density in the year 2018 and at the time t(t = 2022, 2042, 2072), respectively.
Rainfall at the weather stations in the years 2022, 2042, and 2072 was interpolated from historical measurements at the corresponding stations. The logarithm function was chosen to fit with the values. The coefficients of fitting functions and interpolated rainfall maps were shown in FIGURE 8. Then, maps of rainfall in the years 2022, 2042, and 2072 are created from interpolated rainfall values using the IDW method. Based on the two above steps, maps of interpolated groundwater and population in the years 2022, 2042, and 2072 are represented in FIGURE 9.
Predictive conditions of the sewer pipes in the future can be visualized on maps to provide a general overview of the status of the sewer system in the study area. These sewer condition maps can partly support utilities and water managers in determining the vulnerable regions affecting the condition of sewer pipes. QGIS, which is open-source software for GIS analysis, was used for data analysis and visualization.

A. ROLE OF FACTORS
As discussed in the above sections, different feature selection methods will produce different results for scoring the importance of each factor in developing the models. Hence, various algorithms of feature selection methods were investigated in this study, and the final decision to eliminate important factors was made based on the output results. Results of feature analysis based on the filter, wrapper, and embedded feature selection methods are shown in FIGURE 10,FIGURE 11,and FIGURE 12,respectively. In the filter methods, the correlation analysis shows that material and age highly correlate with the sewer condition status (FIGURE 10a). More specifically, the material of sewer pipes has the highest correlation with their status (PR = −0.54), followed by the sewer's age (PR = 0.46), connection type (PR = −0.35), and pipe type (PR = −0.33).
It is evident that when the sewer's age increases, its condition deteriorates. The negative correlation of sewer material with the condition status indicates that concrete pipes are more durable than other pipes such as PVC pipes in the study area. The PR correlations of depth, diameter, network type, and distance to road are approximately equal to zero, indicating these factors have less influence on the condition of the pipes. The mutual information analysis shows sewer material and age to be the most significant factors in the sewer condition (FIGURE 10b). This analysis shows that pipe form and network type were insignificant factors.
The feature selection analysis using the wrapper methods is shown in FIGURE 11. The Boruta feature selection method reveals that the material of the sewer pipe is the most important factor for the condition assessment, followed by the age VOLUME 10, 2022   of the sewer. Network type and length are assessed as the least important for this analysis (FIGURE 11a). The significance of factors for the condition assessment was assessed using the SFS method after ten iterations. FIGURE 11b shows that the Akaike information criterion (AIC) value was achieved after ten iterations (about 1070.5). All factors were used to calculate AIC at the first iteration. The factors distance to road and geology were eliminated after the first and second iterations, respectively. Finally, material, age, diameter, slope, length, pipe type, connection type, pipe form, groundwater, building area, and traffic volume were accepted (FIGURE 11b). FIGURE 12 shows the result of feature selection analysis using the embedded methods. For the RF method, sewer material was found to be the most significant factor, followed by the age of the sewer. Network type, building area, and landslide area were less significant (FIGURE 12a). Similar results were obtained by the REF method (FIGURE 12b).
Overall, all feature selection methods show that the material and age of sewer pipes are the most important factors. Based on the above results, network type was eliminated from the dataset before building the condition assessment models because the majority of feature selection methods assessed this variable as of less importance compared to others.

B. HYPERPARAMETERS OPTIMIZATION
Different ML models work with different parameters to generalize different data patterns. Hyperparameter tuning is used for optimal hyperparameters for the ideal model architecture. This study used the training dataset to select the best hyperparameters for each ML model using the grid-search method with a 5-fold cross-validation approach. The average accuracy was scored to define the best hyperparameters of each model. The tuned parameters, ranges of parameters, and their optimal values for each ML model are shown in TABLE 5. The accuracy of the ML models in TABLE 5 shows the average accuracy obtained from the grid-search method with a 5-fold cross-validation approach using the training dataset.

C. COMPARISON OF SEWER CONDITION MODELS
Performance prediction of ML models was generally assessed using the validation dataset based on the criteria and presented in TABLE 6.
It can be seen in TABLE 6 that the trees-based ML models (such as RF, AdaBoost, GTB, HGB, and ERT) have better performance than the others. In terms of the AI model,   The predictive performance of ML models is ranked using the TOPSIS method and presented in TABLE 7. The result shows that the RF is the best algorithm for modeling the sewer condition in the study area, followed by AdaBoost and GTB algorithms. Other algorithms are too simple (e.g., GNB or BNB) or too complex (e.g., ANN-3HLs) and they likely are not able to capture essential characteristics of the deterioration process in the sewer network in the study area.

D. SEWER CONDITION MAPS
The maps of the condition of sewer pipes in the year 2022, the next 20 years (2042), and the next 50 years (2072) in Ålesund city were created. In these maps, we assume there is no sewer pipes rehabilitation. For example, these pipes in bad condition in 2022 will maintain their conditions in 2042. FIGURE 13 shows the present status of the sewer network (in 2022) constructed using the RF model. The results show that the sewer pipes predicted in bad condition were largely in the area marked A (the left-hand side rectangle), followed by the area marked B (the right-hand side rectangle). Due to confidential issues, maps of the condition status of the sewer network in the study area in the years 2042 and 2072 are not presented in this study. Interested readers can contact the authors to get detailed information.  from 8203 to 12988, corresponding to a total length of 204.4 km to 290.3 km. Moreover, it is worth noting that approximately half of the sewer pipes in the study will be in bad condition after 50 years. Maps of the sewer status received from the sewer condition model can support utilities and water managers in determining the spatial distribution of sewer pipe status in the city (FIGURE 13). Also, the length of pipes in each condition class shown in FIGURE 14 can help in investments in maintenance strategies.

VI. DISCUSSION
Sewer pipeline condition assessment is one of the critical steps in the water management process and a good condition model can support decision-making and maintenance strategies. In this research, the RF model was found to be more potent in predicting the sewer status in this study area.
Although all feature selection methods showed similarity in determining the two most important factors (material and age) and one less important factor (network type), however, the important degree of factors between methods is slightly different. This is likely due to the random feature of each method in splitting and combining subsets to optimize model performance [88].
Due to the unavailability of rainfall data in the study area, an interpolation map of rainfall was created from some weather stations near the study area. However, by using the IDW method, the accuracy of the interpolation rainfall map can be accepted for doing research on a large scale with annual time scales [89]. It is worth noticing that although the future rainfall map can be constructed from the climate projections [27], we used the linear method to interpolate annual average rainfall values at the weather stations and a rainfall map was created from these values. The main reason for doing this is that we want to apply the same approach for interpolating groundwater and population density maps.
One thing that should be paid attention to in this study is that some maps were established based on assumptions. For instance, the population density map was created based on the statistical data in 2018 and the future population density maps were created based on the annual average population change, or the assumption that changing groundwater only depends on the change of rainfall is only considered in this study. However, the change in these factors depends on different conditions and they should be considered in future studies. Another limitation of this study is that no operational factors are considered due to their unavailability at the time this study was undertaken. These factors can be accounted for in future studies to improve the model performance.
The final ML model has an accuracy of approximately 80%, indicating pretty good performance. This is because the deterioration of the sewer network is a complex process and depends on many different factors. Therefore, more pipe inspection data and factors should be considered to strengthen the predictive capability of the ML models.
In this study, pipe material and pipe age are the most important factors affecting the sewer pipe deterioration process. This conclusion is consistent with the result of Laakso, et al. [9] that found high-density polyethylene and reinforced concrete pipes were more durable than other materials. Age is a dynamic factor that immediately affects sewer deterioration as soon as the pipes are installed and it has been proved as the highest contributor to the deterioration process [90]. In contrast, network type (including wastewater, stormwater, and combined) is assessed as the lowest contribution to the model. This can be explained that most sewer pipes in the study are the main network type (FIGURE 2h).

VII. CONCLUSION
This study applied various ML algorithms for the assessment of sewer pipe conditions. A total of 1449 sewer pipelines derived from CCTV inspection were used to construct and verify the ML models. Six feature selection methods (i.e., filter, wrapper, and embedded methods) were applied to select the significant factors affecting sewer pipe conditions. The main conclusions from the study are: • Sewer material is the most important factor affecting sewer pipe's condition status, followed by age. The sewer network type (stormwater, wastewater, and combined) was less important for the sewer condition in the study area.
• The RF model outperformed other ML models in modeling the sewer condition in the study area.
• Based on the RF model, maps of the condition of sewer pipes for the years 2022, 2042, and 2072 in Ålesund city were developed. These maps can be used as reference materials or documents in developing future maintenance strategies for the study area.
• The predictive performance of ML models can be improved by using more inspected sewer pipes as input for training ML models. Furthermore, other environmental and operational factors should be considered to improve the accuracy of the sewer condition model.
The data analysis and write-up thesis were operated as a part of the first author's Ph.D. studies at the Department of Ocean Operations and Civil Engineering, Faculty of Engineering, Norwegian University of Science and Technology, Norway.