MATH 590: Meshfree Methods

Similar documents
MATH 590: Meshfree Methods

MATH 590: Meshfree Methods

MATH 590: Meshfree Methods

MATH 590: Meshfree Methods

MATH 590: Meshfree Methods

MATH 590: Meshfree Methods

MATH 590: Meshfree Methods

MATH 590: Meshfree Methods

MATH 590: Meshfree Methods

MATH 590: Meshfree Methods

MATH 590: Meshfree Methods

MATH 590: Meshfree Methods

MATH 590: Meshfree Methods

Kernel-based Approximation. Methods using MATLAB. Gregory Fasshauer. Interdisciplinary Mathematical Sciences. Michael McCourt.

MATH 590: Meshfree Methods

Multivariate Interpolation with Increasingly Flat Radial Basis Functions of Finite Smoothness

MATH 590: Meshfree Methods

Radial Basis Functions I

A new stable basis for radial basis function interpolation

MATH 590: Meshfree Methods

Kernel B Splines and Interpolation

D. Shepard, Shepard functions, late 1960s (application, surface modelling)

Meshfree Approximation Methods with MATLAB

Stable Parameterization Schemes for Gaussians

Stability of Kernel Based Interpolation

Radial basis functions topics in slides

Green s Functions: Taking Another Look at Kernel Approximation, Radial Basis Functions and Splines

MATH 590: Meshfree Methods

RBF Collocation Methods and Pseudospectral Methods

Positive Definite Kernels: Opportunities and Challenges

Solving the 3D Laplace Equation by Meshless Collocation via Harmonic Kernels

Least Squares Approximation

Interpolation by Basis Functions of Different Scales and Shapes

DIRECT ERROR BOUNDS FOR SYMMETRIC RBF COLLOCATION

Toward Approximate Moving Least Squares Approximation with Irregularly Spaced Centers

Scattered Data Approximation of Noisy Data via Iterated Moving Least Squares

Stability constants for kernel-based interpolation processes

Recent Results for Moving Least Squares Approximation

Theoretical and computational aspects of multivariate interpolation with increasingly flat radial basis functions

A Posteriori Error Bounds for Meshless Methods

Numerical analysis of heat conduction problems on 3D general-shaped domains by means of a RBF Collocation Meshless Method

Approximation by Conditionally Positive Definite Functions with Finitely Many Centers

STABLE CALCULATION OF GAUSSIAN-BASED RBF-FD STENCILS

RBF-FD Approximation to Solve Poisson Equation in 3D

Kernel-Based Contrast Functions for Sufficient Dimension Reduction

MATH 350: Introduction to Computational Mathematics

Numerical analysis of heat conduction problems on irregular domains by means of a collocation meshless method

Slide05 Haykin Chapter 5: Radial-Basis Function Networks

RKHS, Mercer s theorem, Unbounded domains, Frames and Wavelets Class 22, 2004 Tomaso Poggio and Sayan Mukherjee

1. Introduction. A radial basis function (RBF) interpolant of multivariate data (x k, y k ), k = 1, 2,..., n takes the form

CIS 520: Machine Learning Oct 09, Kernel Methods

Reproducing Kernels of Generalized Sobolev Spaces via a Green Function Approach with Differential Operators

ON DIMENSION-INDEPENDENT RATES OF CONVERGENCE FOR FUNCTION APPROXIMATION WITH GAUSSIAN KERNELS

A orthonormal basis for Radial Basis Function approximation

Scattered Data Interpolation with Polynomial Precision and Conditionally Positive Definite Functions

Numerical solution of nonlinear sine-gordon equation with local RBF-based finite difference collocation method

In the Name of God. Lectures 15&16: Radial Basis Function Networks

Applied Linear Algebra in Geoscience Using MATLAB

A scaling perspective on accuracy and convergence in RBF approximations

D. Shepard, Shepard functions, late 1960s (application, surface modelling)

AN ELEMENTARY PROOF OF THE OPTIMAL RECOVERY OF THE THIN PLATE SPLINE RADIAL BASIS FUNCTION

Multiscale RBF collocation for solving PDEs on spheres

MATH 590: Meshfree Methods

Richard F. Bass Krzysztof Burdzy University of Washington

RBF-Partition of Unity Method: an overview of recent results

Breaking Computational Barriers: Multi-GPU High-Order RBF Kernel Problems with Millions of Points

MATH 350: Introduction to Computational Mathematics

