Next Article in Journal
Visualizing Source-Code Evolution for Understanding Class-Wide Programming Processes
Next Article in Special Issue
Smart Rainwater Harvesting for Sustainable Potable Water Supply in Arid and Semi-Arid Areas
Previous Article in Journal
Sustainable Development Goal for Education: Teachers’ Perspectives on Climate Change Education in Senior High Schools (SHS)
Previous Article in Special Issue
Assessment of Climate Change Impact on the Annual Maximum Flood in an Urban River in Dublin, Ireland
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Comprehensive Study of Artificial Intelligence Applications for Soil Temperature Prediction in Ordinary Climate Conditions and Extremely Hot Events

by
Hanifeh Imanian
1,*,
Juan Hiedra Cobo
2,
Pierre Payeur
3,
Hamidreza Shirkhani
2 and
Abdolmajid Mohammadian
1
1
School of Electrical Engineering and Computer Science, University of Ottawa, Ottawa, ON K1N 6N5, Canada
2
National Research Council Canada, Ottawa, ON K1A 0R6, Canada
3
Computer Science Engineering Department, University of Ottawa, Ottawa, ON K1N 6N5, Canada
*
Author to whom correspondence should be addressed.
Sustainability 2022, 14(13), 8065; https://doi.org/10.3390/su14138065
Submission received: 18 May 2022 / Revised: 21 June 2022 / Accepted: 28 June 2022 / Published: 1 July 2022
(This article belongs to the Special Issue Sustainable Water Resources Management and Sustainable Environment)

Abstract

:
Soil temperature is a fundamental parameter in water resources and irrigation engineering. A cost-effective model that can accurately forecast soil temperature is urgently needed. Recently, many studies have applied artificial intelligence (AI) at both surface and underground levels for soil temperature predictions. In the present study, attempts are made to deliver a comprehensive and detailed assessment of the performance of a wide range of AI approaches in soil temperature prediction. In this regard, thirteen approaches, from classic regressions to well-established methods of random forest and gradient boosting to more advanced AI techniques, such as multi-layer perceptron and deep learning, are taken into account. Meanwhile, great varieties of land and atmospheric variables are applied as model inputs. A sensitivity analysis was conducted on input climate variables to determine the importance of each variable in predicting soil temperature. This examination reduced the number of input variables from 8 to 7, which decreased the simulation load. Additionally, this showed that air temperature and solar radiation play the most important roles in soil temperature prediction, while precipitation can be neglected in forecast AI models. The comparison of soil temperature predicted by different AI models showed that deep learning demonstrated the best performance with R-squared of 0.980 and NRMSE of 2.237%, followed by multi-layer perceptron with R-squared of 0.980 and NRMSE of 2.266%. In addition, the performance of developed AI models was evaluated in extremely hot events since heat warnings are essential to protect lives and properties. The assessment showed that deep learning and multi-layer perceptron methods still have the best prediction. However, their R-squared decreased to 0.862 and 0.859, and NRMSE increased to 6.519% and 6.601%, respectively.

1. Introduction

Soil temperature is a pivotal parameter in geo-environmental and geotechnical engineering. Soil temperature prediction is significant for atmospheric models, numerical hydrological and land-surface hydrological processes, as well as land–atmosphere interactions [1,2]. In addition, in some other fields, such as water resources and hydrologic engineering, soil temperature is an important factor [3]. Soil temperature is a catalyst for many biological processes. It influences the soil moisture content, aeration and availability of plant nutrients, which are necessary for plant growth. It is essential to measure or estimate this parameter with a reasonable precision. Therefore, an accurate and cost-effective model that can accurately predict soil temperature is urgently needed [4,5,6].
There are two common ways of obtaining soil temperature: direct measurement and indirect prediction using numerical models [7]. Since soil temperature is a stochastic parameter and similar to other climatic parameters, researchers use the following approaches to calculate it: statistical models and machine learning methods [8].
Statistical models use historical time series to estimate soil temperature predictions. The commonly used method for time series forecasting is stochastic modeling, such as the auto-regressive moving average (ARMA) and auto-regressive integrated moving average (ARIMA) [9]. These statistical methods assume that changes in the statistical properties of soil temperature data series in the future would be similar to those in the past. This means that large amounts of data are required for long-term predictions. Bonakdari et al. (2019) and Zeynoddin et al. (2020) proposed a linear stochastic method to model daily soil temperature with sufficient knowledge of the time series structure [6,9].
Recently, the use of artificial intelligence (AI)-based techniques for predicting real-world problems has rapidly increased. Many studies applied AI models at both surface and under-ground levels for soil temperature predictions. George (2001) made use of a multi-layer neural network for a weekly mean soil temperature prediction during 1 year [10]. Monthly soil temperature was modeled using a 3-layer artificial neural network (ANN) constructed by Bilgili (2010) [11]. He used meteorological variables of atmospheric temperature, atmospheric pressure, relative humidity, wind speed, rainfall, global solar radiation and sunshine duration to make predictions at five depths below ground level and compared them with linear and nonlinear regression results. Ozturk et al. (2011) developed feed-forward artificial neural network models to estimate monthly mean soil temperature at five depths from 5 to 100 cm under the ground using meteorological data such as solar radiation, monthly sunshine duration and monthly mean air temperature [12]. Zare Abyaneh et al. (2016) used ANNs and a co-active neuro-fuzzy inference system for the estimation of daily soil temperatures at six depths from 5 to 100 cm underground using only mean air temperature data from a 14-year period as input data [13]. An adaptive neuro-fuzzy inference system (ANFIS), multiple linear regression (MLR) and ANN models were developed by Citakoglu (2017) to predict soil temperature data in monthly units at five depths from 5 to 100 cm below the soil surface using monthly air temperatures and monthly precipitation for at least 20 years [14]. Himika et al. (2018) made use of various existing regression and machine learning models to propose an ensemble approach to predict land temperature [15]. The chosen models were decision tree, variable ridge regression and conditional inference tree. Delbari et al. (2019) evaluated the performance of a support vector regression (SVR)-based model in estimating daily soil temperature at 10, 30 and 100 cm depth at different climate conditions [16]. Climatic data used as inputs for the models were air temperature, solar radiation, relative humidity, dew point, and the atmospheric pressure. They compared the obtained results with classical MLR and found that SVR performed better in estimating soil temperature at deeper layers. A study by Alizamir et al. (2020) compared four machine learning techniques, extreme learning machine (ELM), artificial neural networks (ANN), classification and regression trees and a group method of data handling in estimating monthly soil temperatures [3]. They used monthly climatic data of air temperature, relative humidity, solar radiation, and windspeed at four different depths of 5 to 100 cm as model inputs. ELM was found to generally perform better than the others in estimating monthly soil temperatures. Li et al. (2020) presented a novel scheme for forecasting the hourly soil temperature at five different soil depths [17]. They developed an integrated deep bidirectional long short-term memory network (BiLSTM) and fed their model with air temperature, wind speed, solar radiation, relative humidity, vapor pressure and dew point. Six benchmark algorithms were chosen to prove the relative advantages of the proposed method, namely, three deep learning methods: LSTM, BiLSTM and deep neural network (DNN), and three traditional machine learning methods: random forest (RF), SVR, and linear regression. The proposed model of Penghui et al. (2020) is a hybridization of an adaptive neuro-fuzzy inference system with optimization methods using a mutation salp swarm algorithm and grasshopper optimization algorithm (ANFIS-mSG) [18]. The prediction of daily soil temperatures was conducted based on maximum, mean and minimum air temperature. The results are compared with seven models, including classical ANFIS, a hybridized ANFIS model with grasshopper optimization algorithm (GOA), salp swarm algorithm (SSA), grey wolf optimizer (GWO), particle swarm optimization (PSO), genetic algorithm (GA), and dragonfly algorithm (DA). Shamshirband et al. (2020) modeled air temperature, relative humidity, sunshine hours and wind speed using a multilayer perceptron (MLP) algorithm and SVM in hybrid form with the firefly optimization algorithm (FFA) to estimate soil temperature at 5, 10 and 20 cm depths [19]. In a study by Seifi et al. (2021), hourly soil temperatures at 5, 10, and 30 cm depths were predicted by applying ANFIS, SVM, MLP and a radial basis function neural network with optimization algorithms of SSA, PSO, FFA and sunflower optimization (SFO) [4]. They used air temperature, relative humidity, wind speed and solar radiation as input information and found that wind speed did not have a high coherence with soil temperature. A generalized likelihood uncertainty estimation approach was implemented to quantify model uncertainty and concluded that ANFIS-SFO produced the most accurate performance. Hao et al. (2021) proposed a model called a convolutional neural network based on ensemble empirical mode decomposition (EEMD-CNN) to predict soil temperatures at three depths between 5 and 30 cm [1]. They used the statistical properties of the maximum, mean, minimum and variance air temperatures as the meteorological input information. The results were compared using four models: persistence forecast (PF), backpropagation neural network, LSTM and EEMD-LSTM. In a similar study, a convolutional 3D deep learning model with ensemble empirical mode decomposition (EEMD) was proposed by Yu et al. (2021) to predict soil temperatures over 1, 3 and 5 days at a depth of 7 cm underground [2].
Extreme events and their related irregular data are observed in many climate timeseries. So, the development of efficient methods to understand and accurately predict such representative features remains a big challenge. O’Gorman and Dwyer (2018) applied the RF method to simulate extreme precipitation events [20]. Hu and Ayyub (2019) used machine learning to propose an alternative method for extreme precipitation modeling [21]. A deep learning strategy is proposed by Qi and Majda (2020) to predict the extreme events that appear in turbulent dynamical systems [22]. Huang et al. (2021) employed a stacking model and the XGBoost model to study the trend analysis between extreme land surface temperatures and the amount of solar radiation [23]. Araújo et al. (2022) propose an approach based on networks to forecast extreme rainfall [24]. In addition, Bochenek and Ustrnul (2022) reviewed 500 publications from 2018 to 2021 concerning machine learning methods, finding that the phrase “extreme events” was recorded a few times in the field of climate and numerical weather predictions, mostly used in terms of extreme precipitation and streamflow [25]. So, the ability of different AI strategies in the prediction of extreme events should be investigated.
The above literature review shows that there are some gaps in the knowledge of AI applications in the prediction of soil temperature. First, there is an absence of a comprehensive and detailed assessment of the performance of different artificial intelligence approaches, from linear regression to complicated advanced techniques in soil temperature estimation. Second, the most important atmospheric variables to be used as input data for AI models must be determined. Previous studies usually used limited atmospheric variables, while in the current investigation, a wide range of variables were employed. Although several researchers developed codes equipped with some AI models, they focused on limited meteorological parameters, mostly air temperature. There are many other climate data that affect soil temperature, directly or indirectly. Therefore, the impact of other land and atmospheric variables needs to be further studied. Furthermore, research should evaluate and demonstrate the AI models’ skill in successfully tackling extreme events.
The main purpose of this study is to evaluate the performance of a wide range of AI approaches to soil temperature prediction using various land and atmospheric variables. In this article, 13 methods, from classic regressions, well-established methods of random forest and gradient boosting to advanced AI techniques, such as ANFIS, ANN and deep learning, are taken into account. Meanwhile, a broad selection of variables from a comprehensive reanalysis of ERA5 datasets were chosen as input parameters for the developed prediction model to consider different aspects of the problem.
The rest of the paper is organized as follows: Section 2 describes the study area and involved parameters, introduces the applied AI approaches and reviews the methodology of study. The evaluation metrics are also presented in this section. The subsequent section defines datasets and input information, presents the results and compares them with the actual data. A discussion on the performance of the different AI methods using error metrics, confidence bands and a sensitivity analysis of the outcomes of input parameters is given in Section 4. Additionally, the behavior of developed AI models in extreme events is investigated in the same section. The last section presents the concluding remarks and future study suggestions.

