Introduction

Hydraulic conductivity (K) is one of the important physical properties of soil which depends on soil pores continuity, tortuosity and distribution (Mossadeghi-Björklund et al. 2016). Irrigation with low-quality waters is common in arid and semiarid regions and may reduce the soil hydraulic conductivity. Swelling, aggregate failure, pore-size reduction, partial blocking and dispersion of clays are induced by the irrigation with low-quality waters and ultimately affect the soil hydraulic conductivity (Bagarello et al. 2006; Bourazanis et al. 2016). It was reported that K is very sensitive indicator to detect changes in soil porosity caused by sodicity increment (Keren and Ben-Hur 2003). An increase in soil sodium adsorption ratio (SAR), by effluent irrigation, resulted in enhanced clay swelling and dispersion and decreased the saturated hydraulic conductivity (Ks) (Lado and Ben-Hur 2009; Bourazanis et al. 2016), aggregate stability, and surface crusting and low-quality tilth (Suarez et al. 2006). In the absence of electrolytes, the impact of fast wetting (slaking) and swelling on the hydraulic conductivity was most notable, mainly at the intermediate sodicity levels (ESP = 5–10) (Levy et al. 2005). The use of saline water significantly reduced the impact of fast wetting and swelling on the hydraulic conductivity. Results suggested that combined effects of salinity, wetting rate and sodicity on the hydraulic conductivity were complex and should thus be considered simultaneously when estimating soil hydraulic conductivity (Levy et al. 2005).

Artificial neural networks

Artificial neural networks (ANNs) have been extensively employed as an artificial intelligence method for modeling and prediction purposes. The ANN uses simple processing elements named neurons which have been related to special arrangement. An ANN tries to discover the inherent relationships between input and output parameters through learning process. Hidden layer(s) process the input data from input layer and produce answer in output layer. Each network is trained with real patterns. During this process, the connection weights between layers are changed until the errors between predicted values and the target (experimental values) are reduced to a permissible value (Heristev 1998).

Multilayer perceptron (MLP) networks are the most robust and popular types of ANNs for prediction of variables in engineering sciences (Raheli et al. 2017). Two well-known types of MLP networks are FFBP and CFBP (Kaveh et al. 2017). LM and BR are the best training algorithms with the lowest training epoch (Love 2017). These algorithms are the newest methods for training of the MLP networks (Chayjan and Esna-Ashari 2010). Advantages and features of FFBP and CFBP networks and LM and BR algorithms are described in the sections of “Network types” and “Training algorithms.”

Network types

  1. (a)

    Feed-forward back propagation (FFBP): This network consists of one input layer, one or several hidden layers and one output layer. Usually, back-propagation (BP) learning algorithm is used to train this network (which finally results in learning). During the training of this network, calculations were carried out from input of network toward the output, and then, the values of error were propagated to prior layers. Output calculations were carried out by layer to layer, and the output of each layer is the input of next layer (Demuth et al. 2007).

  2. (b)

    Cascade-forward back propagation (CFBP): This network like FFBP network uses the BP algorithm for updating weights, but the main characteristic of this network is that each layer’s neuron is related to all the previous layer neurons.

Training algorithms

Two training algorithms are used for updating the network weights. These algorithms are Levenberg–Marquardt (LM) and Bayesian regulation (BR) algorithms:

  1. (a)

    LM algorithm: The LM algorithm is a Hessian-based algorithm for nonlinear least squares optimization. Hessian-based algorithms allow the network to learn features of a complicated mapping more suitably. The training process converges quickly as the solution is approached, because the Hessian does not vanish at the solution.

  2. (b)

    Bayesian regularization (BR) algorithm: In this algorithm, instead of the sum of squared error (SSE) on the training set, a cost function, which is the SSE plus a penalty term, is automatically adjusted (Girosi et al. 1995).

The ANNs have been extensively employed in soil science as pedotransfer functions (PTFs) for prediction of hardly available properties using easily available properties. With adequate and sensitive data, ANN can be used to estimate, for example, Ks, using easily available soil properties such as sand, silt, and clay content, bulk density, and organic carbon content (Agyare et al. 2006). Parasuraman et al. (2006) compared the performance of the field-scale PTFs with an available ANN program and Rosetta methods, namely bagging and boosting in estimating Ks. They showed that the field-scale models performed better than Rosetta. The ANN model employing the boosting algorithm results in better generalization by reducing both the bias and variance of the ANN models. Lim and Kolay (2009) compared Shepard’s equation and ANN method for estimation of K. The results showed that the trained network consistently produced most accurate predictions (R2 = 0.8493). The study of Erzin et al. (2009) deals with development of ANNs and multiple regression analysis (MRA) models for predicting hydraulic conductivity of fine-grained soils. The ANN models better predicted the K than the MRA models based on selected performance indices. It was demonstrated that the developed ANN models could be employed for predicting hydraulic conductivity of compacted fine-grained soils quite efficiently.

Quality of irrigation waters is usually low (i.e., high EC and/or SAR) in most arid and semiarid regions (Emdad et al. 2004). There are few documentations about the influences of water quality on soil hydraulic properties, but the information on the impacts of water quality on calcareous soils which are widespread in Iran is scanty. Moreover, water quality effects on soil hydraulic properties were rarely predicted using ANNs so far. The objectives of this study were: (1) to assess the effect of water quality on saturated hydraulic conductivity (Ks) of two clay and sandy clay loam soils from western Iran, and (2) to predict the effect of soil type and water quality on Ks using regression and ANNs methods.

Materials and methods

Soils and water quality treatments

Two non-saline and non-sodic agricultural soils were selected in Hamadan province, western Iran. The soil samples were carefully collected at a suitable water content from 0 to 30 cm layer to avoid the destruction of soil aggregates. Some of the samples were air-dried, ground and passed through a 2-mm mesh sieve. Particle size distribution was determined using the hydrometer. Particle density was measured by the pycnometer method (Klute 1986). Soil electrical conductivity (EC) and pH were determined with an EC meter (Metrohm 712) and a pH meter (Metrohm 744) using 1:5 soil/water suspension, respectively. Carbonate content was measured using the back-titration method. Organic matter content was determined using the wet-digestion method (Page et al. 1992). Some physical and chemical properties of the soils are given in Table 1.

Table 1 Physical properties of the studied soils

Water quality treatments comprised all combinations of water EC (ECw) values of 0.5, 2, 4 and 8 dS m−1 and SARw values of 1, 5, 13 and 18 (meq l−1)0.5 (in total 16 solutions). Pure NaCl and CaCl2 salts (Merk) were used to prepare the solutions. Distilled water was used as control. The following two equations are used to prepare the solutions with desired ECw and SARw:

$${\text{TA}}_{\text{w}} = {\text{TC}}_{\text{w}} = 10 \times {\text{EC}}_{\text{w}}$$
(1)
$${\text{SAR}}_{\text{w}} = \frac{{\left[ {{\text{Na}}^{ + } } \right]}}{{\sqrt {\frac{{{\text{Ca}}^{2 + } }}{2}} }}$$
(2)

where TAw and TCw refer to total anion and total cation concentrations both in meq l−1 and [Na+] and [Ca2+] stand for concentrations (meq l−1) of sodium and calcium ions in the solutions. Equations (1) and (2) are solved with the mentioned ECw and SARw values to calculate [Na+] and [Ca2+] and the amounts of NaCl and CaCl2 salts and to prepare the 16 solutions. The ECw of the prepared solutions was tested for correctness of calculations and checking purity of the salts.

Soil preparation

Some of the collected soils were air-dried and sieved through 2-mm mesh without grinding and/or breaking the soil aggregates in order to preserve the micro-aggregates in the soil mass. The soils were packed into cylinders (with 7 cm height and 5 cm diameter) to 6 cm thickness and to have an initial similar void ratio of 1.2 (i.e., porosity of 0.55). The initial pore volume (PV) of all the soil samples was 76.6 cm3. In total, 16 solutions × 2 soil types in three replicates (in total 96 soil cores) were prepared.

Leaching setup and saturated hydraulic conductivity measurement

All of the soil columns were initially saturated by distilled water. The Ks of the soil columns was measured using the constant-head method (Levy et al. 1999). The constant head on the columns was maintained using the Marriott burette technique. The solution reservoir was filled with a solution having specific ECw and SARw, and the leaching was started to monitor the effect of water quality on the Ks during the leaching time.

The Ks (cm h−1) is calculated using the Darcy’s equation as follows:

$$K_{\text{s}} = \frac{{V_{\text{w}} }}{{A\Delta t}} \times \frac{L}{{\Delta \psi_{\text{h}} }}$$
(3)

where Vw is the cumulative volume (cm3) of effluent in the time interval (Δt, h), A is the cross-sectional area (cm2) of soil column, Δψh is the difference in hydraulic potential (cm) between top and bottom of the soil column and L is the length (cm) of soil column.

The leaching was continued for four times of soil column PV (4PV) or cumulative effluent volume of 306.4 cm3. The Ks variation was measured with 0.25PV intervals.

In order to compare the effect of different treatments (soil type and water quality) on the hydraulic conductivity, relative hydraulic conductivity (Kr), as calculated using Eq. (4), is used:

$$K_{\text{r}} = \frac{{K_{\text{s}} }}{{K_{{{\text{s}}0}} }}$$
(4)

where Ks0 is the saturated hydraulic conductivity at the beginning of leaching (i.e., at effluent volume of 0.25PV) as used by Green et al. (2003). The Kr values were also drawn versus PV.

Artificial neural networks

Structures and designing

Considering four inputs in all experiments (ECw, SARw, soil texture or TEX and PV), the Ks and Kr values were derived for different conditions. Networks for Ks prediction with four neurons in the input layer (i.e., ECw, SARw, TEX and PV) and one neuron in the output layer (Ks) were designed. Neural network toolbox of MATLAB software was used in this study (Sivanandam et al. 2006).

In order to obtain the desired answer, two networks of FFBP and CFBP for Ks prediction were utilized. Training process for these Ks networks was iterative. When the error between desired and predicted values became minimum, training process meets the stability. The increasing method was used for selecting layers and neurons for evaluation of various topologies. The increasing method has some advantages which are: (a) the network complexity gradually increases with increasing neurons; (b) the optimum size of the network always obtains by adjustments; and (c) monitoring and evaluation of local minimum carry out during the training process. Various threshold functions were used to reach the optimized status (Demuth et al. 2007):

$$Y_{j} = \frac{1}{{1 + \exp ( - X_{j} )}}\quad ({\text{LOGSIG}})$$
(5)
$$Y_{j} = \frac{1}{{\left( {1 + \exp ( - 2X_{j} )} \right) - 1}}\quad ({\text{TANSIG}})$$
(6)
$$Y_{j} = X_{j} \quad \left( {\text{PURELIN}} \right)$$
(7)

where Xj is the sum of weighed inputs for each neuron in jth layer and computed as below:

$$X_{j} = \sum\limits_{i = 1}^{m} {W_{ij} \times Y_{j} + b_{j} }$$
(8)

where m is the number of output layer neurons, Wij the weight between ith and jth layers, Yi the ith neuron output and bj bias of jth neuron for FFBP and CFBP networks. Experimental data of Ks and Kr were selected for training network with suitable topology and training algorithm and for testing of trained network.

The following criterion of root-mean-square error has defined to minimize the training error (Demuth et al. 2007):

$${\text{MSE}} = \frac{1}{\text{MN}}\sum\limits_{p = 1}^{M} {\sum\limits_{i = 1}^{N} {\left( {S_{i} - T_{ip} } \right)} }^{2}$$
(9)

where MSE is the mean square error, Sip the network output in ith neuron and pth pattern, Tip the target output at ith neuron and pth pattern, N the number of output neurons and M the number of training patterns. To optimize the selected network from prior stage, the secondary criteria were used as follows:

$$R^{2} = - \frac{{\sum\nolimits_{k = 1}^{n} {\left[ {S_{k} - T_{k} } \right]} }}{{\sum\nolimits_{k = 1}^{n} {\left[ {S_{k} - \frac{{\sum\nolimits_{k = 1}^{n} {S_{k} } }}{n}} \right]} }}$$
(10)
$$E_{\text{mr}} = \frac{100}{n}\sum\limits_{k = 1}^{n} {\left| {\frac{{S_{k} - T_{k} }}{{T_{k} }}} \right|}$$
(11)
$${\text{SE}} = \sum\limits_{k = 1}^{n} {\sqrt[{}]{{\frac{{(S_{k} - T_{k} )^{2} }}{{{\text{d}} . {\text{f}} .}}}}}$$
(12)

where R2 is the coefficient of determination, Emr the mean relative error, SE the standard error, Sk the network output for kth pattern, Tk the target output for kth pattern, d.f., degree of freedom and n the number of training patterns.

About 70% of all data were randomly selected for training of network with suitable topology and training algorithms. The remained data were used for validation and test.

Analysis of the data

The effect of soil type (texture) and water quality on the Ks and Kr at different PVs was assessed using statistical analysis in SAS software. The soil texture, ECw and SARw were considered as treatments in a factorial arrangement of completely randomized design. Means of the Kr values were compared using Duncan’s multiple range test. The Ks and Kr were predicted from the inputs of soil type, ECw and SARw using multiple regression and artificial neural network (ANN) models. The statistical analysis was done using SAS software. Feed-forward and cascade forward networks and Levenberg–Marquardt and Bayesian regulation learning algorithms were utilized.

Results and discussion

Effect of soil texture and water quality on K s and K r

The Ks is mainly dependent on soil macropores and pore continuity and decreases with destruction of macropores. The Ks values were greater in sandy clay loam soil (with larger pores) compared to clay soil. With an increase in SARw, the Ks decreased due to soil dispersion, macropore clogging by dispersed clay particles and clay swelling. These effects depend on clay content and types; the finer the soil texture and the greater the amount of 2:1 clays, the greater will be clay dispersion and swelling. When soil is susceptible to dispersion and swelling, the soil structure will be damaged by sodicity (Levy et al. 2005). Buelow et al. (2015) observed that the importance of aggregate slaking in terms of soil hydraulic conductivity depended on both soil sodicity and clay content.

Figures 1 and 2 show the variation of Kr (averaged over replicates) versus PV for different water qualities and soil type treatments. The effect of SARw at low ECw (i.e., 0.5 dS m−1) on Kr variation of the clay soil is shown in Fig. 1a. It was observed that as leaching was continued (at high PV), the Kr decreased because the low-saline waters could disperse the soil aggregates. This effect was greater when SARw increased. When the SARw reached to critical limit (i.e., about 13), the Kr decreased substantially, especially at initial PVs (Fig. 1a). There is an unexpected increase in Kr for SAR = 18, especially at high PVs presumably because of particles separation and creation of new pores upon extensive swelling.

Fig. 1
figure 1

Effect of SARw on relative hydraulic conductivity (Kr) versus pore volume (PV) for clay soil at different ECw values: a 0.5, b 2, c 4 and d 8 dS m−1

Fig. 2
figure 2

Effect of SARw on relative hydraulic conductivity (Kr) versus pore volume (PV) for the sandy clay loam soil at different ECw values: a 0.5, b 2, c 4 and d 8 dS m−1

The effect of SARw at moderate ECw (i.e., 2 dS m−1) on Kr variation of the clay soil is shown in Fig. 1b. When compared with Fig. 1a, it is concluded that the negative effect of SARw on Kr diminished when water salinity increases. The leaching effect with the moderately saline waters on Kr was even positive, especially at low SARw values (Fig. 1b). With salinity increase, the DDL thickness decreases and the soil particles are flocculated ultimately affecting the pore sizes and continuity and hydraulic conductivity.

The effect of SARw at ECw = 4 dS m−1 on Kr variation of the clay soil is shown in Fig. 1c. The Kr was minimally affected by the SARw, and the curves’ slopes were near to zero due to counteracting impacts of salinity on sodicity. For low SARw (= 1), the Kr increased upon further leaching due to greater Ca2+ concentration compared to Na+ concentration.

The effect of SARw at ECw = 8 dS m−1 on Kr variation of the clay soil is shown in Fig. 1d. The high salinity and decreasing DDL thickness upon leaching increased the Kr. When compared with Fig. 1a–c, it is concluded that high salinity minimized the impacts of sodicity on Kr so that even at high SARw, the Kr changes are negligible.

The effect of SARw at ECw = 0.5 dS m−1 on Kr variation of the sandy clay loam soil is shown in Fig. 2a. It is seen that Kr decreased upon leaching with low-saline and high-sodic waters. The decreasing trend of Kr upon leaching was smaller when compared with Fig. 1a indicating the higher susceptibility of the clay soil to water quality. The clay soil has more clay particles and surface area, which make it susceptible to soil solution composition. Comparing Fig. 2a, b shows that for SARw = 1, the positive effect of ECw on Kr was noticeable but not for the other SARw values having negative slope of Kr versus PV relation.

For ECw of 4 dS m−1, the Kr was almost constant upon leaching (Fig. 2c), indicating that when sodicity is high (i.e., SARw = 18) the ECw should be at least 4 dS m−1 to preserve soil physical quality, and pore structure and continuity as quantified by hydraulic conductivity. When ECw of 8 dS m−1 was used, the effect of leaching on Kr was positive irrespective of water sodicity.

Overall, with an increase in ECw the Kr increased so that at high salinities (i.e., ECw of 4 and 8 dS m−1), ECw could diminish the negative impact of SARw on soil structure and even increased the Kr to values greater than 1 upon leaching. Many investigators also reported that hydraulic conductivity increased with increasing electrolyte concentration and decreased with increasing SAR (Bagarello et al. 2006). In fact, swelling, aggregate failure, pore-size reduction and dispersion of clays are induced by the irrigation with low-quality water.

As leaching continued, the ion exchange between soil exchangeable sites and leaching solution increased and the differences between the treatments became greater. At high salinity (i.e., 8 dS m−1), the effect of sodicity was not significant. Also at low salinity (i.e., 0.5 dS m−1), there was no difference between SARw treatments because low concentrations of leaching solution itself lowered the Kr.

Other studies have also confirmed these results (e.g., Gamie and De Smedt 2018; Lado and Ben-Hur 2009). For instance, Bourazanis et al. (2016) investigated the effect of irrigation with treated municipal wastewater and freshwater on Ks and showed that by increasing EC and decreasing SAR of irrigation water, the soil particles were flocculated and consequently Ks increased. However, these studies have not been evaluated the capability of ANNs to predict soil hydraulic conductivity as affected by water quality.

Statistical analysis of the effect of soil texture and water quality on K r

Analysis of variance of the effects of soil texture and water quality on Kr at different pore volumes (PV) during leaching trials is presented in Table 2. It was observed that the soil texture only affected the Kr at PV = 1 significantly. However, the ECw significantly affected the Kr when the leaching continued (at PVs of 2, 3 and 4). The SARw only affected the Kr at PV = 4 (p < 0.05). It seems that when the leaching continues, the incoming solution approached the equilibrium with the exchange sites of clay particles and consequently affected the soil structure and Kr. The interaction between soil texture and ECw on Kr was significant (p < 0.1) at PV = 3. The interaction between soil texture and SARw on Kr was significant (p < 0.1 and 0.05) at PV of 0.5 and 1. The third-order interaction was only significant (p < 0.1) at PV = 1.

Table 2 Analysis of variance of the effects of soil texture and water quality on relative hydraulic conductivity (Kr) at different pore volumes (PV) during leaching trials

Table 3 shows the mean comparisons of the treatment effects on Kr at different PVs during leaching trials. The texture significantly affected the Kr only at 1PV. The mean Kr of sandy clay loam soil was greater than clay soil due to the effect of higher macropores and lower effect of water quality on microstructure of sandy clay loam soil. The effect of ECw on Kr was not significant at 0.5PV and 1PV, but as the leaching proceeded, the ECw increased the Kr. The Kr was greatest at ECw of 8 dS m−1 which had significant difference with other ECw values. Comparing the effects of SARw values showed that at PV of 3 and 4, there were significant differences between Kr means with the highest Kr for SARW = 1. Upon leaching, the sodium had enough time to be adsorbed on the colloid surfaces and caused swelling and dispersion. These in addition to pore clogging (due to dispersed materials) decreased the Kr.

Table 3 Mean comparisons of the effects of soil texture and water quality on relative hydraulic conductivity (Kr) at different pore volumes (PV) during leaching trials

Table 4 shows the mean comparisons of the interactive effects of soil texture and ECw on Kr at different PVs during leaching trials. The effect was not significant at 0.5PV and 1PV, but at other PVs, the Kr was significantly different among the texture–salinity combinations with the highest value observed for sandy clay loam soil leached with ECw of 8 dS m−1. The lowest Kr value belonged to clay soil leached with ECw of 0.5 dS m−1. The highest effect of ECw was observed at 4PV due to greater leaching and the fact that the cations had enough time to be adsorbed on the colloid surfaces. As ECw increases, the thickness of diffuse double layer (DDL) around the particles decreases leading to flocculation.

Table 4 Mean comparisons of the interactive effects of soil texture and water quality on relative hydraulic conductivity (Kr) at different pore volumes (PV) during leaching trials

The interactive effects of soil texture and SARw on Kr at different PVs indicate that the Kr was lowest for both soils at SARw = 18 (Table 4). The effect was not significant at 4PV partly due to variability among the replicates and partly due to increase in hydraulic conductivity upon clay particles leave from the soil columns during leaching (which was visually observed).

Table 5 shows the mean comparisons of the interactive effects of ECw and SARw on Kr at different PVs during leaching trials. Again the effect was not significant at 0.5PV and 1PV, but at other PVs, the Kr was significantly different among the salinity–sodicity combinations with the highest value observed for the high-salinity and low-sodicity treatments.

Table 5 Mean comparisons of the interactive effects of ECw and SARw on relative hydraulic conductivity (Kr) at different pore volumes (PV) during leaching trials

The K s and K r prediction using multiple regression and ANNs

Multiple regression analysis

The Ks and Kr were predicted from soil type, ECw and SARw using multiple regression method, and the following two equations are derived:

$$\begin{aligned} & K_{s} = \, 5.876047 - 0.00277{\text{EC}}_{\text{w}} - 0.04764\,{\text{SAR}}_{\text{w}} + 3.614373\,{\text{TEX}} - 0.00302\,{\text{PV}} \\ & \quad n = 512, \, R^{2} = 0.629,{\text{ MSE}} = 2.00, \, p < 0.000 \\ \end{aligned}$$
(13)
$$\begin{aligned} & K_{\text{r}} = \, 0.9366 \, + \, 0.014691\,{\text{EC}}_{\text{w}} - 0.00186\,{\text{SAR}}_{\text{w}} - 0.0326\,{\text{TEX}} - 0.00038\,{\text{PV}} \\ & \quad n = \, 512, \, R^{2} = 0.240,{\text{MSE}} = 0.0068, \, p < 0.000 \\ \end{aligned}$$
(14)

where Ks has the unit cm h−1, the units of ECw and SARw are dS m−1 and (meq l−1)0.5, respectively, TEX stands for soil texture (0 for clay and 1 for sandy clay loam), and PV is number of pore volumes. It is obvious from Eqs. (13) and (14) that Ks prediction is more accurate than Kr prediction using multiple regression technique. The effect of ECw on Ks was negative and on Kr was positive. The impact of SARw on both Ks and Kr was negative. The coarser the texture, the higher the Ks was and the lower the Kr was. The effect of PV on both Ks and Kr was negative.

Artificial neural networks analysis

Two types of FFBP and CFBP neural networks have been implemented in this study. Two strategies were applied to find the best combination of different threshold functions in network optimization which included uniform threshold function for all layers (Table 6) and different threshold functions for layers (Table 7). Both two strategies were used in training of FFBP and CFBP networks with learning algorithms of LM and BR. The best results of employed networks and algorithms for first and second strategies are presented in Tables 6 and 7, respectively. It is observed that the performance of ANNs is much greater than regression method for Ks prediction.

Table 6 Learning algorithm for different neurons and hidden layers for the networks at the uniform threshold function
Table 7 Learning algorithm for different neurons and hidden layers for several networks at the different threshold functions