A numerical study of a technique for shifting eigenvalues of radial basis function differentiation matrices

Introduction to Gaussian Processes

AMS526: Numerical Analysis I (Numerical Linear Algebra) Lecture 23: GMRES and Other Krylov Subspace Methods; Preconditioning

Linear Models for Regression. Sargur Srihari

Strictly Positive Definite Functions on a Real Inner Product Space

STABLE EVALUATION OF GAUSSIAN RBF INTERPOLANTS

Kernel Method: Data Analysis with Positive Definite Kernels

COMS 4721: Machine Learning for Data Science Lecture 19, 4/6/2017

A STABLE ALGORITHM FOR DIVERGENCE-FREE AND CURL-FREE RADIAL BASIS FUNCTIONS IN THE FLAT LIMIT

Key words. Radial basis function, scattered data interpolation, hierarchical matrices, datasparse approximation, adaptive cross approximation

Numerical Methods I Non-Square and Sparse Linear Systems

Solving Boundary Value Problems (with Gaussians)

Fitting Linear Statistical Models to Data by Least Squares I: Introduction

Numerical solution of surface PDEs with Radial Basis Functions

Wendland Functions A C++ code to compute them

5.6 Nonparametric Logistic Regression

y(x) = x w + ε(x), (1)

Kernel Methods. Foundations of Data Analysis. Torsten Möller. Möller/Mori 1

10-701/ Recitation : Kernels

Fast and stable rational RBF-based Partition of Unity interpolation

Joint distribution optimal transportation for domain adaptation

Stability and Lebesgue constants in RBF interpolation

Numerical cubature on scattered data by radial basis functions

Compact Matérn Kernels and Piecewise Polynomial Splines Viewed From a Hilbert-Schmidt Perspective

Complexity and regularization issues in kernel-based learning

Linear Regression (9/11/13)

Stable computations with flat radial basis functions using vector-valued rational approximations

Support Vector Machines.

This is a postprint version of the following published document:

Linear Models for Regression

Numerical Minimization of Potential Energies on Specific Manifolds

arxiv: v1 [math.na] 17 Oct 2016

A MODIFIED TSVD METHOD FOR DISCRETE ILL-POSED PROBLEMS

Transcription:

MATH 590: Meshfree Methods Chapter 2: Radial Basis Function Interpolation in MATLAB Greg Fasshauer Department of Applied Mathematics Illinois Institute of Technology Fall 2010 fasshauer@iit.edu MATH 590 Chapter 2 1

Outline 1 Radial (Basis) Functions 2 Radial Basis Function Interpolation fasshauer@iit.edu MATH 590 Chapter 2 2

Outline Radial (Basis) Functions 1 Radial (Basis) Functions 2 Radial Basis Function Interpolation fasshauer@iit.edu MATH 590 Chapter 2 3

Next goals Radial (Basis) Functions Get a feel for RBFs before we study them in detail Want to overcome limitations of distance matrix interpolation, but keep overall structure: combine distance matrix interpolants with good basic functions fasshauer@iit.edu MATH 590 Chapter 2 4

Radial (Basis) Functions Example The Gaussian ϕ(r) = e (εr)2, r R, has a shape parameter ε related to the variance σ 2 of the normal distribution: ε 2 = 1/(2σ 2 ). fasshauer@iit.edu MATH 590 Chapter 2 5

Radial (Basis) Functions Example The Gaussian ϕ(r) = e (εr)2, r R, has a shape parameter ε related to the variance σ 2 of the normal distribution: ε 2 = 1/(2σ 2 ). Compose the Gaussian with Euclidean distance function 2 and get Φ k (x) = e ε2 x x k 2 2, x R s, where x k R s is some fixed center or knot. fasshauer@iit.edu MATH 590 Chapter 2 5

Radial (Basis) Functions Example The Gaussian ϕ(r) = e (εr)2, r R, has a shape parameter ε related to the variance σ 2 of the normal distribution: ε 2 = 1/(2σ 2 ). Compose the Gaussian with Euclidean distance function 2 and get Φ k (x) = e ε2 x x k 2 2, x R s, where x k R s is some fixed center or knot. Remark Note that ϕ is univariate, but Φ k is a multivariate function such that Φ k (x) = ϕ( x x k 2 ) radial basis function (RBF). fasshauer@iit.edu MATH 590 Chapter 2 5

