Radial Basis Approximation #52
Rodolphe-Vivant
started this conversation in
Project Portfolio
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Project Radial Basis and Low-Rank
Overview
The main objective of my$1^{st}$ year of Master degree project, under the supervision of Dr. Emmanuel FRANCK, was to implement various Radial kernels in Scimba in order to generate mehsless approximation methods to solve numerically PDE's :
where$\mathcal{L}$ and $\mathcal{L}_{\partial\Omega}$ a linear differential operator, $f$ is a source term and $g$ is a boundary condition.
Radial Functions
Radial basis functions (RBFs) are a class of functions that depend only on the distance between a point$x$ and a center point $\mathbf{\xi}$ .
where$\mathbf{\xi}_j$ , $j=1,..,N$ are the centers of the RBFs and $\epsilon$ is a parameter that controls the width of the RBF.
We can define the RBF approximant of a certain function$f$ as:
where$\alpha_j$ are the coefficients of the basis functions centered at $\mathbf{\xi}_j$ for $j=1,..,N$ .
In other words,$s(x,\epsilon)\in span(K(.,\xi_j)_{j\in[1,N]})$ .
In our case, we will need to guarantee a certain regularity of the approximant. The function tested, or the solution of the PDEs we want to approximate, must be in a Sobolev spaces$H^{m}(\mathbb{R}^d)$ , where $d$ is the dimension of the domain $\Omega$ we are working on.To do so, we will have to ensure that our kernel are positive (semi) definite.
The choice of the kernel is crucial for the regularity of the approximant. We will test that property trough our examples.
Reformulation of the initial problem
After insterting the RBF approximant into the PDE, we obtain:
where the$x_i\in\mathcal{I}$ are the collocation points inside $\Omega$ and the $x_i\in\mathcal{B}$ are the collocation points on the border $\partial\Omega$ .
The system of equations can be written in a matrix form:
Finding the approximant
To solve the system of equations, we can use a linear or a non-linear approach.$\theta$ :
To find the approximant, we train our model with the following set of parameters
Results for$1D$ , $2D$ and for the solving of a Poisson equation
I was able to implement :
The figures of the results include the linear projection and the non-linear projection of the solution as presented before.
Isotropic Kernel
Gaussian Kernel
Gaussian kernel :$\beta=2$
Allows precise approximation of functions$C^\infty(\mathbb{R}^d)$
Approximation of the$\mathcal{C}^\infty(\mathbb{R}^2$ function $f(x,y)=\sin(\cos(x)\times \sin(y))/(2\times 0.4^2)$ with Gaussian Kernels' approximated space.
Gaussian RBF's approximation of f
Exponential Kernel
Figure: Exponential RBF's approximation of f
(Inverse) Multiquadratic Kernel
Figure: Multiquadric RBF's approximation of f, $\beta = -2$
Good result for the projection of this$C^\infty(\mathbb{R}^2)$ function. It was expected as the (I)MQ is a simplistic form of the Gaussian Kernel. This why we get comparable result with a lesser precision.
Matern Kernel
where$d(\cdot,\cdot)$ is the Euclidean distance, $\Gamma$ is the gamma function, and $K_\nu$ is the modified Bessel function of the second kind of order $\nu$ .
For$\mathcal{C}^\infty$ function $f(x) = \cos(2\pi x)$
Figure: Gaussian, Matern ($\nu = 0.5$), and Exponential RBF's approximation of $f$
For$\mathcal{C}^0$ function $f(x) = 1 - |x|$
Figure: Gaussian, Matern ($\nu = 0.5$), and Exponential RBF's approximation of $f$
As expected for$\mathcal{C}^\infty$ , the Gaussian Kernel works better whereas for the $\mathcal{C}^0$ , it's the Matern Kernel and the Exponential that get better results.
Anisotropic Gaussian Kernel
The kernel is given by:
where$E$ is a symmetric positive definite matrix. If $E = \epsilon^2 I_d$ , we obtain the isotropic Gaussian kernel.
Anisotropic Gaussian RBF Result
The projection is good.
Anisotropic Gaussian RBF Result
Again, we obtain a very good projection of our function. The results are logically close to the Gaussian Kernel's results.
Result for the Poisson equation solving
where$f(x,y) = -4$ and $g(x,y) = x^2 + y^2$ .
Gaussian RBF's approximation
Exponential RBF's
Multiquadratic RBF's ($\beta=-2$)
Matern RBF's ($\nu=0.5$) approximation
Matern RBF's ($\nu=2.5$) approximation
The results are quite precise for the Gaussian, the IMQ, and the Matern kernel ($\nu=2.5$ ) as theorically expected. Indeed, those kernels allow precise approximation for functions that are at least twice differentiable as the Strong Form solving of the PDE impones.$\nu=0.5$ ) can't approach the solution as precisely as the others (again as theoritically expected).
The Exponential and the Matern (
Conclusion
In the future, I believe it would be interesting to start by implementing a more complete Matern Kernel with other orders than$\nu=0.5$ , $\nu=1.5$ and $\nu=2.5$ .The current Mattern Kernel is imported from gpytorch and their version only allows those three values.
Then, implementing other Radial Kernels like the Oscillatory kernel, learned kernels and maybe the most important one, the Compactly supported kernels. Indeed, the current Kernels are not compactly supported and therefore, the Matrices generated are often dense. Compactly supported Kernels would allow the use of sparce matrices and so enable far better performances.
And last but not least, testing the performance of the RBFs with different types of PDEs and ODEs with different boundary conditions.
Beta Was this translation helpful? Give feedback.
All reactions