2. Materials and Methods

2.1. Study Area and Dataset

The climate data used in the present study were obtained from ERA5. They were downloaded from the freely accessible website of Climate Data (https://cds.climate.copernicus.eu/, accessed on 1 July 2021). ERA5 is the fifth-generation atmospheric reanalysis of the global climate covering the period from 1950 to present. ERA5 is produced by the Copernicus Climate Change Service (C3S) at ECMWF. It provides hourly estimates of a large number of atmospheric, land and oceanic climate variables in a gridded-base format with a regular latitude–longitude grid. The data coverage is global with a horizontal resolution of 0.25° × 0.25° and resolves the atmosphere using 137 levels from the surface up to a height of 80 km. ERA5 includes information about uncertainties for all variables at reduced spatial and temporal resolutions. ERA5 combines vast amounts of historical observations into global estimates using advanced modeling and data assimilation systems.
The study area is Ottawa, the capital city of Canada (45.4° N, 75.7° W), located in the southeast of the country, in the province of Ontario. Figure 1a shows the geographical location of the considered site used in this study [26]. Ottawa has a semi-continental climate with four distinct seasons. It has a warm, humid summer and a very cold and harsh winter.
Six stations represent the city of Ottawa, which are specified with red circles in Figure 1b. The stations cover an area of approximately 30 × 40 km. The coordinates of the stations are shown in Table 1.
The used variables were the hourly weather conditions, including air temperature at 2 m above the surface (Kelvin), total precipitation (m), surface pressure (Pa), evaporation (m of water), instantaneous wind gusts at 10 m above the surface (m/s), dewpoint temperature 2 m above the surface (Kelvin), surface net solar radiation (J/m2) and surface net thermal radiation (J/m2). The valid data were collected from 1 June to 31 August 2020, a total of 92 days [27]. The data from these variables in the six mentioned stations are considered as model inputs. Then, approximately 106,000 pieces of climatic information were gathered as the AI model’s input. The output of each AI model predicted hourly soil temperature in Kelvin at the layer between 0 to 7 cm underground.

2.2. Descriptions of Artificial Intelligence Algorithms

A wide range of AI approaches are applied in the developed numerical model, as described below.
There are two ways to assign hyperparameters in the models: Some of the hyperparameters are obtained by sensitivity analysis. In this technique, different values for hyperparameters are assumed to be in the acceptable range. Then, the model is executed, and its behavior is monitored. Finally, the value with the best outcome is chosen for that hyperparameter. In the other method, hyperparameters are set to a typical value according to the previously studied cases or other considerations.
Most of the hyperparameters in the current study were assigned after a sensitivity analysis, while some activation functions or kernel functions were set to recommend typical functions according to the present studied case, which is regression.

2.2.1. Linear Regression, Ridge, Lasso and Elastic Net

Four different linear models were applied in the developed code, including: Linear regression, ridge, lasso and elastic net. Linear regression is the most basic form of a linear model for minimizing the residual sum of squares. So, the objective function is as follows [11,14,17,28]:
( y X w ) 2
where y is the actual value, X is the input value and w is weight.
Ridge is a linear model that imposes a penalty on the sum of squared value of the weights, resulting in a group of weights that are more evenly distributed. The objective function called L2 regularization:
( y X w ) 2 + α w 2
where α is a non-negative hyperparameter that controls the magnitude of the penalty. In the present study, α was set to 0.1 by a sensitivity analysis of the ridge model.
For lasso, a modification of linear regression is applied, in which the model is penalized for the sum of absolute values of the weights, which is known as L1 regularization:
1 2 m ( y X w ) 2 + α | w |
In the present study, α was set to 0.001 by sensitivity analysis for lasso model.
Elastic net (Enet) is a combination of the two last models such that both regularizations related to ridge and lasso models are exerted on the linear regression. Parameter ρ defines the ratio of penalties. If ρ is zero, the penalty would be L2 regularization; if ρ is one, the penalty would be L1 regularization:
1 2 m ( y X w ) 2 + α ρ | w | + α 2 ( 1 ρ ) w 2
In the present study, ρ was set to 0.5, so it was a combination of ridge and lasso models. Additionally, α was set to 0.0001, obtained by a sensitivity analysis for Enet model.
To reach the desired hyperparameters, different values in the acceptable range are usually tried, and the one that leads to the best result with minimum error is chosen. However, the intermediate process is not explained in the manuscript to avoid prolonging the text, and only the selected value for hyperparameter was provided. For example, in the Enet method, different values of α and related error indicators are presented in Table 2. At the beginning, it can be seen that the error metrics improved, but with the decreasing α from 0.0001, the error indicators did not dramatically change. So, this value was selected for hyperparameter α in this method.
The change rate is calculated in the last two rows of the table. It shows NRMSE decreases fast with greater α values, but it becomes almost constant when α is selected as 0.0001 and less. The same trend can be seen for R-squared. While α values are high, R-squared increases and reaches a point that remains unchanged for α equals 0.0001. This analysis confirms that 0.0001 is a good choice for the α hyperparameter in the Enet model since larger values lead to high error results and do not show an acceptable accuracy. Additionally, lower values do not significantly improve model results.

2.2.2. Nearest Neighbors Method

In the nearest neighbors method, learning is based on the fixed number of nearest neighbors for each query point or on the neighbors within a fixed radius of the query point. It can be uniformly weighted or made proportional to distance.
The present study implemented learning for k-nearest neighbors’ points (KNN). Parameter k was set to 3 after calibration. Additionally, a uniform weight function was used in the prediction, which means each point in the local neighborhood uniformly contributed to the classification of a query point. The distance function used for the tree was Euclidean distance, which is the ordinary distance between two points on a plane.

2.2.3. Decision Tree, Random Forest, Gradient Boosting and Extreme Gradient Boosting

There is another learning method called decision trees. This method’s goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from data features. In other words, a tree can be seen as a piecewise constant approximation.
Ensemble learning method is a technique that combines predictions from multiple machine learning algorithms in order to make a more accurate prediction than a single model. Some ensemble models are developed based on decision trees such as random forest and gradient boosting.
Random forest is a meta estimator that fits a number of decision trees on various subsets of the dataset. A RF operates by constructing several decision trees during training time and outputting the mean of the classes as the prediction for all the trees. Several trees run in parallel with no interactions amongst them in this method [7]. In the present study, the number of decision trees in the random forest model was set to 1000 after sensitivity analysis. The criterion function to measure the quality of a split in RF was squared error since other functions such as absolute error are significantly time-consuming. No maximum depth was assigned for the tree, so nodes could expand until all leaves became pure.
Gradient boosting repeatedly fits a decision tree on the differentiable loss functions. This method builds one decision tree at a time, where each new tree helps to correct errors made by the previously trained tree. Gradient boosting is fairly robust against over-fitting, so a large number of boosting stages usually results in a better performance. In the present study, the number of boosting stages to perform was set to 1000 after sensitivity analysis. More repetition did not significantly improve the results.
Extreme gradient boosting (XG boost) builds a model by a set of trees, reduces the errors, and builds a new model in subsequent iterations. Unlike the gradient boosting method, XG boost implements some regularization; therefore, it helps to reduce overfitting. Additionally, it is much faster compared to gradient boosting [29,30].
There are some hyperparameters that should be tuned for the XG boost model: (i) number of used decision trees, which would often be better if have more, (ii) tree depth, which controls how specialized each tree is to the training dataset, (iii) learning rate, which controls the amount of contribution of each decision tree model on the ensemble prediction. In the present study, the number of decision trees, tree depth and learning rate were set to 100, 6 and 0.3, respectively.

2.2.4. Support Vector Machine

The basic idea of support vector machines is to map the original data into a feature space with a high dimensionality through a non-linear mapping function and construct an optimal hyperplane in the new space. In case of regression, a hyperplane is constructed that lies close to as many points as possible. It means the optimal hyperplane it seeks is not to maximize the separation distance between two or more kinds of sample points such as SVM, but to minimize the total deviation between sample points and the hyperplane [31,32,33,34].
When solving nonlinear problems, SVR applies the kernel function to map the nonlinear regression problem to the space of higher latitude, so that an optimal hyperparameter to be constructed that lies close to as many points as possible.
The radial basis function kernel is widely used for SVM models and recommended in regression problems [32] and was applied in this study:
K ( X i , X j ) = e x p ( γ ( X i X j ) 2 )
where X i , X j are two points, and the hyperparameter γ passes the reciprocal of the number of features, which was set to 8 in the present study.

2.2.5. Stacking Method

Another group of methods is called stacking or stacked generalization. Stacking is an ensemble machine learning algorithm that learns how to best combine the predictions from multiple high-performance machine learning models. In this paradigm, the outputs of some aforementioned individual estimators are gathered and an additional regressor is used to compute the final prediction. Stacking often ends up with a model that is better than any individual intermediate model [35].
In the present study, different combinations of estimators are tried, and eventually, three methods—random forest, SVM and ridge—computed the best outcome.
In the first step, the stacking method uses some predictors, which consist of a list of machine learning methods stacked together in parallel on the input data. Herein, the random forest and SVM methods were applied as predictors. At the second step of stacking method, a final predictor is employed that uses the predictions of the first estimators as inputs. The final predictor is a machine learning regressor, which was chosen to be the ridge method in the current study.

2.2.6. Multi-Layer Perceptron

Multi-layer perceptron (MLP), a class of feedforward ANN, is a non-linear function approximator in layers using back propagation with no activation function in the output layer. It used the rectified linear unit (Relu) function as the activation function in the hidden layers [7,8,36,37,38,39]:
g ( z ) = m a x ( 0 , z )
Although there are some different types of activation functions used in neural networks, Relu is the most common function for hidden layers because it is both simple to implement and effective at overcoming the limitations of other previously popular activation functions.
MLP uses different loss functions depending on the problem type. For the case of prediction, MLP uses the square error loss function; written as:
1 2 ( y X w ) 2 + α 2 w 2
Starting from initial random weights, MLP minimizes the loss function by repeatedly updating these weights. After computing the loss, a backward pass propagates it from the output layer to the previous layers, providing each weight parameter with an update value meant to decrease the loss. The algorithm stops when it reaches a pre-set maximum number of iterations, or when the improvement in loss is below a certain, small number.
In the current study, 700 hidden layers were used in the MLP model after sensitivity analysis. The sensitivity analysis showed that using 500 and 1000 hidden layers led to NRMSE of 0.04050 and 0.03655, respectively. Whereas, considering 700 hidden layers, NRMSE was 0.03635, which showed an improvement in error metrics.
The activation function for the hidden layers was Relu, which passes the maximum of the variable and zero. The solver for weight optimization was Adam, which is a stochastic gradient-based optimizer. Maximum number of iterations was 5000, which determines the number of epochs, meaning how many times each data point is used.

2.2.7. Deep Learning

Briefly, deep learning is a machine learning technique that employs a deep neural network. The word “deep” refers to the depth of layers in a neural network. A deep neural network is a multi-layer neural network that contains two or more hidden layers. However, it is not just the addition of hidden layers or the addition of nodes in the hidden layer. There is no point in adding hidden layers if they cannot be trained, and the neural network with deeper layers may not be appropriately trained [17,37]. Although deep learning shows outstanding achievements, it does not actually have any critical technologies to present. The innovation of deep learning is a result of many minor technical improvements. Technically, the backpropagation algorithm experiences three primary difficulties in the training process of the deep neural network, and deep learning could overcome those problems [40]:
-
Vanishing gradient: This is a problem when the hidden layers are not adequately trained. Deep learning is assisted by some numerical method that better achieves the optimum value and is beneficial for the training of the deep neural network.
-
Overfitting: Deep neural networks are vulnerable to overfitting because the model becomes more complicated as it includes more hidden layers, and hence more weight. Deep learning solves this problem by training only some of the randomly selected nodes rather than the entire network. It also uses regularization.
-
Computational load: Deep learning relieved significant training time due to heavy calculations by employing GPU and some other algorithms.
In the deep learning method, the number of epochs is the number of times that the entire training dataset is shown to the network during training. In the current study, this hyperparameter was set to 100. The optimization algorithm used to train the network was Adam, which is widely used in deep learning [37]. The activation function that controlled the non-linearity of individual neurons was Relu, which is widely recommended [17]. There are two hidden layers in the present model. The number of neurons in the hidden layers that control the representational capacity of the network were set to 300, after tuning.

2.2.8. Adaptive Neuro-Fuzzy Inference System

Adaptive Neuro-Fuzzy Inference System (ANFIS) models combine fuzzy systems and the learning ability of neural networks. ANFIS is considered an ANN model that conducts the preprocessing step by converting numeric values into fuzzy values [5,32,41,42,43].
The toolbox feature of the ANFIS forms a fuzzy inference system whose membership structure or parameters can be calibrated either using a backpropagation method alone or combining with the least-squares-type method. To create an inference system, five different layers, namely the fuzzy layer, product layer, normalized layer, de-fuzzy layer, and the total output layer, are used. Each layer consists of different adaptive nodes that exert changeable and fixed factors on input values.
The ANFIS rules are presented in the following form:
y = p x 1 + q x 2 + r
where x 1 , x 2 are input variables from corresponding fuzzy sets, y is the output, and p , q , r are constant parameters.

2.3. Methodological Overview

The collected data were randomly split into two parts. The first part, including 65% of the data, was used for the training phase, while the remaining 35% of the data were are used as the testing set.
In the splitting part of the AI models, the dataset was divided to randomly train and test subsets. This means that data were shuffled first, then 65% of shuffled data were used for training phase, and the remaining data were set aside as testing data. The considered AI approach was fitted to the train subset, and the accuracy of training step was calculated based on several error measures, as described in Equations (9)–(14). In the next step, the fitted AI model was applied to the test subset for prediction purpose. Again, the accuracy of the testing step was calculated.
Different explanations can be made for the applied AI models considering the accuracy of training and testing steps. If the model performs much better on the training set than on the test set, then we are likely to be overfitting. Underfitting refers to a model that can neither model the training data nor the testing data. The sweet spot between underfitting and overfitting, which shows the good performance of a machine learning algorithm on both the training and testing data, is a good fit [5,37].
The accuracy results of the training and testing stages of each applied AI model are presented in Table 3. The values show good performance for all models on both training and testing data, which proves the dataset is not prone to overfitting.
Moreover, to ensure that splitting does not affect the model performance, cross-validation (CV) metrics are employed in the developed codes. In this function, splitting the data was carried out k consecutive times (here a process of 5 times was typically chosen) with different splits each time. The model was fitted and scores were computed for each iteration. The mean and standard deviations of scores are presented in Table 3 for every AI model. The fact that, for all models, the mean is near 1.0 and the standard deviation is negligible shows that random splitting was successful in the cross-validation evaluation and did not lead to overfitting in the considered case.
In fact, the temperature time series are non-stationary since their statistical properties change over time. In the present study, the soil temperature prediction was primarily considered in the hot season. The mean and standard deviations of the all the data are 296 and 4, respectively. Then, the time series were split into four partitions, and each group’s mean and standard deviation were calculated. It was found that the statistical parameters of each division do not have noticeable differences from each other. This shows the non-stationary factor of soil temperature time series used in the present study cannot be considered a major issue.
The air temperature, precipitation, surface pressure, evaporation, instantaneous wind speed, dewpoint temperature, solar radiation and thermal radiation are the atmospheric variables used as the inputs of the benchmark algorithm, and the soil temperature at a depth of 0–7 cm underground is the output of the model.
With the aim of making model training less sensitive to the scale of parameters and allowing our models to converge to better weights and, in turn, lead to a more accurate model, the data were normalized in a way that removed the mean and scaled each variable to unit variance. Scaling occurred independently on each parameter by computing the relevant statistics on the samples in the training set. Mean and standard deviations were then stored to be used on later data using denormalization. The same procedure was employed for testing data before prediction.
The overall flow of the simulation is illustrated in Figure 2.
The applied programming language in this study was Python version 3.9 (Python: Open-source, designed by Guido van Rossum in 1991). Python is a high-level, object-oriented, general-purpose, interactive language that is widely used for data analysis and machine learning. Additionally, Spyder version 5.1.5 (Spyder: Open-source, original author is Pierre Raybaut in 2009) was employed, which is a scientific Python development environment. The processor of the used device was 11th Gen Intel Core i5 @ 2.40 GHz, and installed RAM was 8.00 GB.
To facilitate the assessment of the model performance, the outputs of applied AI models need to be compared. Several error indicators are employed to measure the quality of modeling, including maximum residual error (MaxE), mean absolute error (MAE), mean square error (MSE), root mean square error (RMSE), normalized root mean square error (NRMSE) and coefficient of determination (R-squared). The evaluation metrics are defined as:
M a x E = M a x ( y o b s y c a l c ) optimal   value :   0
M A E = | y o b s y c a l c | n optimal   value :   0
M S E = ( y o b s y c a l c ) 2 n optimal   value :   0
R M S E = ( y o b s y c a l c ) 2 n optimal   value :   0
N R M S E = R M S E [ M a x ( y o b s ) M i n ( v o b s ) ] optimal   value :   0
R 2 = 1 ( y o b s y c a l c ) 2 ( y o b s y c a l c ¯ ) 2 optimal   value :   1
where y o b s is the observed value, y c a l c is the predicted value by the AI mode, y c a l c ¯ is the mean of calculated values and n . is the number of data points.

3. Results

Before applying the models to all stations representing Ottawa, one station (station #2 in Table 1) was selected, and AI models were applied. The location of the station was central–southern Ottawa, with coordinates of 45.25° N and 75.75° W, which are shown in Figure 1c. As mentioned earlier, eight hourly climate parameters were used as input variables. The data were gathered from 1 to 31 July 2020, a total of 31 days, and approximately 6000 pieces of climatic information were found.
According to what was stated, AI models were applied for two sets of data. The first dataset is for a confined database with a limited quantity of information based on station #2 (shown in Figure 1c) and is named as the limited dataset in the current study. The second dataset is an extensive collection of data based on the information of six stations (shown in Figure 1b) and is named as the big dataset in the present study.
After applying each developed AI model on these two datasets, evaluation of the model’s performance was carried out separately; then, a comprehensive assessment was finally performed.
The primary step of modeling was splitting the data into two groups. Although the data were randomly split for training and testing purposes, the training and testing data were maintained for all models. So, all AI models were trained and tested with the same set of data. After the model training procedure, the model was fed with testing data as inputs, and prediction results were obtained. The predicted outcomes and real values were simultaneously reshaped into a 1-dimensional series, and the performances of the models were evaluated using the error metrics.
The developed model was executed each time, employing 1 of the 13 abovementioned AI techniques, once on the limited database and once on the big dataset. Hence, 26 sets of predicted data were obtained.
The residuals of soil temperature, the difference between the actual and the predicted values obtained from each AI model were calculated and are illustrated in Figure 3 as box plots. It makes sense that the closer the residual distribution to zero, the better the model prediction.
A box plot is a graphical method for demonstrating the locality and spread of numerical data. This diagram is a standardized way of displaying the five significant summary numbers of the minimum ( Q 0 .), first quartile ( Q 1 .), median ( Q 2 .), third quartile ( Q 3 ) and maximum ( Q 4 ). Additionally, interquartile range (IQR), the distance between upper and lower quartile ( Q 3 Q 1 ), can be seen from this plot.
Additionally, the graph provides some indication of the symmetry and skewness of the data and shows outliers. Outliers are extreme values that lie at an abnormal distance from other values. Less outliers means that not many points significantly deviate from the rest of the data.
Consequently, investigating the box plots presented in Figure 3 provides helpful information that can be used as an evaluation tool to assess the performances of different AI models in both limited and big datasets.
The closer the median to zero and the smaller the interquartile range, the better the model performance since this indicates that the residuals are mainly distributed around zero. Additionally, fewer outliers are desirable for residuals of an AI model prediction.
Figure 3a demonstrates the box plot of residuals computed by different AI models on the limited dataset. It can be seen from Figure 3a that deep learning residuals have the smallest interquartile range; their median is almost zero, and the absolute value of their maximum and minimum are lower than other models. Therefore, this method has the best performance for predicting soil temperature. Following the deep learning method, the MLP and stacking methods have the least IQR, lowest Q 4 , highest Q 0 and their Q 2 is very close to zero. So, the performance of these two methods is evaluated as effective. On the other hand, the KNN method has the highest IQR, highest Q 4 , lowest Q 0  and its Q 2  is clearly less than zero. Thus, this method did not show an acceptable performance in soil temperature prediction.
Figure 3b demonstrates the box plot of residuals computed by different AI models on the big dataset. It can be seen from Figure 3b that the median of all models is very close to zero. The interquartile ranges of deep learning, MLP and stacking methods are less than the others. Deep learning has the lowest maximum and highest minimum among these three methods. Therefore, deep learning followed by MLP and stacking methods also showed the best performance for big dataset.
Figure 4 is a scatter plot of the predicted soil temperatures computed by applying all different AI methods on ERA5 data, and demonstrates a good fit between the observed values and the models’ predictions. The predicted soil temperatures show a very close match to the identity line in Figure 4a,b. It was determined that all AI models were able to provide reliable soil temperature results for both the limited dataset and big dataset.
The information presented in Figure 4 shows that the size of data in AI models plays a significant role in the correctness of results, and more data lead to more robust and promising results. The correlation between actual and predicted data was 97% for the big dataset, whereas the R-squared value for the limited dataset was found to be 94.5%.

Performance of Developed AI Models

Previous literature reviews show that different researchers employed different AI approaches and developed their models to predict soil temperature. However, among the well-established and advanced AI models, the question of which model is best for making a reasonably precise prediction in a timely manner remains unanswered.
In the current study, thirteen AI models—linear regression, lasso, ridge, Enet, KNN, random forest, gradient boosting, XG boost, support vector machine, stacking, multi-layer perceptron, deep learning and adaptive neuro-fuzzy inference system—were employed to predict soil temperature. The mentioned models were applied to two sets of data with different quantities of information to assess the performance of the various AI models. Meanwhile, the effect of dataset size on the behavior of AI models was evaluated.
To measure the quality of different AI models, the statistical indicators of Equations (9)–(14) were applied, and the results of the error analysis are presented in Table 4 for both limited and big datasets.
As seen in Table 4, R-squared values are very near 1.00 for both limited and big datasets, which shows a strong correlation between the results predicted by different AI models and soil temperature data. The average calculated R-squared for limited and big datasets equals 0.94 and 0.97, respectively. This outcome is confirmed by the scatter plots illustrated in Figure 4 and offers an overall acceptable performance for all AI methods.
Table 4 indicates that, while employing one AI model using two sets of input data, the AI model works better while increasing the quantity of information, leading to a more robust match between the predicted results and soil temperatures. This conclusion is valid for all applied AI models, as shown in Table 4.
An examination of the error values presented in Table 4 shows that the average NRMSE for the limited dataset was 4.5%, while this value equals 2.7% for the big dataset. This proves that using more data significantly improves error measures, and regardless of which AI method is applied, employing more data leads to better results.
Moreover, as shown in Table 4, four models of linear regression, lasso, ridge and Enet, which have linear bases, showed the same error values for all evaluation metrics in both datasets, demonstrating that they had very similar performances.
As previously mentioned in the methodology section, the last three methods have linear bases and are refined versions of classic linear regression due to the addition of regularization terms. Relatively poor MAE, MSE and NRMSE obtained by the linear regression results demonstrated that this method cannot precisely predict soil temperature. At the same time, the same values of MAE, MSE and NRMSE obtained by lasso, ridge and Enet models showed that linear regression modifications were still not appropriate tools for predicting soil temperatures.
The KNN method had the lowest performance among the investigated AI models for the limited database with the greatest MAE, RMSE and NRMSE. Although this method did not show results with the highest error for the big database, it had one of the lowest performances among all the considered AI models, with the greatest maximum error and a high RMSE. This finding returns to the logic behind the KNN method, which does not work in the present study. In this method, a number of nearest neighbors are involved in the model, which does not apply for this prediction since it was more temporal than spatial.
A closer look at the error values presented in Table 4 shows that three AI methods: stacking, MLP and deep learning had a better performance than other models. On the limited dataset, the average MAE for these three AI models is less than 0.5 K, while other AI models had MAE of more than 0.65 K. The situation is the same for the big database. The average MAE for these three AI models is approximately 0.5 K, while other AI models had MAE values of approximately 0.65 K. The other error indicator, RMSE, showed a similar trend. On both datasets, the average RMSE for these three AI models was approximately 0.65 K, while other AI models had a RMSE of approximately 0.85 K.
Although deep learning was the best model, the stacking method, which is an ensemble of a few unadvanced models, showed a good performance and predicted the soil temperature with acceptable precision. This performance was better for the big dataset.
It is worth mentioning that the computation cost should be noted as an essential parameter in picking the best method. The execution time for the limited dataset was negligible, but it was significant for the big pieces of information. The average computation time for the deep learning model was 17.5 s, while these values were 10.5 s and 20.5 s for the MLP and stacking models, respectively. The stacking model suffers from insufficient execution speed, despite showing adequate error metrics.
In the statistical analysis, two concepts of the confidence region and prediction bands are often used. The confidence band represents the uncertainty in an estimate of the regression on the data. The prediction band is the region that contains approximately 95% of the points. If another pair of the actual value-calculated value is taken, there is a 95% chance it falls within the prediction band.
The 95% confidence region and 95% prediction band for these three models—stacking, MLP and deep learning—on both limited and big datasets are depicted in Figure 5. The confidence bands in Figure 5 support the previously mentioned claim regarding the strength of these AI models.

4. Discussion

4.1. Importance of Different Input Variables

As previously described, this study aims to fill one main gap in the literature: determining the most important atmospheric variables to be used as input data for AI models. The literature reviews on soil temperature prediction papers published in the last 10 years show that mostly air temperature was used as the only input parameter in the models.
Although apart from air temperature, other different parameters are involved in the models of published papers, the participation percentage was not that high. In papers published in the last 10 years, the rough participation rate of climate variables as input parameters in soil temperature prediction models is as follows [5,7,8,17,29,35,36,37,38,39,41]: Solar radiation and humidity are involved in 40% of studies; wind and pressure are considered in 25% of papers; and less than 15% of studies explored rainfall, sunshine and dewpoint. Additionally, 30% of the models used monthly parameters and 55% considered parameters on a daily basis.
This information shows that, considering eight climate parameters, including air temperature, precipitation, pressure, evaporation, wind, dewpoint, solar radiation, and thermal radiation, on an hourly basis was not typical in previous investigations. The strategy of this study was to consider as many related parameters as possible, finding the most relevant ones by sensitivity analysis. Following this argument, irrelevant parameters should be disregarded in future studies.
A sensitivity analysis was conducted to determine the importance level and relevance rate of atmospheric parameters used as inputs for the AI models. In this regard, the three selected AI models of stacking, MLP and deep learning, which had better performances, were executed several times. For each run, one of the input parameters was omitted. Then, the code was implemented with the remaining seven variables out of eight preliminary inputs of air temperature, precipitation, surface pressure, evaporation, wind, dewpoint temperature, solar radiation and thermal radiation. The results for the error indicators of the AI model with the remaining seven input parameters are presented in Table 5.
Table 5 shows that omitting air temperature from the input variables of the AI model leads to a low correlation coefficient and high NRMSE. It can be concluded that air temperature is a very relevant variable that is highly important for soil temperature prediction.
The same trend occurred for all three AI models and both limited and big datasets applied in the sensitivity analysis.
The soil layer whose temperature is investigated in the present study is a near-surface layer with a depth of 7 cm underground. The air temperature data used in the present study are air temperature at 2 m above the ground surface. Naturally, this soil layer directly touches the air near the ground surface. So, it is logical that the soil temperature is mainly affected by the air temperature.
When comparing the obtained errors with the original error values and considering all eight input parameters, as presented in Table 4, solar radiation is the most critical variable in soil temperature prediction after air temperature. The next most important variable is evaporation.
Additionally, sensitivity analysis displays that precipitation has a negligible effect on results. So, the precipitation does not play an important role in soil temperature forecast and can be omitted from the prediction models without decreasing precision. The mentioned importance level is the same for all three AI models and in both datasets. The level of importance and relevance of each variable is introduced in the last column.
Another investigation on the effects of individual input parameters on soil temperature prediction was carried out. The correlation of soil temperature computed by the MLP model vs. actual data is calculated in Table 6. Additionally, the scatter plots of predicted results and actual data are demonstrated in Figure 6. The fit lines in Figure 6 scatter plots represent the effect of each individual input climate parameters in soil temperature prediction.
The R-squared presented in Table 6 shows that air temperature and precipitation have the highest and smallest correlation, respectively. This finding confirms that air temperature is the most relevant variable in soil temperature prediction and precipitation can be removed from the input set without significant changes in the accuracy of the results.

4.2. Performance of Developed AI Models in Extreme Heat Events

Since hot warnings are important forecasts used to protect lives and properties, it is essential to ensure the developed prediction models work properly in extremely hot conditions as well. So, the performance of developed AI models in soil temperature prediction has been evaluated in extreme heat events. The model results were investigated to assess whether the models that worked appropriately in ordinary conditions can precisely forecast soil variables in hot weather.
Several studies used several thresholds (from 90% to 99% of the normal distribution) to distinguish extreme events from ordinary ones. Some researchers employed a threshold value based on their knowledge from the region that this value can cause severe consequences. There is no unique definition for extreme threshold in the literature [24].
Herein, to find the extreme heat events, the soil temperature data was sorted in descending order, for both limited and big datasets separately. The upper decile of data would be labelled as extreme events in the considered case. As mentioned in Section 3, the datasets belong to the summer months of 2020. Thus, the upper decile of data is 10 percent of higher temperatures and are the extreme temperatures that soil has experienced during the considered period. Doing that, there would be 74 and 1325 extreme events in limited and big datasets, respectively.
The developed AI models were applied to the upper decile for both limited and big datasets, and soil temperatures in extreme heat events were predicted. The calculated error indicators are presented in Table 7.
It can be seen from Table 7 that from classic regressions to well-established methods to advanced approaches, error indicators have improved. This indicates that predicted results would improve significantly using more advanced AI models like SVM, stacking, MLP and deep learning. Among all employed AI approaches, deep learning and MLP showed the best performance since they had the highest R-squared and the lowest NRMSE. The same pattern can be recognized for the big dataset, in which the two methods of deep learning and MLP presented the finest error indexes. This finding confirms that deep learning followed by MLP methods is not only the best approach for predicting soil temperature in ordinary climate conditions, but also shows robust tools to forecast soil temperature in extremely hot weather.
To better understand the ability of developed AI models for extremely hot weather predictions and compare these outcomes with ordinary climate conditions, soil temperature prediction results for both circumstances are presented in Figure 7. Figure 7b illustrates the NRMSE and R-squared calculated in extreme heat, while Figure 7a demonstrates the same parameters for ordinary conditions. These two graphs reveal that prediction in extreme conditions leads to lower correlation coefficients and higher error for all AI models and both datasets. Figure 7c displays a closer look at NRMSE changes for extreme events and ordinary conditions. It can be seen that, although the error indicator of ordinary conditions is less than for extreme events, advanced models such as deep learning and MLP predict the soil temperature in extremely hot weather with appropriate precision. Similarly, the R-squared value presented in Figure 7d for extreme events and ordinary conditions indicate that the soil temperature predictions in extremely hot weather could reach an acceptable value through advanced models such as deep learning and MLP. However, the R-squared values are lower than those related to ordinary conditions.

4.3. Importance of Different Input Variables in Extreme Heat Events

Similar to the experiments in ordinary weather conditions, a sensitivity analysis was conducted on AI prediction models applied to extreme heat data to realize the importance level of each climate variable that was involved. This analysis was based on omitting one input parameter and investigating the model performance in the absence of that parameter. The calculated results are presented in Table 8.
The error metrics in Table 8 show that the prediction of hot weather confirmed the earlier findings on the importance of air temperature and solar radiation as levels one and two in soil temperature prediction in extreme heat events. Additionally, Table 8 indicates that precipitation has only a slight relevance in soil temperature prediction in extremely hot conditions.

5. Conclusions

A precise and cost-effective model for soil temperature forecasting, which has the advantages of artificial intelligence techniques, is developed in the present research. Therefore, 13 AI models—linear regression, ridge, lasso, Enet, KNN, RF, gradient boosting, XG boosting, stacking method, SVM, MLP, deep learning and ANFIS—were employed to generate a comprehensive and detailed assessment of the performance of different AI approaches in soil temperature estimation. In this regard, eight hourly land and atmospheric variables of air temperature, precipitation, surface pressure, evaporation, wind gust, dewpoint temperature, solar radiation and thermal radiation were employed, and predictions were made using two limited and big datasets. The results show that AI is a promising approach in climate parameter forecast, and developed AI models show a reliable ability in soil temperature prediction. Additionally, applying AI models to more information led to better results, even when using the same method.
The key findings of this study are summarized as follows:
  • Among all 13 AI models applied in the current study, deep learning, followed by the MLP method, showed the best performance in predicting soil temperature with the highest correlation coefficient and lowest error metrics.
  • Although deep learning was the best model, the stacking method showed a good performance with an acceptable precision in soil temperature prediction.
  • A sensitivity analysis shows that air temperature and solar radiation play the most important roles in soil temperature prediction, while precipitation can be neglected in forecast AI models.
  • The evaluation of developed AI models in hot weather confirmed the most successful performance of deep learning and MLP methods in extreme heat events compared to other employed models.
  • The results of extreme heat events show a moderate decrease in performance compared to the models’ outcomes for the ordinary weather conditions. This reduction is more meaningful for classic regression rather than advanced AI models.
  • A sensitivity analysis of involved variables for predictions in hot weather confirmed the earlier findings of the importance level of air temperature, solar radiation and precipitation in soil temperature prediction in extreme hot events.

Author Contributions

Conceptualization, J.H.C., A.M., H.S. and P.P.; methodology, H.I.; software, H.I.; validation, H.I. and P.P.; formal analysis, H.I. and P.P.; investigation, H.I.; resources, H.I.; data curation, H.I.; writing—original draft preparation, H.I. and A.M.; writing—review and editing J.H.C., P.P., H.S. and A.M.; visualization, H.I.; supervision, A.M. and J.H.C.; project administration, A.M., J.H.C. and H.S.; funding acquisition, A.M., H.S. and J.H.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by National Research Council Canada through the Artificial Intelligence for Logistics Supercluster Support Program, grant number AI4L-120.

Data Availability Statement

Parts of the data used in this manuscript are available through the corresponding author upon reasonable request.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Hao, H.; Yu, F.; Li, Q. Soil Temperature Prediction Using Convolutional Neural Network Based on Ensemble Empirical Mode Decomposition. IEEE Access 2021, 9, 4084–4096. [Google Scholar] [CrossRef]
  2. Yu, F.; Hao, H.; Li, Q. An Ensemble 3D Convolutional Neural Network for Spatiotemporal Soil Temperature Forecasting. Sustainability 2021, 13, 9174. [Google Scholar] [CrossRef]
  3. Alizamir, M.; Kisi, O.; Ahmed, A.N.; Mert, C.; Fai, C.M.; Kim, S.; Kim, N.W.; El-Shafie, A. Advanced machine learning model for better prediction accuracy of soil temperature at different depths. PLoS ONE 2020, 15, e0231055. [Google Scholar] [CrossRef] [Green Version]
  4. Seifi, A.; Ehteram, M.; Nayebloei, F.; Soroush, F.; Gharabaghi, B.; Haghighi, A.T. GLUE uncertainty analysis of hybrid models for predicting hourly soil temperature and application wavelet coherence analysis for correlation with meteorological variables. Soft Comput. 2021, 25, 10723–10748. [Google Scholar] [CrossRef]
  5. Abimbola, O.P.; Meyer, G.E.; Mittelstet, A.R.; Rudnick, D.R.; Franz, T.E. Knowledge-guided machine learning for improving daily soil temperature prediction across the United States. Vadose Zone J. 2021, 20, e20151. [Google Scholar] [CrossRef]
  6. Zeynoddin, M.; Ebtehaj, I.; Bonakdari, H. Development of a linear based stochastic model for daily soil temperature prediction: One step forward to sustainable agriculture. Comput. Electron. Agric. 2020, 176, 105636. [Google Scholar] [CrossRef]
  7. Feng, Y.; Cui, N.; Hao, W.; Gao, L.; Gong, D. Estimation of soil temperature from meteorological data using different machine learning models. Geoderma 2019, 338, 67–77. [Google Scholar] [CrossRef]
  8. Mehdizadeh, S.; Fathian, F.; Safari, M.J.S.; Khosravi, A. Developing novel hybrid models for estimation of daily soil temperature at various depths. Soil Tillage Res. 2020, 197, 104513. [Google Scholar] [CrossRef]
  9. Bonakdari, H.; Moeeni, H.; Ebtehaj, I.; Zeynoddin, M.; Mahoammadian, A.; Gharabaghi, B. New insights into soil temperature time series modeling: Linear or nonlinear? Arch. Meteorol. Geophys. Bioclimatol. Ser. B 2019, 135, 1157–1177. [Google Scholar] [CrossRef]
  10. George, R.K. Prediction of soil temperature by using artificial neural networks algorithms. Nonlinear Anal. Theory Methods Appl. 2001, 47, 1737–1748. [Google Scholar] [CrossRef]
  11. Bilgili, M. Prediction of soil temperature using regression and artificial neural network models. Arch. Meteorol. Geophys. Bioclimatol. Ser. B 2010, 110, 59–70. [Google Scholar] [CrossRef]
  12. Ozturk, M.; Salman, O.; Koc, M. Artificial neural network model for estimating the soil temperature. Can. J. Soil Sci. 2011, 91, 551–562. [Google Scholar] [CrossRef]
  13. Abyaneh, H.Z.; Varkeshi, M.B.; Golmohammadi, G.; Mohammadi, K. Soil temperature estimation using an artificial neural network and co-active neuro-fuzzy inference system in two different climates. Arab. J. Geosci. 2016, 9, 377. [Google Scholar] [CrossRef]
  14. Citakoglu, H. Comparison of artificial intelligence techniques for prediction of soil temperatures in Turkey. Arch. Meteorol. Geophys. Bioclimatol. Ser. B 2017, 130, 545–556. [Google Scholar] [CrossRef]
  15. Himika Kaur, S.; Randhawa, S. Global Land Temperature Prediction by Machine Learning Combo Approach. In Proceedings of the 9th International Conference on Computing, Communication and Networking Technologies, Bengaluru, India, 10–12 July 2018; pp. 1–8. [Google Scholar]
  16. Delbari, M.; Sharifazari, S.; Mohammadi, E. Modeling daily soil temperature over diverse climate conditions in Iran—A comparison of multiple linear regression and support vector regression techniques. Arch. Meteorol. Geophys. Bioclimatol. Ser. B 2019, 135, 991–1001. [Google Scholar] [CrossRef]
  17. Li, C.; Zhang, Y.; Ren, X. Modeling Hourly Soil Temperature Using Deep BiLSTM Neural Network. Algorithms 2020, 13, 173. [Google Scholar] [CrossRef]
  18. Penghui, L.; Ewees, A.A.; Beyaztas, B.H.; Qi, C.; Salih, S.Q.; Al-Ansari, N.; Bhagat, S.K.; Yaseen, Z.M.; Singh, V.P. Metaheuristic Optimization Algorithms Hybridized With Artificial Intelligence Model for Soil Temperature Prediction: Novel Model. IEEE Access 2020, 8, 51884–51904. [Google Scholar] [CrossRef]
  19. Shamshirband, S.; Esmaeilbeiki, F.; Zarehaghi, D.; Neyshabouri, M.; Samadianfard, S.; Ghorbani, M.A.; Mosavi, A.; Nabipour, N.; Chau, K.-W. Comparative analysis of hybrid models of firefly optimization algorithm with support vector machines and multilayer perceptron for predicting soil temperature at different depths. Eng. Appl. Comput. Fluid Mech. 2020, 14, 939–953. [Google Scholar] [CrossRef]
  20. O’Gorman, P.A.; Dwyer, J.G. Using Machine Learning to Parameterize Moist Convection: Potential for Modeling of Climate, Climate Change, and Extreme Events. J. Adv. Model. Earth Syst. 2018, 10, 2548–2563. [Google Scholar] [CrossRef] [Green Version]
  21. Hu, H.; Ayyub, B.M. Machine Learning for Projecting Extreme Precipitation Intensity for Short Durations in a Changing Climate. Geosciences 2019, 9, 209. [Google Scholar] [CrossRef] [Green Version]
  22. Qi, D.; Majda, A.J. Using machine learning to predict extreme events in complex systems. Proc. Natl. Acad. Sci. USA 2020, 117, 52–59. [Google Scholar] [CrossRef] [Green Version]
  23. Huang, L.; Kang, J.; Wan, M.; Fang, L.; Zhang, C.; Zeng, Z. Solar Radiation Prediction Using Different Machine Learning Algorithms and Implications for Extreme Climate Events. Front. Earth Sci. 2021, 9, 596860. [Google Scholar] [CrossRef]
  24. Araújo, A.D.S.; Silva, A.R.; Zárate, L.E. Extreme precipitation prediction based on neural network model—A case study for southeastern Brazil. J. Hydrol. 2022, 606, 127454. [Google Scholar] [CrossRef]
  25. Bochenek, B.; Ustrnul, Z. Machine Learning in Weather Prediction and Climate Analyses—Applications and Perspectives. Atmosphere 2022, 13, 180. [Google Scholar] [CrossRef]
  26. Google Maps. Available online: https://www.google.ca/maps/@45.3759264,-75.7182361,11.33z (accessed on 1 July 2021).
  27. Hersbach, H.; Bell, B.; Berrisford, P.; Biavati, G.; Horányi, A.; Muñoz Sabater, J.; Nicolas, J.; Peubey, C.; Radu, R.; Rozum, I.; et al. ERA5 hourly data on single levels from 1979 to present. Copernicus Climate Change Service (C3S) Climate Data Store (CDS). 2018. Available online: https://doi.org/10.24381/cds.adbb2d47 (accessed on 1 July 2021).
  28. Tabari, H.; Sabziparvar, A.-A.; Ahmadi, M. Comparison of artificial neural network and multivariate linear regression methods for estimation of daily soil temperature in an arid region. Arch. Meteorol. Geophys. Bioclimatol. Ser. B 2011, 110, 135–142. [Google Scholar] [CrossRef]
  29. Tüysüzoğlu, G.; Birant, D.; Kiranoglu, V. Soil Temperature Prediction via Self-Training: Izmir Case. J. Agric. Sci. 2022, 28, 47–62. [Google Scholar] [CrossRef]
  30. Dong, J.; Huang, G.; Wu, L.; Liu, F.; Li, S.; Cui, Y.; Wang, Y.; Leng, M.; Wu, J.; Wu, S. Modelling Soil Temperature by Tree-Based Machine Learning Methods in Different Climatic Regions of China. Appl. Sci. 2022, 12, 5088. [Google Scholar] [CrossRef]
  31. Quan, Q.; Hao, Z.; Xifeng, H.; Jingchun, L. Research on water temperature prediction based on improved support vector regression. Neural Comput. Appl. 2020, 34, 8501–8510. [Google Scholar] [CrossRef]
  32. Radhika, Y.; Shashi, M. Atmospheric Temperature Prediction using Support Vector Machines. Int. J. Comput. Theory Eng. 2009, 55–58. [Google Scholar] [CrossRef] [Green Version]
  33. Mehdizadeh, S.; Behmanesh, J.; Khalili, K. Comprehensive modeling of monthly mean soil temperature using multivariate adaptive regression splines and support vector machine. Arch. Meteorol. Geophys. Bioclimatol. Ser. B 2018, 133, 911–924. [Google Scholar] [CrossRef]
  34. Malik, A.; Tikhamarine, Y.; Sihag, P.; Shahid, S.; Jamei, M.; Karbasi, M. Predicting daily soil temperature at multiple depths using hybrid machine learning models for a semi-arid region in Punjab, India. Environ. Sci. Pollut. Res. 2022, 1–20. [Google Scholar] [CrossRef] [PubMed]
  35. Cho, D.; Yoo, C.; Im, J.; Lee, Y.; Lee, J. Improvement of spatial interpolation accuracy of daily maximum air temperature in urban areas using a stacking ensemble technique. GIScience Remote Sens. 2020, 57, 633–649. [Google Scholar] [CrossRef]
  36. Bayatvarkeshi, M.; Bhagat, S.K.; Mohammadi, K.; Kisi, O.; Farahani, M.; Hasani, A.; Deo, R.; Yaseen, Z.M. Modeling soil temperature using air temperature features in diverse climatic conditions with complementary machine learning models. Comput. Electron. Agric. 2021, 185, 106158. [Google Scholar] [CrossRef]
  37. Wang, X.; Li, W.; Li, Q. A New Embedded Estimation Model for Soil Temperature Prediction. Sci. Program. 2021, 2021, 5881018. [Google Scholar] [CrossRef]
  38. Samadianfard, S.; Ghorbani, M.A.; Mohammadi, B. Forecasting soil temperature at multiple-depth with a hybrid artificial neural network model coupled-hybrid firefly optimizer algorithm. Inf. Process. Agric. 2018, 5, 465–476. [Google Scholar] [CrossRef]
  39. Maduako, I.; Ebinne, E.; Zhang, Y.; Bassey, P. Prediction of Land Surface Temperature (LST) Changes within Ikom City in Nigeria Using Artificial Neural Network (ANN). Int. J. Remote Sens. Appl. 2016, 6, 96. [Google Scholar] [CrossRef]
  40. Kim, P. MATLAB Deep Learning: With Machine Learning, Neural Networks and Artificial Intelligence; Apress: Seoul, Korea, 2017; pp. 103–120. [Google Scholar]
  41. Sada, S.; Ikpeseni, S. Evaluation of ANN and ANFIS modeling ability in the prediction of AISI 1050 steel machining performance. Heliyon 2021, 7, e06136. [Google Scholar] [CrossRef]
  42. Mustafa, E.K.; Co, Y.; Liu, G.; Kaloop, M.R.; Beshr, A.A.; Zarzoura, F.; Sadek, M. Study for Predicting Land Surface Temperature (LST) Using Landsat Data: A Comparison of Four Algorithms. Adv. Civ. Eng. 2020, 2020, 7363546. [Google Scholar] [CrossRef]
  43. Gholami, A.; Bonakdari, H.; Ebtehaj, I.; Mohammadian, M.; Gharabaghi, B.; Khodashenas, S.R. Uncertainty analysis of intelligent model of hybrid genetic algorithm and particle swarm optimization with ANFIS to predict threshold bank profile shape based on digital laser approach sensing. Measurement 2018, 121, 294–303. [Google Scholar] [CrossRef]
Figure 1. Location of (a) the site (Ottawa) considered in the present study, (b) six stations representing Ottawa, (c) one selected station.
Figure 1. Location of (a) the site (Ottawa) considered in the present study, (b) six stations representing Ottawa, (c) one selected station.
Sustainability 14 08065 g001
Figure 2. Algorithm of the developed numerical model in the present study.
Figure 2. Algorithm of the developed numerical model in the present study.
Sustainability 14 08065 g002
Figure 3. Box plots of soil temperature residuals computed for different AI models on (a) limited dataset; (b) big dataset.
Figure 3. Box plots of soil temperature residuals computed for different AI models on (a) limited dataset; (b) big dataset.
Sustainability 14 08065 g003
Figure 4. Scatter plots of predicted and observed soil temperature using different AI models: (a) limited dataset; (b) big dataset.
Figure 4. Scatter plots of predicted and observed soil temperature using different AI models: (a) limited dataset; (b) big dataset.
Sustainability 14 08065 g004
Figure 5. Confidence regions and prediction bands of different AI models (a) limited dataset (b) big dataset.
Figure 5. Confidence regions and prediction bands of different AI models (a) limited dataset (b) big dataset.
Sustainability 14 08065 g005aSustainability 14 08065 g005b
Figure 6. Scatter plots of individual input parameters on soil temperature prediction versus actual data (a) with all inputs (b) only precipitation (c) only pressure (d) only evaporation (e) only wind (f) only dewpoint (g) only solar radiation (h) only thermal radiation (i) only air temperature.
Figure 6. Scatter plots of individual input parameters on soil temperature prediction versus actual data (a) with all inputs (b) only precipitation (c) only pressure (d) only evaporation (e) only wind (f) only dewpoint (g) only solar radiation (h) only thermal radiation (i) only air temperature.
Sustainability 14 08065 g006
Figure 7. Comparison of error index of predicted soil temperature in ordinary climate conditions and extremely hot events for both limited and big datasets: (a) error index in ordinary climate condition; (b) error index in extremely hot events; (c) NRMSE comparison; and (d) R-squared comparison.
Figure 7. Comparison of error index of predicted soil temperature in ordinary climate conditions and extremely hot events for both limited and big datasets: (a) error index in ordinary climate condition; (b) error index in extremely hot events; (c) NRMSE comparison; and (d) R-squared comparison.
Sustainability 14 08065 g007
Table 1. Coordinates of considered stations in city of Ottawa.
Table 1. Coordinates of considered stations in city of Ottawa.
Station No.LatitudeLongitudeStation No.LatitudeLongitude
#145.25° N75.50° W#445.50° N75.50° W
#245.25° N75.75° W#545.50° N75.75° W
#345.25° N76.00° W#645.50° N76.00° W
Table 2. Results of sensitivity analysis of hyperparameter α in Enet model.
Table 2. Results of sensitivity analysis of hyperparameter α in Enet model.
Hyperparameter   α 1E-25E-31E-35E-42E-41E-41E-51E-10
NRMSE0.048070.046930.046280.046230.046200.046190.046180.04618
R293.95%94.23%94.39%94.40%94.41%94.41%94.41%94.41%
NRMSE
difference
-−2.43%−1.40%−0.11%−0.06%−0.02%−0.02%0.00%
R2
difference
-0.30%0.17%0.01%0.01%0.00%0.00%0.00%
Table 3. Checking overfitting and cross validation.
Table 3. Checking overfitting and cross validation.
Accuracy ScoreLinearLassoRidgeEnetKNNRFGradient BoostingXG BoostSVMStackingMLPDeep LearningANFIS
Training R20.960.960.960.960.960.990.990.990.990.980.980.980.96
Testing R20.940.940.940.940.910.940.950.940.970.960.960.970.94
Mean K-fold CV0.950.950.950.950.890.950.960.950.970.960.960.960.95
Sdev K-fold CV0.010.010.010.010.030.020.010.020.010.010.010.010.01
Table 4. Error analysis of predicted soil temperature values using different AI models.
Table 4. Error analysis of predicted soil temperature values using different AI models.
Size of
Dataset
AI ModelsMaxE
(K)
MAE
(K)
MSE
(K2)
RMSE
(K)
NRMSE
(-)
R2
(-)
Limited DatasetLinear2.310.630.650.814.6%0.94
Lasso2.310.630.650.814.6%0.94
Ridge2.310.630.650.814.6%0.94
Enet2.310.630.650.814.6%0.94
KNN3.210.811.091.046.0%0.91
RF3.230.650.750.864.9%0.94
Gradient Boosting3.080.580.620.794.5%0.95
XG Boost2.840.610.660.814.7%0.94
SVM2.420.640.650.814.6%0.94
Stacking2.220.510.450.673.9%0.96
MLP2.120.50.440.673.8%0.96
Deep Learning2.040.460.390.623.6%0.97
ANFIS2.20.620.650.814.6%0.94
Big DatasetLinear3.890.740.950.973.3%0.96
Lasso3.900.740.950.983.3%0.96
Ridge3.890.740.950.973.3%0.96
Enet3.890.740.950.973.3%0.96
KNN6.060.600.690.832.8%0.97
RF3.790.530.500.712.4%0.98
Gradient Boosting3.530.530.480.692.3%0.98
XG Boost3.140.520.460.682.3%0.98
SVM4.790.530.510.712.4%0.98
Stacking4.280.490.430.662.2%0.98
MLP4.320.510.450.672.3%0.98
Deep Learning3.440.510.440.662.2%0.98
ANFIS8.990.740.970.983.3%0.96
Table 5. Sensitivity analysis of input variables for AI models.
Table 5. Sensitivity analysis of input variables for AI models.
AI ModelOmitted VariableMaxEMAEMSERMSENRMSER2Importance
Stacking, Limited dataprecipitation2.220.500.440.663.8%0.968
pressure2.390.560.510.724.1%0.96
evaporation2.290.560.560.754.3%0.95
wind2.160.530.480.693.9%0.96
dewpoint2.220.520.480.694.0%0.96
solar radiation2.430.600.610.784.5%0.952
thermal radiation2.120.520.460.683.9%0.96
air temperature7.311.393.241.8010.3%0.721
MLP, Limited dataprecipitation1.980.490.420.653.7%0.968
pressure2.170.530.460.683.9%0.96
evaporation2.320.540.520.724.1%0.95
wind2.120.530.470.693.9%0.96
dewpoint1.930.500.450.673.8%0.96
solar radiation2.210.580.590.774.4%0.952
thermal radiation2.190.520.460.683.9%0.96
air temperature5.921.202.501.589.0%0.791
Deep Learning, Limited dataprecipitation2.090.500.430.663.8%0.967
pressure2.180.520.450.673.9%0.96
evaporation2.160.520.490.704.0%0.96
wind2.010.530.500.704.0%0.96
dewpoint2.270.490.450.673.9%0.96
solar radiation2.510.590.610.784.5%0.952
thermal radiation2.290.490.420.653.7%0.968
air temperature5.691.332.931.719.8%0.751
Stacking, Big dataprecipitation4.160.490.430.662.2%0.988
pressure4.210.520.470.682.3%0.98
evaporation3.760.540.540.732.5%0.98
wind3.800.540.530.732.4%0.98
dewpoint3.990.530.510.712.4%0.98
solar radiation4.230.590.640.802.7%0.972
thermal radiation4.260.520.490.702.4%0.98
air temperature10.241.192.781.675.6%0.881
MLP, Big dataprecipitation3.820.530.490.702.3%0.988
pressure4.270.530.490.702.4%0.98
evaporation4.100.600.640.802.7%0.97
wind3.880.580.590.772.6%0.97
dewpoint3.820.590.620.792.6%0.97
solar radiation4.340.650.740.862.9%0.972
thermal radiation4.130.560.550.742.5%0.98
air temperature10.501.323.191.786.0%0.861
Deep Learning, Big dataprecipitation3.940.520.460.682.3%0.988
pressure4.330.520.460.682.3%0.98
evaporation3.740.570.580.762.6%0.97
wind3.710.580.580.762.6%0.97
dewpoint3.580.570.540.732.5%0.98
solar radiation4.430.610.650.812.7%0.972
thermal radiation3.840.520.480.692.3%0.98
air temperature10.031.282.961.725.8%0.871
Table 6. Effects of individual input parameters on soil temperature prediction.
Table 6. Effects of individual input parameters on soil temperature prediction.
Input VariableR2
all 8 parameters96.7%
precipitation1.07%
pressure10.9%
evaporation34.5%
wind24.1%
dewpoint19.9%
solar radiation28.5%
thermal radiation13.3%
air temperature91.7%
Table 7. Error analysis of predicted soil temperature in extremely hot events using different AI models.
Table 7. Error analysis of predicted soil temperature in extremely hot events using different AI models.
Size of
Dataset
AI ModelsMaxE
(K)
MAE
(K)
MSE
(K2)
RMSE
(K)
NRMSE
(-)
R2
(-)
Limited DatasetLinear2.500.700.750.8713.2%0.67
Lasso2.500.700.750.8713.2%0.67
Ridge2.500.700.750.8713.2%0.67
Enet2.500.700.750.8713.2%0.67
KNN1.900.710.750.8613.2%0.67
RF2.310.620.630.7912.1%0.72
Gradient Boosting2.440.650.700.8412.8%0.69
XG Boost1.790.680.740.8613.1%0.68
SVM1.860.550.520.7211.0%0.77
Stacking2.100.560.520.7211.0%0.77
MLP2.120.520.450.6710.2%0.80
Deep Learning2.060.510.440.6610.1%0.81
Big DatasetLinear3.420.670.730.868.7%0.76
Lasso3.420.670.730.868.7%0.76
Ridge3.420.670.730.868.7%0.76
Enet3.420.670.730.868.7%0.76
KNN3.340.560.550.747.5%0.82
RF4.120.550.520.727.3%0.83
Gradient Boosting4.370.560.530.737.4%0.82
XG Boost4.230.540.510.727.3%0.83
SVM3.570.520.470.697.0%0.84
Stacking3.960.520.480.697.0%0.84
MLP3.010.500.420.656.6%0.86
Deep Learning3.010.490.410.646.5%0.86
Table 8. Sensitivity analysis of input variables in extremely hot events.
Table 8. Sensitivity analysis of input variables in extremely hot events.
AI ModelOmitted VariableMaxEMAEMSERMSENRMSER2Importance
MLP, Limited Data,
extremely hot events
precipitation2.200.530.460.6810.4%0.807
pressure2.220.520.480.6910.5%0.79
evaporation2.110.510.420.649.8%0.828
wind2.380.530.460.6810.4%0.80
dewpoint2.090.530.480.6910.6%0.79
solar radiation2.130.560.530.7311.1%0.772
thermal radiation2.050.550.500.7110.8%0.78
air temperature3.710.991.551.2419.0%0.321
MLP, Big Data,
extremely hot events
precipitation3.610.540.480.697.0%0.848
pressure3.240.540.490.707.1%0.84
evaporation3.720.540.500.717.2%0.83
wind3.720.530.500.707.1%0.83
dewpoint3.360.570.550.747.5%0.82
solar radiation3.330.570.560.757.6%0.812
thermal radiation3.080.530.470.697.0%0.84
air temperature7.411.081.911.3814.0%0.361
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Imanian, H.; Hiedra Cobo, J.; Payeur, P.; Shirkhani, H.; Mohammadian, A. A Comprehensive Study of Artificial Intelligence Applications for Soil Temperature Prediction in Ordinary Climate Conditions and Extremely Hot Events. Sustainability 2022, 14, 8065. https://doi.org/10.3390/su14138065

AMA Style

Imanian H, Hiedra Cobo J, Payeur P, Shirkhani H, Mohammadian A. A Comprehensive Study of Artificial Intelligence Applications for Soil Temperature Prediction in Ordinary Climate Conditions and Extremely Hot Events. Sustainability. 2022; 14(13):8065. https://doi.org/10.3390/su14138065

Chicago/Turabian Style

Imanian, Hanifeh, Juan Hiedra Cobo, Pierre Payeur, Hamidreza Shirkhani, and Abdolmajid Mohammadian. 2022. "A Comprehensive Study of Artificial Intelligence Applications for Soil Temperature Prediction in Ordinary Climate Conditions and Extremely Hot Events" Sustainability 14, no. 13: 8065. https://doi.org/10.3390/su14138065

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop