1 Introduction

Rock fractures, also referred to as discontinuities, constitute zones of weakness in rock masses, whose stability is often governed by the geometrical and mechanical properties of the fractures. Quantifying the shear strength of large in situ discontinuities is hence an essential yet complicated step in the stability analysis of rock masses or rock slopes. The difficulties of such quantification lie in the fact that the information about the discontinuity surface is only partial (visible on a trace) and that there exists a scale effect.

In the past, several models have been proposed to predict the shear strength of large, rough, in situ discontinuities, with the model by Barton (1976) being the most commonly used.

Recently, some of the authors of this paper proposed a new approach, named the StADSS (stochastic approach for discontinuity shear strength), combining a random field model (to create synthetic rock surfaces) and a semi-analytical shear strength model (to obtain shear strength estimates), referred to as the NDSS (Newcastle discontinuity shear strength) model. This approach was validated on a laboratory scale and satisfactorily applied to one rock discontinuity specimen of 2 m per 2 m (Jeffery et al. 2022). This approach is quite versatile in nature, in the sense that any suitable random field model and shear strength model can be used.

Although the NDSS model proved to yield satisfactory shear predictions, it has to be implemented as a numerical code because of the large number of data points on a surface that must be processed. In addition, because the rationale of the StADSS is to test many surfaces, obtaining the distribution of strength requires considerable time, even more so for large surfaces. In this paper, an efficient alternative to the implementation of the NDSS model is presented in the form of a multivariate regression model trained and validated using a dataset of NDSS predictions. More specifically, it is proposed to adopt a continued fraction regression (CFR) approach, which possesses an excellent ability to capture nonlinear regression problems. For example, CFR models were applied to 352 datasets from the physical sciences (Moscato et al. 2020b), and they were used to predict the critical temperature of superconducting materials (Moscato et al. 2020a) and to model the first performance dates of Shakespearean era plays (Moscato et al. 2022). In addition, in a large experiment involving 94 datasets and 15 other regression algorithms, the CFR method provided an analytic mathematical model for each dataset studied and outperformed many state-of-the-art regression approaches (Moscato et al. 2021).

In Moscato et al. (2023), this approach was used to find a mathematical model of the energy of n electrons on a sphere, i.e., a function that closely approximates the value of a solution to the Thomson problem for different values of n.

Unlike more conventional regression analysis approaches, it is possible to rigorously optimise the CFR coefficients to obtain more accurate predictions and owing to the memetic algorithm procedure, it is also possible to eliminate variables that only have a marginal effect on the predictions, hence yielding simpler model formulations. This means that the selection of variables is based on a rigorous and iterative mathematical procedure rather than a user’s subjective choice. The objective of this study is to rigorously train and test a CFR model that can replace the NDSS model to avoid the difficulty of numerically implementing the model and the high computational time.

2 Estimation of the Shear Strength and the CFR Model

2.1 Shear Strength Estimation

This study is based on the Newcastle discontinuity shear strength (NDSS) model proposed by Casagrande et al. (2018). The model analyses 3D digitised surfaces, described as a structured dataset of positions (X, Y, Z), with X and Y being the directions of the mean discontinuity plane and Z being the elevation of the data points. For a given surface, the number of data points used to describe the morphology of the surface depends on the spatial resolution, i.e., the spacing between data points in the X and Y directions. To be processed by the NDSS model, the 3D surface needs to be triangulated, with the triangles herein referred to as facets (see “Appendix” section for more information on triangulation and the definition of facets).

The model provides a semi-analytical prediction of the peak and residual shear strength from an estimate of the actual contact area within a discontinuity, quantified by the number of facets that actively contribute to the generation of the shear resistance, denoted NCF. Through research, it has been established that only the steepest areas of the surface facing the direction of shearing contribute to the shear response (Grasselli 2001; Grasselli et al. 2002; Jeffery et al. 2022). The main variables and equations of the model are recalled when relevant to this paper, and more detailed information is provided in “Appendix” section. However, the reader should consult Casagrande et al. (2018) for a complete description of the NDSS model.

The objective of this study is to define and validate a multivariate regression (MVR) model to predict the peak and residual shear strength of a rough nonplanar rock discontinuity. Instead of predicting the peak and residual shear strength directly, which would require one MVR model for the peak strength and one for the residual strength, it is proposed to train a single MVR model to predict the number of contributing facets (NCF), from which it is possible to compute both the peak and residual shear strengths as follows (see “Appendix” section for derivations and figures, as well as Casagrande et al. 2018 for more information):

$$\tau_{\text{p}} = \frac{{A_{{\text{ip}}} \cdot \left( {c + \sigma_{{\text{local}}\_i}^{\prime} \tan \left( {\phi ^{\prime}} \right)} \right) \cdot N_{{\text{CF}}} }}{{A_{{\text{tot}}} }}$$
(1)

and

$$\tau_{\text{r}} = \tau_{\text{p}} - \frac{{A_{{\text{ip}}} \cdot c \cdot N_{{\text{CF}}} }}{{A_{{\text{tot}}} }}$$
(2)

where \({\tau }_{\mathrm{p}}\) and \({\tau }_{\mathrm{r}}\) are the peak and residual shear strength, respectively, and \({A}_{\mathrm{ip}}\) and \({A}_{\mathrm{tot}}\) are the area of a triangular facet projected on the discontinuity plane and the total projected discontinuity area, respectively. For 100 mm per 100 m samples, as tested by Casagrande et al. (2018), Atot is equal to 10,000 mm2. \({\sigma }_{\mathrm{local}\_i}^{\prime}\) is the local normal effective stress on a contributing facet, and \(\phi ^{\prime}\) and c are the effective friction angle and cohesion of the intact rock, respectively. See “Appendix” section for the derivation of \({\sigma }_{\mathrm{local}\_i}^{\prime}\).

NCF is the number of contributing facets on the surface. The total number of triangular facets on the surface depends on the size of the surface and the spatial resolution, as per Appendix.

Note that the material strength is defined here in terms of Coulomb parameters (cohesion and friction angle), but the strength envelope of rocks is often nonlinear and best fitted with a Hoek‒Brown criterion. In such cases, the cohesion and friction angle are derived from the Hoek‒Brown criterion for a given stress state, as per Hoek (1983):

$$c = \left( {\frac{1}{{\sin \left( {\phi^{\prime} } \right)}} - 1} \right)\frac{{\cos \left( {\phi^{\prime} } \right)m_i \sigma_{{\mathrm{ci}}} }}{8} - \sigma_{{\text{local}}\_i}^{\prime} \tan \left( {\phi^{\prime} } \right)$$
(3)

where mi and \(\sigma_{{\mathrm{ci}}}\) are the material parameter and intact unconfined compressive strength of the Hoek–Brown criterion obtained by fitting experimental triaxial data, and \(\phi ^{\prime}\) is defined as:

$$\phi^{\prime} = {\text{atan}}\left( {\frac{1}{{\sqrt {4h \times \cos^2 \left( \theta \right) - 1} }}} \right)$$
(4)

where \(h = 1 + \frac{{16\left( {m_i \sigma_{{\text{local}}\_i}^{\prime} + \sigma_{{\mathrm{ci}}} } \right)}}{{3 \sigma_{{\mathrm{ci}}} m_i^2 }}\) and \(\theta = \frac{1}{3}\left( {90 + {\text{atan}}\left( {\frac{1}{{\sqrt {h^3 - 1} }}} \right)} \right)\). Casagrande et al. (2018) showed that for a given shearing direction, the shear strength prediction by the NDSS model depends on the material strength (mi, \({\sigma }_{{\mathrm{ci}}}\) and the basic friction angle \({\phi }_{b}\)), the effective normal stress applied to the discontinuity (\({\sigma^ {\prime}}_{n}\)) and the morphology of the discontinuity surface. In research conducted by Jeffery et al. (2021), it was further shown that for a stationary surface, the shear strengths (peak and residual) depend on the standard deviation of asperity gradients rather than on the standard deviation of asperity heights. Consequently, it is proposed that a multivariate regression model that relates NCF to mi, \({\sigma }_{{\mathrm{ci}}}\), \({\phi }_{b}\), \({\sigma }_{n}^{\prime}\) and \({sd}_{i}\) be established.

Regarding notations, in previous publications by the authors (Casagrande et al. 2018; Buzzi and Casagrande 2018; Jeffery et al. 2021, 2022, 2023), the standard deviation of gradients is denoted \({\sigma }_{i}\). The notation is here changed to sdi to avoid confusion with stress variables, i.e., \({\sigma }_{{\mathrm{ci}}}\) and \({\sigma ^{\prime}}_{n}\).

2.2 Continued Fraction Regression (CFR) Model

Continued fraction regression (CFR) is a multivariate regression method that was first introduced by Sun and Moscato (2019) and uses an analytic continued fraction representation for the unknown target function one is trying to model. Mathematically, an analytic function is defined as a function approximated as a power series expansion. One of the reasons why the use of continued fraction regression has been investigated is that it can provide a simple analytical model with low complexity for predicting a target function. To define an analytic continued fraction, consider an array x of n variables xi:

$${\varvec{x}}=\{{x}_{1}, {x}_{2},\dots , {x}_{n}\}$$
(5)

The multivariate function \(f({\varvec{x}})\) can be represented as an analytic continued fraction that reads:

$$f({\varvec{x}})={g}_{o}\left({\varvec{x}}\right)+\frac{{h}_{o}({\varvec{x}})}{{g}_{1}\left({\varvec{x}}\right)+\frac{{h}_{1}\left({\varvec{x}}\right)}{{g}_{2}\left({\varvec{x}}\right)+\frac{{h}_{2}\left({\varvec{x}}\right)}{{g}_{3}\left({\varvec{x}}\right)+\dots }}}$$
(6)

where \({g}_{i}\left({\varvec{x}}\right)\) and \({h}_{i}\left({\varvec{x}}\right)\) are \({g}_{i}\left(x\right)={{\varvec{a}}}_{i}^{\mathrm{T}}{\varvec{x}}+{\alpha }_{i}\) and \({h}_{i}\left(x\right)={{\varvec{b}}}_{i}^{\mathrm{T}}{\varvec{x}}+{\beta }_{i}\), respectively. Each function \({g}_{i}\left({\varvec{x}}\right)\) is associated with a vector \({{\varvec{a}}}_{i}\in {\mathbb{R}}^n\) and a constant \({\alpha }_{i}\in {\mathbb{R}}\). The same applies to each function \({h}_{i}\left({\varvec{x}}\right)\) associated with a vector \({{\varvec{b}}}_{i}\in {\mathbb{R}}^n\) and a constant \({\beta }_{i}\in {\mathbb{R}}\). The depth of the CFR function, denoted d, refers to the largest subscript of function \(g\left({\varvec{x}}\right)\), i.e., \({g}_{d}\left({\varvec{x}}\right)\). Note that at depth d, without losing generality, \({h}_{d}\left({\varvec{x}}\right)\) is assumed to be equal to 0.

To define the CFR function, one needs (1) to identify the variables (xi) that influence the output and (2) to define the coefficients ai and bi for the functions \({g}_{i}\left({\varvec{x}}\right)\) and \({h}_{i}\left({\varvec{x}}\right)\) that yield the best goodness of fit [quantified via the mean square error (MSE)] between the prediction and training datasets. The aim of continued fraction regression is to provide a simple and relatively interpretable analytical model of low complexity for predicting a variable that is a nonlinear function of several variables. Defining the final CFR function also referred to as the CFR model, is achieved by applying a search and optimisation procedure (a memetic algorithm) to training datasets. All technical aspects of the memetic algorithm are fully detailed in Moscato et al. (2021), and only the general principle is recalled here for the benefit of the reader.

The memetic algorithm is based on the concept of a population structure of optimising agents, which in this case contains three levels and 13 agents, numbered 0–12 (see Fig. 1). A feature of this method is that mathematical models (solutions of a mixed combinatorial and nonlinear optimisation problem) that have initially been randomly created can be progressively selected and improved. The optimisation, evolution and selection of the models occur via rigorous mathematical algorithms as described in Moscato et al. (2021).

Fig. 1
figure 1

Memetic algorithm represented as a hierarchical tree (redrawn from Moscato et al. 2021)

In this algorithm, two solutions are created for each of agents 4–12. The variables of each solution are randomly selected from the list of possible input variables, and the coefficient assigned to each variable is randomly selected from the range (− 3; 3). For each solution, the coefficients identified from the memetic algorithm are optimised using a variant of the Nelder‒Mead nonlinear optimisation technique (Fajfar et al. 2017) as a local search operation. As a result, each agent has two solutions, the performance of which is assessed in terms of the mean squared error (MSE) using the training dataset. The solution with the best performance is referred to as a “pocket” solution, and the other solution is referred to as the “current” solution. Each agent has one pocket solution and one current solution. In the evolutionary step of the algorithm, some current solutions are then modified using variation operations named recombination and mutation. The objective is to create a new offspring as a current solution. If that offspring performs better than the best solution, it becomes the new pocket solution of the agent.

A mutation operation consists of making random changes to the current solution. It can either remove or add a variable from the model. If a variable is added, its coefficient is randomly selected in the range (− 3; 3), and a local search is applied to attempt to improve the solution in terms of its performance. As indicated by its name, a recombination operation consists of combining two existing solutions, i.e., two different mathematical models, referred to as ‘parent’ solutions, from two different agents. To create a new offspring solution to replace the current solution, variables are randomly selected from the union, intersection, or symmetric difference of the variables of the parents. If a variable is only present in one of the parents, its coefficient is equal to the coefficient in the parent solution. If a variable is present in both parent solutions, its coefficient is a function of both parent coefficients. The Nelder–Mead algorithm is then applied to all offspring coefficients for local optimisation. In this study, mutation is applied to 10% of the solutions, and all current solutions are used as a parent solution for recombination.

The best solution or model of agents 4–6 is moved to agent 1, that of agents 7–9 is moved to agent 2, and finally, the best solution for agents 10–12 is moved to agent 3. The best model of agents 1, 2, and 3 is moved to agent 0.

The performance of the final model of agent 0 is then reevaluated to account for its complexity. Indeed, the objective is not only to obtain a model with good performance but also to formulate a simple model (for computational efficiency), i.e., a model with the lowest depth and least number of variables (the variables that have no strong influence are discarded). To achieve this, a delta penalty method is used (Sun and Moscato 2019), where the performance of a model is evaluated through a corrected mean square error:

$${\mathrm{MSE}}_{\mathrm{corrected}}=\mathrm{MSE} \times \left(1+\delta \times N\right)$$
(7)

where \(\delta\) is arbitrarily selected as 0.1 and N is the number of variables used in the model. The more complex the formulation is, the more penalised the model, and the higher the corrected MSE. The process of identifying the best-performing model via the memetic algorithm is repeated 200 times until 200 best-performing models are produced. All 200 best-performing models are then evaluated in terms of MSE_corrected, and the model with the lowest MSE_corrected is retained as the trained model.

Both memetic algorithms and the CFR approach are becoming very popular for data science applications (Cotta et al. 2018; Moscato and Mathieson 2019; Moscato et al. 2022). The memetic algorithm was implemented in C++ and executed using a computer equipped with a 6 Core Intel(R) Core(TM) i7-9750H CPU with a 2.60 GHz clock speed and 16.0 GB of RAM running on the Ubuntu 20.04.1 LTS operating system.

2.3 Correction for Surface Size and Resolution

As will be detailed in Sect. 3, the synthetic dataset used to train and validate the regression model was obtained by applying the NDSS model to 2 m per 2 m rough surfaces, referred to as reference surfaces (as per Jeffery et al. 2021). In the remainder of this paper, the spatial resolution, surface area and number of contributing facets of the reference surfaces are identified with a subscript “o”, i.e., Reso (equal to 1 mm), Atot-o (equal to 4 m2) and NCFo, respectively. The notations Res, Atot and NCF refer to surfaces with either another size and/or another spatial resolution.

The number of contributing facets predicted by the CFR model is only meaningful for the reference surfaces that contain \(8\times {10}^{6}\) facets. For example, let us consider a fixed set of input variables and a fixed set of surface references. Assume that the model predicts that \(16\times {10}^{4}\) facets are sheared. Now consider the same inputs (and hence the same model output) but for a surface that contains \(8\times {10}^{4}\) facets (for example, a 1 m per 1 m surface with a 5 mm spatial resolution), the direct application of the CFR model would return that there are more sheared facets than the surface contains, which is a nonsensical output. The proper way to analyse this result is to consider that \(16\times {10}^{4}\) facets represent 2% of the total number of facets of the reference surface and the smaller surface with a different spatial resolution would also have 2% of its facets sheared. Hence, the proper number of contributing facets for the surface to consider is \({N}_{\mathrm{CF}}= 0.02\times 8\times {10}^{4}=1600\) facets. From this number and with the projected area of each facet, it is possible to compute the shear strength of the surface. To express this transformation formally, two corrections are presented in Eqs. (8) and (9).

First, the number of contributing facets for the reference surface NCFo needs to be multiplied by the surface ratio (Atot/Atot-o) and resolution ratio (Reso/Res)2. Given that Atot-o = 4 m2 and Reso = 1 mm, we obtain:

$${N}_{\mathrm{CF}}={N}_{\mathrm{CFo}}\left(\frac{A_{tot}}{{A}_{tot-o}}\right){\left(\frac{{\mathrm{Res}}_{\mathrm{o}}}{\mathrm{Res}}\right)}^{2}={N}_{\mathrm{CFo}}\left(\frac{A_{tot}}{4 {\mathrm{Res}}^{2}}\right)$$
(8)

where NCFo is the number of contributing facets predicted by the CFR model and NCF, Atot and Res are the number of contributing facets, the total area and the spatial resolution of the surface being considered, respectively.

In addition, assuming that the spatial resolution is the same in the X and Y directions, the projected facet area Aip is equal to (see Fig. 9 in “Appendix” section):

$${A}_{\mathrm{ip}}=\frac{{\mathrm{Res}}^{2}}{2}$$
(9)

Equations (8) and (9) can now be combined with Eqs. (1)–(4) to estimate the shear strength of a discontinuity surface with different dimensions and resolutions than those of the reference surfaces.

Note that an attempt was made to directly predict the percentage of facets that have been sheared using continuous fraction regression, but the prediction accuracy was not as good as that presented in the remainder of this paper.

3 Training and Validation Datasets

A preliminary study revealed that better predictions can be obtained when using ln(NCFo) and \(\mathrm{tan}\left({\phi }_{b}\right)\) instead of NCFo and \({\phi }_{\mathrm{b}}\). Therefore, the tangent of \({\phi }_{\mathrm{b}}\) was considered in the set of independent variables \({\varvec{x}}\) to predict ln(NCFo).

The process of obtaining a dataset of \(\{\mathrm{ln}({N}_{CFo}), {sd}_{i}, {\sigma }_{{\mathrm{ci}}}, {\mathrm{tan}(\phi }_{b}),{m}_{i},{{\sigma }^{\prime}}_{n}\}\) to train and test the CFR model is described in detail in the next sections and is summarised as follows:

  • First, 474 synthetic rock surfaces were created using the 2D LAS random field model used by Casagrande et al. (2018). The peak and residual shear strengths of these surfaces were estimated using the NDSS model with 1000 different combinations \({\{\sigma }_{{\mathrm{ci}}}, {\mathrm{tan}(\phi }_{b}),{m}_{i},{{\sigma }^{\prime}}_{n}\}\) as inputs. This 474,000-point dataset is referred to as the raw dataset.

  • The raw dataset was then reduced to 14,000 data points with a specific filtering process to obtain a dataset with specific values of \({sd}_{i}\). This dataset is referred to as the reduced dataset.

  • The 14,000-point reduced dataset was then enriched using meta features, a mathematical approach used to increase the ability of a model to introduce some powers and roots of the input variables and capture nonlinearities. This dataset is referred to as the enriched dataset.

  • The CFR model was trained with 10% of the samples from the enriched dataset, and the remaining 90% of the samples were used to test the generalisation performance.

3.1 Raw Dataset

Before elaborating on how the data were created by the combination of the random field model and the NDSS model, it is important to specify that research by Jeffery et al. (2021) showed that a natural rough rock surface can be decomposed into three levels of roughness, namely, large scale (L), intermediate scale (I) and small scale (S) roughness (see the example in Fig. 2a), which is consistent with the rock mechanics literature. The NDSS prediction is strongly governed by the inclination of asperities of the small-scale roughness (S). The inclination of asperities is referred to as gradients and is calculated as the difference in elevation between two adjacent points over the distance between the two points parallel to the mean shear plane.

Fig. 2
figure 2

a Example of the decomposition of a trace profile into three subprofiles on a large scale, an intermediate scale and a small scale (from Jeffery et al. 2021). b Examples of the peak (full symbols) and residual (hollow symbols) shear strength envelope obtained from the NDSS model for the rough surface shown in c and its small scale component. The circle and square symbols correspond to the original surface and small-scale subsurface, respectively. c View of the original surface

Figure 2, adapted from Jeffery et al. (2021), illustrates the key contribution of asperity gradients on a small scale. Figure 2a first shows how a trace profile can be decoupled into three subprofiles at large, intermediate and small scales. The superposition of these three subprofiles gives the original profile. Similarly, discontinuity surfaces can be decomposed into three levels of roughness (small, intermediate and large).

Figure 2b shows the peak and residual failure criteria for a rough surface (referred to as “original”, shown in Fig. 2c) and the criteria of the corresponding small-scale subsurface (referred to as “small”). The strength envelope of the small-scale surface is only marginally lower than that of the original surface, which suggests that most of the shear strength, as predicted by the NDSS model, comes from the small-scale roughness. Consequently, in the remainder of this paper, given the large amount of data needed to train and test the regression model, only surfaces with small-scale roughness were created.

A total of 474 3D synthetic surfaces (size of 2 m per 2 m, 1 mm spatial resolution) were generated by the 2-dimensional local average subdivision (2D LAS) random field model (Fenton and Vanmarcke 1990). The inputs of the 2D LAS (variance of height \({\sigma }_{z}^{2}\) and correlation length CL) were varied to obtain a wide range of roughness values (see Table 1). The mean value of asperity height is 0. The standard deviation of the gradient ranges from approximately 0.02–0.62.

Table 1 Values of input variables used to establish the raw dataset of NCFo

The peak and residual shear strengths of the 474 synthetic surfaces were estimated using the NDSS model for 1000 combinations of \({\sigma^ {\prime}}_{n}, {\sigma }_{{\mathrm{ci}}}, {\phi }_{b}\) and \({m}_{i}\) resulting from the values given in Table 1. The raw dataset hence contains 474,000 data points.

The range of values given in Table 1 reflects typical ranges reported in the literature for sedimentary, igneous, and metamorphic rocks (see ISRM R4 Strong Rock field estimate strength class, Hoek and Brown 1997; Barton 1973, 1976; Alejano et al. 2012).

Although it is well recognised in the literature that shear strength is related to normal effective stress and rock strength parameters (see Barton 1976), roughness is usually described using the joint roughness coefficient, not the standard deviation of gradients. Figure 3a clearly demonstrates that a strong relation exists between NCFo and \({sd}_{i}\) for a given combination of material parameters. Such a degree of correlation was observed for all combinations of input variables. From this figure, it is suggested that the shear response of rough nonplanar discontinuities is strongly controlled by the distribution of asperity gradients, and consequently, the standard deviation of gradients can be considered an adequate roughness descriptor.

