1
$\begingroup$

I tried to do some numerical integration on sparse grids and on full grids. The algorithm that I use (from the SparseGrid package in R) can only integrate over $[0,1]^d$, where $d$ is the dimension. As a function I wanted to use the unit $d-$sphere given by $$x_n = +\sqrt{1- \sum_{i=1}^{n-1} x_i^2}$$

In order to determine the integration error I use $$V_d=\frac{\pi^{\frac{d}{2}}}{\Gamma (\frac{d}{2} +1)}$$

to determine the volume of the unit $d-$ball. As I only integrate on $[0,1]^d$ I divide the above value by $2^{d}$ as the ball is symmetric.

In several casese, however, the error between the calculated and the exact error is bigger in the case of the full grid than in the case of the sparse grid. My intuition would tell me that the full grid should produce better results as there are much more evaluations. Is it just a coincidence that the sparse grid is not only faster but also sometimes produces better results and, if so, does this maybe have to to with the shrinking value of the unit $d-$ball? For example, the volume of the unit 5-ball is about 5.26. As I have to divide this value by $2^5$ the exact value that I am trying to find would be $\approx 0.164375$. In ten dimensions the exact value I want to find is about 0.00249023437 and, finally, converges to 0 for the dimension going off to infinity.

1 Answers 1

0

Your sparse grid method does not use uniform grids. Instead, it iteratively chooses grid points based on the value (and rate of change) of the integrand at prior grid points.

The strategy for choosing each new echelon of grid points is not the same for all sparse grid methods, but in general these methods will do very well with functions which are roughly uniform over a roguhly elliptical region. Your hypersphere volume integral is almost an unfair poster-child for the benefits of sparse grid methods.

As an analogy, compare the trapezoid rule and Simpson's rule for integrating $x^3$ over the range $1$ to $3$. The trapezoid rule with spacing $0.1$ uses $21$ samples and has error $1.37$. Simpson's rule with spacing $1$ uses $3$ samples and has error $0.00$. The huge discrepancy is because the problem chosen coincides with the cleverness injected into the more complicated algorithm.

In general, well-designed sparse grid methods will either work much faster or give a much lower error than uniform grid methods, or both.

  • 0
    The algorithm in the `R`-package creates the grid at once. So there is no iteration in creating the grid points.2017-01-31