Radial (Basis) Functions Definition A function Φ : R s R is called radial provided there exists a univariate function ϕ : [0, ) R such that Φ(x) = ϕ(r), where r = x, and is some norm on R s usually the Euclidean norm. fasshauer@iit.edu MATH 590 Chapter 2 6

Radial (Basis) Functions Definition A function Φ : R s R is called radial provided there exists a univariate function ϕ : [0, ) R such that Φ(x) = ϕ(r), where r = x, and is some norm on R s usually the Euclidean norm. Thus, for a radial function x 1 = x 2 = Φ(x 1 ) = Φ(x 2 ), x 1, x 2 R s. fasshauer@iit.edu MATH 590 Chapter 2 6

Radial (Basis) Functions Definition A function Φ : R s R is called radial provided there exists a univariate function ϕ : [0, ) R such that Φ(x) = ϕ(r), where r = x, and is some norm on R s usually the Euclidean norm. Thus, for a radial function Example x 1 = x 2 = Φ(x 1 ) = Φ(x 2 ), x 1, x 2 R s. The Euclidean distance function Φ(x) = x 2 (or ϕ(r) = r) is a special case of a radial (basis) function. Terminology: ϕ: basic function, Φ k ( 2 ) (centered at x k ): radial basis function fasshauer@iit.edu MATH 590 Chapter 2 6

Radial (Basis) Functions Figure: Gaussian with ε = 1 (left) and ε = 3 (right) centered at the origin. A smaller value of ε (i.e., larger variance) causes the function to become flatter, so it s like an inverse length scale. Increasing ε leads to a more peaked RBF. fasshauer@iit.edu MATH 590 Chapter 2 7

Radial (Basis) Functions Figure: Gaussian with ε = 1 (left) and ε = 3 (right) centered at the origin. A smaller value of ε (i.e., larger variance) causes the function to become flatter, so it s like an inverse length scale. Increasing ε leads to a more peaked RBF. The choice of ε influences both accuracy and numerical stability of the solution to our interpolation problem (details later). fasshauer@iit.edu MATH 590 Chapter 2 7

Radial (Basis) Functions Some properties of radial function interpolants Invariance under all Euclidean transformations (i.e., translations, rotations, and reflections). It doesn t matter whether we first compute the RBF interpolant and then apply a Euclidean transformation, or if we first transform the data and then compute the interpolant. True since Euclidean transformations are characterized by orthogonal transformation matrices and are therefore 2-norm-invariant. Invariance under translation, rotation and reflection is often desirable in applications. fasshauer@iit.edu MATH 590 Chapter 2 8

Radial (Basis) Functions Some properties of radial function interpolants Invariance under all Euclidean transformations (i.e., translations, rotations, and reflections). It doesn t matter whether we first compute the RBF interpolant and then apply a Euclidean transformation, or if we first transform the data and then compute the interpolant. True since Euclidean transformations are characterized by orthogonal transformation matrices and are therefore 2-norm-invariant. Invariance under translation, rotation and reflection is often desirable in applications. Insensitive to the dimension s of the space in which the data sites lie. Instead of having to deal with a multivariate function Φ we can work with the same univariate function ϕ for all choices of s. fasshauer@iit.edu MATH 590 Chapter 2 8

The Kernel Notation Radial (Basis) Functions Sometimes we use more general (reproducing) kernels K. A kernel is a function of two variables K : R s R s R, K : (x, y) K (x, y) We will discuss the reproducing concept later. fasshauer@iit.edu MATH 590 Chapter 2 9

Radial (Basis) Functions Kernels can be radial: (also called isotropic) K (x, y) = κ( x y ), x, y R s, κ : R + 0 R fasshauer@iit.edu MATH 590 Chapter 2 10

Radial (Basis) Functions Kernels can be radial: (also called isotropic) K (x, y) = κ( x y ), x, y R s, κ : R + 0 R (only) translation invariant: (also called stationary) K (x, y) = K (x y), x, y R s, K : R s R fasshauer@iit.edu MATH 590 Chapter 2 10

Radial (Basis) Functions Kernels can be radial: (also called isotropic) K (x, y) = κ( x y ), x, y R s, κ : R + 0 R (only) translation invariant: (also called stationary) K (x, y) = K (x y), x, y R s, K : R s R some other special form, e.g., zonal: K (x, y) = κ(x y), x, y S 2, κ : [ 1, 1] R anisotropic (but stationary): K (x, y) = s K d (x d y d ), x d, y d R, K d : R R d=1 fasshauer@iit.edu MATH 590 Chapter 2 10