Fig. 3
figure 3

Evolution of the number of contributing facets (NCFo) with the standard deviation of gradients, \(sd_i\). a NCFo values associated with 474 synthetic surfaces, with a 3rd order polynomial trend line fitting and for one combination of variables. b A total of 14 NCFo values were obtained by the postprocessing procedure, sampled along the fitted trend line at equal increments of \(sd_i\) and forming the reduced dataset. c All NCFo values of the reduced dataset. The upper and lower bounds are highlighted

3.2 Reduced Dataset

To train and validate the CFR model, it is preferable to have a dataset of manageable size with controlled values of standard deviation of gradients, given its significance, which is not the case for the raw dataset. For each combination of (\({\sigma ^{\prime}}_{n}, {\sigma }_{{\mathrm{ci}}}, {\phi }_{b}\) and \({m}_{i})\), the evolution of ln(NCFo) with \({sd}_{i}\) was plotted and fitted with a 3rd-order polynomial (see Fig. 3a). The polynomial was then used to extract 14 (ln(NCFo), \({sd}_{i}\)) points, including the minimum and maximum values of \(sd_i\) and 12 equally spaced (increments of 0.5) values in between (see Fig. 3b). This process led to a dataset of 14,000 points (14 standard deviations and 1000 material parameters).

Figure 3c presents the values of NCFo as a function of sdi of the reduced dataset and shows a large range of variation, from several hundred facets to several million facets. To highlight the influence that other variables have on NCFo, the upper and lower bounds of NCFo are plotted with sdi. These bounds were obtained using extreme values (within the range of Table 1) of \(\sigma ^{\prime}_n , \sigma_{{\mathrm{ci}}} , \phi_b\) and \(m_i\).

3.3 Enriched Dataset

The original dataset contains an output (ln(NCFo)) and five input variables (\(\sigma ^{\prime}_n , \sigma_{{\mathrm{ci}}} , sd_i , {\text{tan}}(\phi_b )\) and mi). For simplicity of formulation and training efficiency, the model does not test the powers or roots of the input variables (e.g., \(m_i^2 , m_i^{0.5}\)), as per Eq. (6). To overcome this limitation, the powers and roots of the variables are introduced as extra input variables associated with the same output. These extra variables are generally referred to as “feature engineering” in the area of machine learning and data mining. In this study, for each independent variable \(x\), the following array \({\varvec{x^{\prime}}}\) of data associated with the same output (ln(NCFo)) was used:

$${{\varvec{x}}}^{\varvec{^{\prime}}} = \left\{ {x, x^{ - 1} , x^\frac{1}{2} , x^{ - \frac{1}{2}} ,x^\frac{1}{3} , x^{ - \frac{1}{3}} ,x^2 , x^{ - 2} ,x^3 ,x^{ - 3} } \right\}$$

Tables 2 and 3 show examples of the original dataset and enriched dataset.

Table 2 Example of one original combination of inputs for the following output: ln(NCFo) = 5.690359. \(sd_i , {\text{tan}}(\phi_b )\) and \(m_i\) have no unit, \(\sigma ^{\prime}_n\) in MPa, \(\sigma_{{\mathrm{ci}}}\) in MPa
Table 3 Example of one enriched combination of inputs based on the inputs of Table 2 for the following output: ln(NCFo) = 5.690359. \(sd_i , {\text{tan}}(\phi_b )\) and \(m_i\) have no unit, \(\sigma ^{\prime}_n\) in MPa, \(\sigma_{{\mathrm{ci}}}\) in MPa

Using the powers and roots of variables in feature engineering can provide several advantages, including nonlinear transformations, scaling, feature selection, and feature interpretation.

For example, the powers and roots of variables can introduce nonlinear transformations that can help capture nonlinear relationships between the independent input variables and the target variable; the square of an input variable may be more relevant to the target variable than the variable itself, especially if there is a quadratic relationship between them. The use of meta features has also been employed in classification problems (e.g., Rocha de Paula et al. 2011; Johnstone et al. 2012). As such, it is a more powerful approach than simply considering more data from the original dataset.

3.4 Data Sampling for Training and Testing

To create a reduced-size dataset to guide the training phase of the CFR method, 10% of the enriched dataset (a total of 1400 samples from the enriched dataset) was selected using the following process: the variance of the enriched dataset was first computed. Then, 10% of the data were randomly sampled, and the variance was computed. The sampling process was iterated until the variance difference between the original dataset and the subset was less than a defined threshold (here 0.01). The process iterates until the new dataset meets the variance threshold condition. Therefore, it contains 10% of the samples, and it is used as the training dataset, while the remaining 90% of the samples are used to test the generalisability of the models.

