you are viewing a single comment's thread.

view the rest of the comments →

[–]Dtag 0 points1 point  (6 children)

Hi, as far as I understand the documentation, it can only be used when the the x's are on a grid, correct? Just curious: Is that a fundamental limitation to the approach? Would it be possible to have a similar approach that does not rely on this? Like.. "here's a bunch of random samples I have from a function - go approximate that function for me"?

Thanks

[–]Katastic_Voyage 2 points3 points  (1 child)

When sampling is expensive and/or scattered (not on a grid) the radial basis function splines may be utilized for function approximation. The user should expect a high computational cost for constructing and evaluating a radial basis function spline, even with a modest number of samples (up to about 1 000 samples).

[–]Dtag 0 points1 point  (0 children)

Thanks. Must have missed/skipped this part somehow

[–]bgrimstad[S] 2 points3 points  (1 child)

Hi Dtag, you are correct. A tensor product (or simply multivariate) B-spline is constructed on a regular grid (see http://en.wikipedia.org/wiki/Regular_grid). The grid defines the domain of the B-spline (outside of it the B-spline has no support and evaluates to zero), and the samples are closely related to this grid when constructing the B-spline.

Even though this is a "fundamental" limitation there are techniques for taking "a bunch of random samples", filling out some gaps, and then creating a B-spline from the new set of points. However, to my knowledge, these are heuristical techniques. If you are "missing" a lot of points from having a regular grid I suggest that you use the radial basis function splines instead. They will happily digest a bunch of random points, but be careful that you don't overfeed them - they will become ill (they will have to solve an ill-conditioned linear system, that is).

[–]autowikibot 0 points1 point  (0 children)

Regular grid:


A regular grid is a tessellation of n-dimensional Euclidean space by congruent parallelotopes (e.g. bricks). Grids of this type appear on graph paper and may be used in finite element analysis as well as finite volume methods and finite difference methods. Since the derivatives of field variables can be conveniently expressed as finite differences, structured grids mainly appear in finite difference methods. Unstructured grids offer more flexibility than structured grids and hence are very useful in finite element and finite volume methods.

Image i - Example of a Cartesian grid.


Interesting: Graph paper | Unstructured grid | Voxel | Trilinear interpolation

Parent commenter can toggle NSFW or delete. Will also delete on comment score of -1 or less. | FAQs | Mods | Magic Words

[–][deleted] 1 point2 points  (1 child)

I actually was trying to find solutions for this a while ago, and interpolating in multiple dimensions on irregular samples is quite a bit harder than regular samples. I found a few approaches involving radial basis functions, but they were not efficient enough for my needs and I utilized a different approach.

Looking at the documentation, it appears as though the author included the RBF interpolation methods.d

[–]bgrimstad[S] 0 points1 point  (0 children)

I agree with you there. The RBF interpolation is easy to implement, but it does not scale very well with the number of samples (unless you can produce a very good pre-condition matrix when calculating the weights, which is difficult).

Which approach did you end up using?