The best results of FFBP network with LM algorithm in the first strategy with TANSIG threshold function was related to 4–5–5–1 topology (Table 6). This composition produced MSE = 0.0011, R2 = 0.9833 and MAE = 0.2860 and converged in 30 epochs. In addition, the best result of this network with BR algorithm in first strategy was obtained with TANSIG threshold function and 4–4–4–1 topology. This composition has MSE = 0.0005, R2 = 0.9913 and MAE = 0.1641. This composition converged in 128 epochs. Furthermore, in this stage, BR learning algorithm had better result, because it produced lower MAE and higher R2 values. It was found that, in both strategies for FFBP network, TANSIG threshold function presented the better performance (in terms of error and R2 values) for similar initial conditions.

The results for CFBP network in first strategy showed that the LM algorithm had better performance compared to BR algorithm. The best result for LM algorithm was derived for 4–6–3–1 topology with MAE = 0.0004 and R2 = 0.9926 at 36 training epochs, whereas the best results belonged to 4–6–4–1 topology for BR algorithm. It produced MAE = 0.1641, R2 = 0.9913 at 128 epochs. With regard to first strategy results, the best topology (4–6–3–1) is belonged to CFBP network with LM algorithm and TANSIG threshold.

The best result for second strategy and FFBP network and LM algorithm is related to 4–6–4–1 topology and TANSIG–LOGSIG–TANSIG threshold functions (Table 7). This composition has MAE = 0.2476, R2 = 0.9771. For BR algorithm, the best topology is 4–6–5–1 with LOGSIG–LOGSIG–TANSIG threshold functions. It produces MAE = 0.2257, R2 = 0.9807 at 49 epochs. Furthermore, for FFBP network, BR algorithm has better result compared to LM algorithm. The CFBP network for second strategy, LM algorithm, 4–5–4–1 topology and threshold functions of LOGSIG–LOGSIG–TANSIG has MAE = 0.1761 and R2 = 0.9945. In addition, the BR algorithm with FFBP network and 4–4–4–1 topology with LOGSIG–TANSIG–TANSIG threshold functions produced MAE = 0.2253 and R2 = 0.9297. According to the results of second strategy, CFBP network with LM algorithm, as an optimized topology, had the best performance, which was superior to the first strategy, because the MAE and R2 are higher. The R2 of optimized ANN is plotted in Fig. 3.

Fig. 3
figure 3

Predicted values of Ks using ANNs versus measured values for testing data

Conclusions

  1. 1.

    The Ks values were greater in sandy clay loam soil due to more macropores compared to clay soil. With an increase in SARw, the Ks decreased due to soil dispersion, macropore clogging by dispersed clay particles and swelling.

  2. 2.

    As leaching was continued (at high PVs), the Kr decreased because the low-saline waters could disperse soil aggregates. The effect was greater when the waters with high SARw values were used. When the SARw reached to 13, the Kr decrease was substantial, especially at initial PVs. There was an increase in the Kr for SAR = 18, especially at high PVs presumably because of particles separation and creation of new pores upon extensive swelling.

  3. 3.

    For the clay soil, it was observed, by comparing Kr reductions at ECw = 2 dS m−1 and ECw = 0.5 dS m−1, that increase in salinity compensated the reduction of Kr due to SARw. The effect of leaching with moderately saline water on Kr was positive, especially at low SARw values. However, Kr was minimally affected by the SARw at ECw = 4 dS m−1. Results showed that if leaching continues by water with low SARw (= 1), Kr will be increased. In generally, even in the conditions of clay soil and high SARw, impact of sodicity on Kr was minimized by high salinity. The clay soil was more sensitive to water quality when compared with the sandy clay loam soil. It was founded that in the case of high sodicity (SARw = 18), the ECw must be at least 4 dS m−1 to preserve the soil physical quality, pore structure and continuity as quantified by the saturated hydraulic conductivity.

  4. 4.

    For the highest ECw, Kr values of both soil textures were increased during leaching even at the highest SARw value. Therefore, it can be concluded that ECw has more effect on soil structure than SARw does.

  5. 5.

    The effects of soil type and water quality on the Ks were effectively predicted by regression and ANN methods. It was observed that the efficacy of ANNs is much greater than regression method for Ks prediction. Results of ANNs with regard to second strategy showed that the best topology (4–5–4–1) is belonged to CFBP network with LM algorithm and LOGSIG–LOGSIG–TANSIG threshold functions. In this method, the MAE and R2 were 0.1761 and 0.9945, respectively.