4 Results

4.1 Training and Testing of the CFR Model

A subset of 1400 samples was used to train the continued fraction regression model with depth = {0, 1, 2, 3, 4}, and this process was repeated for each depth 25 times. The continued fraction regression method executed with the training set identified the best model when depth = 1. In the following, the CFR model is hence referred to as CFR-d1, and it is given as follows:

$$\ln \left( {N_{{\text{CFo}}} } \right) = g_{\text{o}} \left( {{{\varvec{x}}}^{\prime} } \right) + \frac{{h_{\text{o}} ({{\varvec{x}}}^{\prime} )}}{{g_1 ({{\varvec{x}}}^{\prime} )}}$$
(10)

with

$$\begin{aligned} g_{\text{o}} \left( {{{\varvec{x}}}^{\prime} } \right) & = 0.497568 \cdot sd_i^\frac{1}{2} + 0.051503 \cdot \sigma_n^{\prime\frac{1}{3}} - 0.604231 \cdot \sigma_{{\mathrm{ci}}}^\frac{1}{3} - 0.125605 \\ h_{\text{o}} \left( {{{\varvec{x}}}^{\prime} } \right) & = 0.001748 \cdot \tan^2 \left( {\phi_{\text{b}} } \right) + 0.017096 \cdot \sigma_n^{\prime\frac{1}{3}} + 0.000020 \cdot \sigma_{{\mathrm{ci}}}^\frac{1}{3} + 0.002485 \\ g_1 \left( {{{\varvec{x}}}^{\prime} } \right) & = - 0.000307 \cdot sd_i^\frac{1}{2} + 0.000973 \cdot \sigma_n^{\prime\frac{1}{3}} + 0.000544 \\ \end{aligned}$$

with \(\sigma ^{\prime}_n\) in MPa, \(\sigma_{{\mathrm{ci}}}\) in MPa, and \(sd_i\) in m/m.

Note that mi does not appear in the CFR-d1 model, which implies that this variable only has a marginal influence on ln(NCFo). However, mi is a relevant parameter that contributes to the shear strength of the discontinuity, as captured in Eqs. (3) and (4), once the number of contributing facets is obtained.

The mean squared error (MSE) score of the CFR-d1 model obtained for the training set was 0.1136, and for the test set, it was 0.0424. The performance of the model is illustrated in Fig. 4 in terms of the distribution of relative error between the prediction from the CFR-d1 model and the dataset. The relative error, in percent, is computed as:

$${\text{error}}\,[\% ] = \frac{{100\left( {{\text{CFR}} - {\text{Data}}} \right)}}{{{\text{Data}}}}$$
(11)

where CFR is the value of prediction by the CFR model and Data is the value of ln(NCFo) from the training dataset for the same set of input variables. A positive error value reflects an overestimation, while a negative error corresponds to an underestimation. Figure 4 shows that ~ 95% of the CFR predictions fall within a \(\pm 20\%\) error band, which is an excellent result.

Fig. 4
figure 4

Distribution of relative error between the training dataset and CFR-d1 prediction, computed from Eq. (11)

4.2 Comparison Between CFR-d1 Predictions and Experimental Values of the Sheared Area

In this section, the predictions of the trained CFR-d1 model are compared to the experimental values of the sheared area obtained by Jeffery et al. (2022). The authors conducted a series of low normal stress, large scale direct shear tests on a series of 2 m per 2 m perfectly matching mortar discontinuity replicates with a 1 mm spatial resolution (total number of facets of \(8 \times 10^6\)). After each test, estimates of the contact area that contributed to the development of peak shear strength were obtained via digital analysis of the damaged area.

The direct shear tests were conducted at normal stresses \(\sigma_n ^{\prime}\) of 5, 14, 22 and 31 kPa. In the direction of shearing, the whole discontinuity surface was observed to have a standard deviation of gradients \(sd_i\) equal to 0.143. The material properties of the mortar used to cast the replicas were an intact compressive strength (\(\sigma_{{\mathrm{ci}}}\)), a material constant (\(m_i\)) and a basic friction angle (\(\phi_{\text{b}}\)) of 68.7 MPa, 8.5 and 36.2°, respectively. The CFR-d1 model [Eq. (10)] was applied using values of normal stress and material parameters consistent with the experimental values. The sheared area was computed by multiplying the value of NCFo given by the CFR-d1 by the area of a facet (0.5 mm2). The values of NCFo predicted by the CFR-d1 model are given in Table 4.

Table 4 Values of NCFo from the CFR-d1 prediction for the 2 m per 2 m surface tested by Jeffery et al. (2022). Input parameters: \(sd_i\) = 0.143, \(\sigma_{{\mathrm{ci}}}\) = 68.7 MPa, mi = 8.5, and tan(\(\phi_b\)) = 0.732