Radial (Basis) Functions Kernels can be radial: (also called isotropic) K (x, y) = κ( x y ), x, y R s, κ : R + 0 R (only) translation invariant: (also called stationary) K (x, y) = K (x y), x, y R s, K : R s R some other special form, e.g., zonal: K (x, y) = κ(x y), x, y S 2, κ : [ 1, 1] R anisotropic (but stationary): K (x, y) = s K d (x d y d ), x d, y d R, K d : R R d=1 very general: K (x, y), x, y R s, K : R s R s R A nice paper that discusses different classes of kernels from a statistical perspective is [Genton (2001)]. fasshauer@iit.edu MATH 590 Chapter 2 10

Examples Radial (Basis) Functions Radial kernel: K (x, y) = κ( x y ) = e ε2 x y 2, κ(r) = e ε2 r 2 fasshauer@iit.edu MATH 590 Chapter 2 11

Examples Radial (Basis) Functions Radial kernel: K (x, y) = κ( x y ) = e ε2 x y 2, κ(r) = e ε2 r 2 Anisotropic translation invariant kernel: s K (x, y) = e ε2 d (x d y d ) 2 = e s d=1 ε2 d (x d y d ) 2 d=1 becomes radial if ε d = ε for all d = 1,..., s fasshauer@iit.edu MATH 590 Chapter 2 11

Examples Radial (Basis) Functions Radial kernel: K (x, y) = κ( x y ) = e ε2 x y 2, κ(r) = e ε2 r 2 Anisotropic translation invariant kernel: s K (x, y) = e ε2 d (x d y d ) 2 = e s d=1 ε2 d (x d y d ) 2 d=1 becomes radial if ε d = ε for all d = 1,..., s Zonal kernel: 1 K (x, y) = κ(x y) = 1 + ε 2 2εx y, κ(t) = 1 1 + ε 2 2εt fasshauer@iit.edu MATH 590 Chapter 2 11

Examples Radial (Basis) Functions Radial kernel: K (x, y) = κ( x y ) = e ε2 x y 2, κ(r) = e ε2 r 2 Anisotropic translation invariant kernel: s K (x, y) = e ε2 d (x d y d ) 2 = e s d=1 ε2 d (x d y d ) 2 d=1 becomes radial if ε d = ε for all d = 1,..., s Zonal kernel: 1 K (x, y) = κ(x y) = 1 + ε 2 2εx y, κ(t) = 1 1 + ε 2 2εt General kernel: K (x, y) = min{x, y} xy, s = 1 (Brownian bridge) fasshauer@iit.edu MATH 590 Chapter 2 11

Outline Radial Basis Function Interpolation 1 Radial (Basis) Functions 2 Radial Basis Function Interpolation fasshauer@iit.edu MATH 590 Chapter 2 12

Radial Basis Function Interpolation Instead of distance matrices we now use a radial basis function expansion to solve the scattered data interpolation problem by assuming N P f (x) = c k ϕ ( x x k 2 ), x R s. (1) k=1 fasshauer@iit.edu MATH 590 Chapter 2 13

Radial Basis Function Interpolation Instead of distance matrices we now use a radial basis function expansion to solve the scattered data interpolation problem by assuming N P f (x) = c k ϕ ( x x k 2 ), x R s. (1) k=1 Using the interpolation conditions P f (x i ) = f (x i ), i = 1,..., N, we get c k from ϕ ( x 1 x 1 2 ) ϕ ( x 1 x 2 2 )... ϕ ( x 1 x N 2 ) c 1 ϕ ( x 2 x 1 2 ) ϕ ( x 2 x 2 2 )... ϕ ( x 2 x N 2 ) c 2....... = ϕ ( x N x 1 2 ) ϕ ( x N x 2 2 )... ϕ ( x N x N 2 ) c N f (x 1 ) f (x 2 ). f (x N ) fasshauer@iit.edu MATH 590 Chapter 2 13

