I have a problem where I heavily need to restrict the number of points at which I sample a function based on the values of a different function.
I have two functions:
- $f:{\mathbb{R}\times [0,\infty)\times[0,\infty) }\rightarrow\mathbb{R}$, which is a probability density, generated on a set of data, using Gaussian kernels
- $\sigma:\mathbb{R}^3\rightarrow\mathbb{R}$, which contains information about the quality of my model.
I try to evaluate to total quality of my model, by sampling points from the space $[a,b] \times [c,d] \times[e,f]$ and integrating over the product $f \cdot \sigma$. The intervals correspond to the natural boundaries of my data.
$f$ has at least two peaks, but could contain more interesting points, yet $f([a,b] \times [c,d] \times[e,f])$ evaluates to $0$ in most points.
Now to the problem:
$f$ is relativeley easy to compute for a big amount of points, while $\sigma$ is computationally quite heavy. Therefore I try to find a way to sample $\sigma$ (or both functions) at fewer points, by using $f$ as a literal "density", sampling more points in regions of local extremes, or a higher probability density, while sampling fewer points in the regions where $f$ is $0$ or near $0$ anyway.
Is there a good/efficient way to do so? Main goal is avoiding skipping over intersting regions in $f$ while keeping the number of samples as low as possible. Bonus points: Is there MATLAB funtionality to do so, already?