Figure 5a presents a comparison of the experimental sheared area and that estimated from the CFR-d1 model. The results in this figure confirm the observations presented in Sect. 4.1, in that the predictive ability of the CFR-d1 model is excellent. Figure 5b reveals that CFR-d1 predictions lie within \(\pm 10\%\) of the experimental data, with only one data point outside that range, with an error of − 17% (identified by the arrow in Fig. 5b). Such a good agreement is a very strong indication that the CFR-d1 model is capable of adequately predicting shear strength, a hypothesis that will be tested in the next section.

Fig. 5
figure 5

a Evolution of the experimental and CFR-d1 predicted values of a sheared area with normal effective stress. b Comparison of the experimental and predicted values of the sheared area with an indication of \(\pm 10\%\) relative error (red dashed line). The black arrow indicates the point with a − 17% relative error

4.3 Comparison Between CFR-d1 Predictions and Experimental Values of Shear Strength

Following the comparison of the CFR-d1 predictions with the experimental values of the sheared area obtained by Jeffery et al. (2022), testing the predictive ability of the CFR-d1 model further is proposed by comparing the experimental values of peak and residual shear strength obtained by Jeffery et al. (2022) for the same surface and those derived from the predicted values of ln(NCFo) and Eqs. (1)–(5). The predicted shear strength values are given in Table 5.

Table 5 Peak and residual shear strength derived from the values of NCFo predicted by the CFR-d1 model (see Table 4) for the 2 m per 2 m surface tested by Jeffery et al. (2022). Input parameters: \(sd_i\) = 0.143, \(\sigma_{{\mathrm{ci}}}\) = 68.7 MPa, mi = 8.5, and tan(\(\phi_b\)) = 0.732

The experimental and predicted strength values, for both peak and residual shear strength, are plotted in Fig. 6, and once again, excellent agreement can be seen between the predicted and experimental data.

Fig. 6
figure 6

Evolution of experimental and CFR-d1 predicted values of shear strength (peak and residual) with normal effective stress for the 2 m per 2 m surface tested by Jeffery et al. (2022)

The predictive ability of the CFR-d1 model was further tested using direct shear test results obtained on the same three surfaces tested by Casagrande et al. (2018). The mortar replicas of the different surfaces were tested under normal stress ranging from 20 to 500 kPa. The surface parameters relevant to making a CFR-d1 prediction are given in Table 6. Note that the same mortar mixture used by Casagrande et al. (2018) was used to make new replicas that were cured in water for four weeks and new data were obtained. A series of triaxial tests were conducted to characterise the material strength under a level of confinement consistent with high-stress values expected at the few contact points within a rough discontinuity (on the order of 30–50 MPa). From these tests, an mi value of approximately 13 was obtained (see Table 6), as opposed to approximately 35 (Casagrande et al. 2018), which seems too high for a mortar. Except for this difference in material characterisation, the shear tests were conducted as per Casagrande et al. (2018), and in the interest of conciseness, the experimental methods are not repeated here.

Table 6 Parameters of the S, M, and R surfaces (see Casagrande et al. 2018) tested in the direct shear test under constant normal stress

Figure 7 shows that most of the CFR-d1 predictions are relatively close to the experimental values of peak and shear strength.

Fig. 7
figure 7

Evolution of the experimental and CFR-d1 predicted values of shear strength (peak and residual) with normal effective stress for the S, M, R surfaces tested by Casagrande et al. (2018)

Finally, all the results are summarised in Fig. 8, which also shows a distribution of relative errors. In 75% of the cases, the discontinuity shear strength can be predicted within \(\pm 20\%\) of the experimental value, which can be considered an excellent result.

Fig. 8
figure 8

a Comparison of the experimental (measured) and CFR-d1 predicted shear strength (peak and residual) data from Figs. 6 and 7. The continuous line has a one-to-one gradient. b Distribution of relative errors for all data from Figs. 6 and 7

5 Conclusions

This paper focused on establishing a continued fraction regression (CFR) model to use as an alternative to the Newcastle discontinuity shear strength (NDSS) model and to address issues of numerical implementation and computational cost. The model was trained and tested using an extensive dataset of sheared facet data.

In establishing the dataset, clear correlations were observed between the peak shear strength and standard deviation of gradients of the surfaces, all other variables being constant. This observation suggests that the standard deviation of gradients is a reliable indicator of surface roughness.

The training and testing of the CFR model returned low values of mean squared error, indicating that the model can satisfactorily predict the number of contributing facets for given input combinations. Furthermore, the CFR model predictive capability was tested against experimental data of sheared area and shear strength, and 75% of the predictions fell within 20% of experimental values, which confirms the excellent performance of the CFR model.

The findings of this study suggest that the trained CFR model can efficiently be used as an alternative to the NDSS model, offering a much simpler implementation and much lower computational times.