Radial Basis Function Interpolation Instead of distance matrices we now use a radial basis function expansion to solve the scattered data interpolation problem by assuming N P f (x) = c k ϕ ( x x k 2 ), x R s. (1) k=1 Using the interpolation conditions P f (x i ) = f (x i ), i = 1,..., N, we get c k from ϕ ( x 1 x 1 2 ) ϕ ( x 1 x 2 2 )... ϕ ( x 1 x N 2 ) c 1 ϕ ( x 2 x 1 2 ) ϕ ( x 2 x 2 2 )... ϕ ( x 2 x N 2 ) c 2....... = ϕ ( x N x 1 2 ) ϕ ( x N x 2 2 )... ϕ ( x N x N 2 ) c N f (x 1 ) f (x 2 ). f (x N ) Question: For what type of basic functions ϕ is the system matrix non-singular? fasshauer@iit.edu MATH 590 Chapter 2 13

Radial Basis Function Interpolation Setup for Example Use s = 2 Basic function: Gaussians or linear function ϕ(r) = r Code in RBFInterpolation2D.m written for 2D (can easily be generalized to sd), and uses DistanceMatrix.m. Use Franke s function f (x, y) = 3 4 e 1/4((9x 2)2 +(9y 2) 2) + 3 4 e (1/49)(9x+1)2 (1/10)(9y+1) 2 + 1 2 e 1/4((9x 7)2 +(9y 3) 2) 1 5 e (9x 4)2 (9y 7) 2 Use Halton data sites (get others easily from CreatePoints) Compute errors on 40 40 uniform grid fasshauer@iit.edu MATH 590 Chapter 2 14

Radial Basis Function Interpolation Figure: Franke s test function. fasshauer@iit.edu MATH 590 Chapter 2 15

Radial Basis Function Interpolation Program (RBFInterpolation2D.m) 1 rbf = @(e,r) exp(-(e*r).^2); ep = 21.1; 2 f1 = @(x,y) 0.75*exp(-((9*x-2).^2+(9*y-2).^2)/4); 3 f2 = @(x,y) 0.75*exp(-((9*x+1).^2/49+(9*y+1).^2/10)); 4 f3 = @(x,y) 0.5*exp(-((9*x-7).^2+(9*y-3).^2)/4); 5 f4 = @(x,y) 0.2*exp(-((9*x-4).^2+(9*y-7).^2)); 6 testfunction = @(x,y) f1(x,y)+f2(x,y)+f3(x,y)-f4(x,y); 7 N = 1089; gridtype = h ; 8 dsites = CreatePoints(N,2,gridtype); 9 ctrs = dsites; 10 neval = 40; M = neval^2; 11 epoints = CreatePoints(M,2, u ); 12 rhs = testfunction(dsites(:,1),dsites(:,2)); 13 DM_data = DistanceMatrix(dsites,ctrs); 14 IM = rbf(ep,dm_data); 15 DM_eval = DistanceMatrix(epoints,ctrs); 16 EM = rbf(ep,dm_eval); 17 Pf = EM * (IM\rhs); 18 exact = testfunction(epoints(:,1),epoints(:,2)); 19 maxerr = norm(pf-exact,inf) 20 rms_err = norm(pf-exact)/neval fasshauer@iit.edu MATH 590 Chapter 2 16

Radial Basis Function Interpolation Stationary and Non-Stationary Approximation Remark Note the conflicting use of the term stationary: here vs. statistics = translation-invariant fasshauer@iit.edu MATH 590 Chapter 2 17

Radial Basis Function Interpolation Stationary and Non-Stationary Approximation Remark Note the conflicting use of the term stationary: here vs. statistics = translation-invariant We usually verify convergence of a method numerically by looking at a sequence of experiments with increasingly larger sets of data. fasshauer@iit.edu MATH 590 Chapter 2 17

Radial Basis Function Interpolation Stationary and Non-Stationary Approximation Remark Note the conflicting use of the term stationary: here vs. statistics = translation-invariant We usually verify convergence of a method numerically by looking at a sequence of experiments with increasingly larger sets of data. Non-stationary approximation: Use one fixed value of ε for all of the experiments. fasshauer@iit.edu MATH 590 Chapter 2 17

Radial Basis Function Interpolation Stationary and Non-Stationary Approximation Remark Note the conflicting use of the term stationary: here vs. statistics = translation-invariant We usually verify convergence of a method numerically by looking at a sequence of experiments with increasingly larger sets of data. Non-stationary approximation: Use one fixed value of ε for all of the experiments. Stationary approximation: Scale the shape parameter ε according to the fill distance (or meshsize) h so that we end up using peaked basis functions for densely spaced data and flat basis functions for coarsely spaced data. More details later fasshauer@iit.edu MATH 590 Chapter 2 17

