File:Radial Basis Function Interpolation.svg

Summary

Description
English: Interpolation of on the interval [0,1] through 15 equally-spaced sample points using (where ε=3).
Date
Source Own work
Author Glosser.ca
SVG development
InfoField
Source code
InfoField

Mathematica code

rbf[\[Epsilon]_, x_] := Exp[-(\[Epsilon] x)^2];
g[x_] := Exp[x Cos[3 \[Pi] x]];

xs = Range[0, 14]/14;
ys = g[xs];

weights[\[Epsilon]_?InexactNumberQ] := LeastSquares[Outer[rbf[\[Epsilon], Abs[#1 - #2]] &, xs, xs], ys];
approx[\[Epsilon]_?InexactNumberQ] := weights[\[Epsilon]].rbf[\[Epsilon], x - xs];
error[\[Epsilon]_?InexactNumberQ] := NIntegrate[(g[x] - approx[\[Epsilon]])^2, {x, 0, 1}];

Plot[{g[x], approx[3]}, {x, 0, 1}, Epilog -> {PointSize[Medium], Point[{#, g[#]}] & /@ xs}]

See also

Radial Basis Function Interpolation Error.svg

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Category:CC-BY-SA-4.0#Radial%20Basis%20Function%20Interpolation.svg
Category:Self-published work Category:Interpolation Category:Plots Category:Functions (mathematics)
Category:CC-BY-SA-4.0 Category:Functions (mathematics) Category:Interpolation Category:Plots Category:Self-published work Category:Supersedes Category:Valid SVG created with Mathematica code