The RBF-FD method essentially obtains an approximation of the function derivative at a node as a linear combination of function values on its supporting nodes, with its weights obtained using the standard RBF interpolation method. The generalisation performance or the degree of smoothness of the RBF interpolant can depend to a significant extent on the value of shape parameter. It can also be seen from Figure5.3that the accuracy of the RBF- FD method also depends significantly on the value of the shape parameter used. Hence, it is of interest to examine techniques for estimating the optimum value of the shape parameter
Chapter 5 RBFs in a Finite-Difference Mode (RBF-FD) 69 0 10 20 30 40 50 60 70 80 0 10 20 30 40 50 60 70 80 nz = 369 0 10 20 30 40 50 60 70 80 0 10 20 30 40 50 60 70 80 nz = 877 0 10 20 30 40 50 60 70 80 0 10 20 30 40 50 60 70 80 nz = 3765
Radius of support=0.1 Radius of support=0.2 Radius of support=0.5
Figure 5.5: Sparsity patterns in RBF-FD coefficient matrices
in order to ensure good generalisation performance of each RBF-FD stencil. In this section, we present a methodology for obtaining the optimal value of the shape parameter for RBF- FD stencils based on the technique of cross-validation commonly employed in statistical data modelling. This methodology has been earlier utilised in context of scattered data interpolation and regression problems; see, for exampleRippa (1999); Wang (2004).
5.4.1 Cross-validation and Leave-One-Out (LOO) procedure
The idea of cross-validation is usually employed to determine the effectiveness of a particular model/interpolant. Given the set of data and the observed values at each data point, the methodology involves partitioning the data set intoN clusters which may or may not be of equal size. Using theN−1 partitions (learning set) to construct a model and then predicting the values on the remaining cluster (validation set), an error value for the model capability can be obtained. Each of theN error terms can then be averaged to give the prediction error of the complete data set for a particular parameter value. For the case of small data sets as in the RBF-FD method, a particularly useful cross-validation technique for estimating the error of the function approximation is the leave-one-out method. In this method, the function approximation/interpolant is constructed by leaving out one data point and the left-out point is used as the validation point. AnN element error vector can be obtained by repeating thisN times with each data point as the validation point. The prediction error for a particular shape parameter value can then be calculated by averaging theN error terms.
A brief mathematical derivation for the LOO error predictor function or the cost functional
should be able to imitate the behaviour of the error between the RBF-FD interpolant and the actual function derivative with respect to the shape parameter value. The equation for the cost functional for any nodexi withN supporting points is given by
Q(xi, σ) =kEik2, (5.19)
with each element in the vector Ei defined as
Eki =fk−S(k)(xk, σ), k= 1,2,· · · , N, (5.20) whereS(k)(xk) is the interpolant of the function derivative obtained without using the sup- porting nodexk as a RBF centre i.e.,
S(k)(xk, σ) = N
X
j=1,j6=k
λ(k)φ(kxk−xjk, σ). (5.21)
The learning set for a particular Eik can then be defined as all data values other than fk,
which is the validation point in the leave-one-out form of cross-validation. Note that in RBF-FD, ifL is the operator for which the RBF-FD weights need to be found at the node xi, the data vector is given by
fk =Lφ(kxi−xkk, σ), k= 1,2,· · · , N. (5.22) It can be observed that at any node xi, for a particular value of the shape parameter, a direct evaluation of Equation (5.19) requires solving an (N −1) ×(N −1) system of linear equations N times, and evaluation of S(k)(xk, σ) for k = 1,2,· · ·, N. This method can become computationally expensive even for a moderate number of nodes in the stencil. Fortunately, after some matrix manipulations, the elements ofEi can be efficiently computed as
Eki = λk
m(kk), (5.23)
whereλk is thekth element of the RBF-FD weight vector, λ=A−1f,
andm(kk) is the (k, k) element of the inverse of the Gram matrixA. The complete derivation is shown in Appendix B. The computational cost of estimatingEiis that of performing a LU decomposition of the Gram matrixA and then the cost ofN solutions of the linear system, Am(k)=e(k), k= 1,2,· · ·, N (5.24)
Chapter 5 RBFs in a Finite-Difference Mode (RBF-FD) 71 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 10−5 10−4 10−3 10−2 10−1 100 σ ε σoptimal = 0.34 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 10−3 10−2 10−1 100 101 102 σ
Cost Function Value
σoptimal = 0.26
True Error Behaviour Cost Function Behaviour
Figure 5.6: Behaviour comparison of true error and cost function using Leave-One-Out
criterion for 1D interpolation problem
where e(k) is the kth column of the N ×N identity matrix. Since the LU factorisation of Ais known, the computational cost of solving Equation (5.24) is significantly less than that of the direct evaluation of the cost function. Other computationally efficient algorithms like estimating the cost function when the singular value decomposition of the matrixA is given or using the QR decomposition can also be pursued.
Figure5.6shows the behaviour of the true error and the cost functional value for a simple 1D interpolation problem as a function of the shape parameter. The function (Franke,1982) is given by f(x) = 3 4 exp −(9x−2) 2 4 + exp −(9x+ 1) 2 49 +1 2exp −(9x−7) 2 4 −1 5exp −(9x−4) 2. (5.25)
Ten uniformly spaced data points in [0,π2] were considered and the resultant RBF interpolate was evaluated at 100 uniformly spaced points. The true error is evaluated as
ε=kfexact−fpredictedk2.
The values of the shape parameter for which the minimum of the true error and cost func- tional are also displayed. From the figure, it can be seen that the cost functional Q(x, σ) approximates the behaviour of the true error quite accurately.
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 10−5 10−4 10−3 10−2 10−1 σ ε 11 X 11 Points 21X21 Points 31X31 Points
Figure 5.7: Accuracy of LOO optimised shape parameter for Poisson equation
5.4.2 Optimisation of LOO
To obtain the optimal value of the shape parameter, the cost functional evaluation procedure must be coupled with an optimisation routine to determine the optimal value of σ through iteration. The simplest way of obtaining the minima of the cost functionQ(xi, σ) is to use a grid search method. A shape parameter range is selected and is then divided uniformly and
Q(xi, σ) is estimated at each of the divided points. The minima of the cost function is then obtained and the corresponding value of the shape parameter is its optimal value. Another way is to use optimisation routines like the Brent’s method or the Nelder search method. In this thesis, we use the Nelder search algorithm provided in MATLAB for optimising the shape parameter value. Note that the computational cost incurred by the optimisation routine for the RBF-FD method is much less than the strategy presented earlier in Chapter 3 for the RBF collocation method.
5.4.3 Numerical studies
Figure 5.7 presents the accuracy of the proposed shape parameter optimisation strategy. The Poisson equation is solved with the source term given in Equation (5.17). We consider a uniform node distribution of 11×11, 21×21 and 31×31. The behaviour of the accuracy of the RBF-FD method (measured inL2 norm) with respect to shape parameter for each of
the node set is shown in the figure, and the corresponding accuracy obtained by optimising the shape parameter is shown by dotted lines. From Figure 5.7, it can be observed that the proposed strategy indeed obtains a very good approximation of the optimal value of
Chapter 5 RBFs in a Finite-Difference Mode (RBF-FD) 73 the shape parameter for a little additional cost during the pre-processing stage when the RBF-FD weights are computed.