Fill distance Radial Basis Function Interpolation The fill distance (or covering radius) is usually defined as h = h X,Ω = sup min x x j 2. (2) x j X x Ω fasshauer@iit.edu MATH 590 Chapter 2 18

Fill distance Radial Basis Function Interpolation The fill distance (or covering radius) is usually defined as h = h X,Ω = sup min x x j 2. (2) x j X x Ω It indicates how well the data in the set X fill out the domain Ω. fasshauer@iit.edu MATH 590 Chapter 2 18

Fill distance Radial Basis Function Interpolation The fill distance (or covering radius) is usually defined as h = h X,Ω = sup min x x j 2. (2) x j X x Ω It indicates how well the data in the set X fill out the domain Ω. In MATLAB: hx = max(min(dm_eval )) (3) fasshauer@iit.edu MATH 590 Chapter 2 18

Fill distance Radial Basis Function Interpolation The fill distance (or covering radius) is usually defined as h = h X,Ω = sup min x x j 2. (2) x j X x Ω It indicates how well the data in the set X fill out the domain Ω. In MATLAB: hx = max(min(dm_eval )) (3) Remark Since min works along columns of a matrix, transposition of the non-symmetric evaluation matrix corresponds to finding for each evaluation point the distance to the corresponding closest data site, and then setting h X,Ω as the worst of those distances. fasshauer@iit.edu MATH 590 Chapter 2 18

Radial Basis Function Interpolation 1 0.8 0.6 y 0.4 0.2 h X 0 0 0.2 0.4 0.6 0.8 1 x Figure: The fill distance for N = 25 Halton points (h X,Ω 0.2667). It s the radius of the largest possible empty ball that can be placed among the data locations inside Ω. fasshauer@iit.edu MATH 590 Chapter 2 19

Radial Basis Function Interpolation Test of non-stationary interpolation Fix large ε to prevent severe ill-conditioning with large N (if ε = 1, then N = 25 already very ill-conditioned) Consequence: very localized basis functions that don t capture enough information on small point sets (see left plot) Figure: Gaussian RBF interpolant with ε = 21.1 at N = 289 (left) and at N = 1089 Halton points (right). fasshauer@iit.edu MATH 590 Chapter 2 20

Radial Basis Function Interpolation Gaussian Distance matrix k N RMS-error max-error RMS-error max-error 1 9 3.647169e-001 1.039682e+000 1.323106e-001 4.578028e-001 2 25 3.203404e-001 9.670980e-001 6.400558e-002 2.767871e-001 3 81 2.152222e-001 8.455161e-001 1.343780e-002 6.733130e-002 4 289 7.431729e-002 7.219253e-001 3.707360e-003 3.057540e-002 5 1089 1.398297e-002 3.857234e-001 1.143589e-003 1.451950e-002 6 4225 4.890709e-004 1.940675e-002 4.002749e-004 8.022336e-003 Table: Non-stationary RBF interpolation to Franke s function using Gaussians (ε = 21.1) and Euclidean distance matrices. fasshauer@iit.edu MATH 590 Chapter 2 21

Radial Basis Function Interpolation Gaussian Distance matrix k N RMS-error max-error RMS-error max-error 1 9 3.647169e-001 1.039682e+000 1.323106e-001 4.578028e-001 2 25 3.203404e-001 9.670980e-001 6.400558e-002 2.767871e-001 3 81 2.152222e-001 8.455161e-001 1.343780e-002 6.733130e-002 4 289 7.431729e-002 7.219253e-001 3.707360e-003 3.057540e-002 5 1089 1.398297e-002 3.857234e-001 1.143589e-003 1.451950e-002 6 4225 4.890709e-004 1.940675e-002 4.002749e-004 8.022336e-003 Table: Non-stationary RBF interpolation to Franke s function using Gaussians (ε = 21.1) and Euclidean distance matrices. Remark Surprising observation in above example: distance matrix fit more accurate than Gaussian. fasshauer@iit.edu MATH 590 Chapter 2 21

Radial Basis Function Interpolation Gaussian Distance matrix k N RMS-error max-error RMS-error max-error 1 9 3.647169e-001 1.039682e+000 1.323106e-001 4.578028e-001 2 25 3.203404e-001 9.670980e-001 6.400558e-002 2.767871e-001 3 81 2.152222e-001 8.455161e-001 1.343780e-002 6.733130e-002 4 289 7.431729e-002 7.219253e-001 3.707360e-003 3.057540e-002 5 1089 1.398297e-002 3.857234e-001 1.143589e-003 1.451950e-002 6 4225 4.890709e-004 1.940675e-002 4.002749e-004 8.022336e-003 Table: Non-stationary RBF interpolation to Franke s function using Gaussians (ε = 21.1) and Euclidean distance matrices. Remark Surprising observation in above example: distance matrix fit more accurate than Gaussian. Would expect Gaussian to be more accurate find a better ε fasshauer@iit.edu MATH 590 Chapter 2 21

Radial Basis Function Interpolation Same test function and Gaussians as before. Figure: Maximum (blue) and RMS (red) errors vs. ε for 81 (top left), 289 (top right), 1089 (bottom left), and 4225 Halton points (bottom right). fasshauer@iit.edu MATH 590 Chapter 2 22

Radial Basis Function Interpolation What do we learn from the ε error curves? Errors decrease with decreasing ε (not the same as convergence for h 0). fasshauer@iit.edu MATH 590 Chapter 2 23

Radial Basis Function Interpolation What do we learn from the ε error curves? Errors decrease with decreasing ε (not the same as convergence for h 0). Error curves are not monotonic. fasshauer@iit.edu MATH 590 Chapter 2 23

Radial Basis Function Interpolation What do we learn from the ε error curves? Errors decrease with decreasing ε (not the same as convergence for h 0). Error curves are not monotonic. Optimal value of ε seems to exist which minimizes errors. fasshauer@iit.edu MATH 590 Chapter 2 23

Radial Basis Function Interpolation What do we learn from the ε error curves? Errors decrease with decreasing ε (not the same as convergence for h 0). Error curves are not monotonic. Optimal value of ε seems to exist which minimizes errors. For small enough values of ε the computational results become unpredictable, and the error curves become erratic (ill-conditioning) fasshauer@iit.edu MATH 590 Chapter 2 23

Radial Basis Function Interpolation What do we learn from the ε error curves? Errors decrease with decreasing ε (not the same as convergence for h 0). Error curves are not monotonic. Optimal value of ε seems to exist which minimizes errors. For small enough values of ε the computational results become unpredictable, and the error curves become erratic (ill-conditioning) We ll consider ε to be safe if we don t get a MATLAB warning about ill-conditioning. Note that for small N optimal ε is safe, but for larger N not. We obtain highly accurate solutions from severely ill-conditioned linear systems! This is known as the uncertainty or trade-off principle. fasshauer@iit.edu MATH 590 Chapter 2 23

Radial Basis Function Interpolation What do we learn from the ε error curves? Errors decrease with decreasing ε (not the same as convergence for h 0). Error curves are not monotonic. Optimal value of ε seems to exist which minimizes errors. For small enough values of ε the computational results become unpredictable, and the error curves become erratic (ill-conditioning) We ll consider ε to be safe if we don t get a MATLAB warning about ill-conditioning. Note that for small N optimal ε is safe, but for larger N not. We obtain highly accurate solutions from severely ill-conditioned linear systems! This is known as the uncertainty or trade-off principle. Interesting problem: how to compute optimal solution in a stable way. One possible approach is [Fornberg & Wright (2004)] with details later, also ongoing work with Mike McCourt (see next slide). fasshauer@iit.edu MATH 590 Chapter 2 23

Radial Basis Function Interpolation Figure: Preliminary results for stable Gaussian evaluation. QR corresponds to new method, Direct to standard method. fasshauer@iit.edu MATH 590 Chapter 2 24

Radial Basis Function Interpolation Best possible errors for Gaussian interpolation smallest safe ε smallest RMS-error k N ε RMS-error max-error ε RMS-error max-error 1 9 0.02 3.658421e-001 1.580259e+000 2.23 1.118026e-001 3.450275e-001 2 25 0.32 3.629342e-001 2.845554e+000 3.64 4.032550e-002 2.996488e-001 3 81 1.64 1.743059e-001 2.398284e+000 4.28 1.090601e-002 1.579465e-001 4 289 4.73 2.785388e-003 5.472502e-002 5.46 4.610079e-004 7.978283e-003 5 1089 10.5 4.945428e-004 1.812246e-002 6.2 2.498848e-006 8.779119e-005 6 4225 21.1 4.890709e-004 1.940675e-002 6.3 4.269292e-008 8.889552e-007 Table: Optimal RBF interpolation to Franke s function using Gaussians. fasshauer@iit.edu MATH 590 Chapter 2 25

Radial Basis Function Interpolation Best possible errors for Gaussian interpolation smallest safe ε smallest RMS-error k N ε RMS-error max-error ε RMS-error max-error 1 9 0.02 3.658421e-001 1.580259e+000 2.23 1.118026e-001 3.450275e-001 2 25 0.32 3.629342e-001 2.845554e+000 3.64 4.032550e-002 2.996488e-001 3 81 1.64 1.743059e-001 2.398284e+000 4.28 1.090601e-002 1.579465e-001 4 289 4.73 2.785388e-003 5.472502e-002 5.46 4.610079e-004 7.978283e-003 5 1089 10.5 4.945428e-004 1.812246e-002 6.2 2.498848e-006 8.779119e-005 6 4225 21.1 4.890709e-004 1.940675e-002 6.3 4.269292e-008 8.889552e-007 Table: Optimal RBF interpolation to Franke s function using Gaussians. Remark Errors for safe ε now comparable (or smaller) than those for distance matrix interpolation. fasshauer@iit.edu MATH 590 Chapter 2 25

Radial Basis Function Interpolation Best possible errors for Gaussian interpolation smallest safe ε smallest RMS-error k N ε RMS-error max-error ε RMS-error max-error 1 9 0.02 3.658421e-001 1.580259e+000 2.23 1.118026e-001 3.450275e-001 2 25 0.32 3.629342e-001 2.845554e+000 3.64 4.032550e-002 2.996488e-001 3 81 1.64 1.743059e-001 2.398284e+000 4.28 1.090601e-002 1.579465e-001 4 289 4.73 2.785388e-003 5.472502e-002 5.46 4.610079e-004 7.978283e-003 5 1089 10.5 4.945428e-004 1.812246e-002 6.2 2.498848e-006 8.779119e-005 6 4225 21.1 4.890709e-004 1.940675e-002 6.3 4.269292e-008 8.889552e-007 Table: Optimal RBF interpolation to Franke s function using Gaussians. Remark Errors for safe ε now comparable (or smaller) than those for distance matrix interpolation. Much better for optimal ε. However, ε = 6.2 with N = 1089 Halton points yields RCOND = 2.683527e-020. fasshauer@iit.edu MATH 590 Chapter 2 25

Radial Basis Function Interpolation Summary Remark If the data are not sampled from a known test function, then we will not be able to choose an optimal shape parameter by monitoring the RMS error. fasshauer@iit.edu MATH 590 Chapter 2 26

Radial Basis Function Interpolation Summary Remark If the data are not sampled from a known test function, then we will not be able to choose an optimal shape parameter by monitoring the RMS error. New challenge: how to find optimal ε based only on the data? fasshauer@iit.edu MATH 590 Chapter 2 26

Radial Basis Function Interpolation Summary Remark If the data are not sampled from a known test function, then we will not be able to choose an optimal shape parameter by monitoring the RMS error. New challenge: how to find optimal ε based only on the data? We will study later. ill-conditioning and preconditioning, optimal shape parameter selection, and alternate stable evaluation methods via a Contour-Padé algorithm or eigenfunction expansions fasshauer@iit.edu MATH 590 Chapter 2 26

References I Appendix References Buhmann, M. D. (2003). Radial Basis Functions: Theory and Implementations. Cambridge University Press. Fasshauer, G. E. (2007). Meshfree Approximation Methods with MATLAB. World Scientific Publishers. Higham, D. J. and Higham, N. J. (2005). MATLAB Guide. SIAM (2nd ed.), Philadelphia. Iske, A. (2004). Multiresolution Methods in Scattered Data Modelling. Lecture Notes in Computational Science and Engineering 37, Springer Verlag (Berlin). Wendland, H. (2005a). Scattered Data Approximation. Cambridge University Press (Cambridge). fasshauer@iit.edu MATH 590 Chapter 2 27

References II Appendix References Fornberg, B. and Wright, G. (2004). Stable computation of multiquadric interpolants for all values of the shape parameter. Comput. Math. Appl. 47, pp. 497 523. Genton, M. C. (2001). Classes of kernels for machine learning: a statistics perspective. J. Machine Learning Research 2, pp. 299 312. MATLAB Central File Exchange. available online at http://www.mathworks.com/matlabcentral/fileexchange/. fasshauer@iit.edu MATH 590 Chapter 2 28