Using Gaussian Kernel to Define Distance

41 Views Asked by At

I want to define a region of ball with radius $R$ such that close to center the value is 1 and at the boundary, the value is 0. The gaussian kernel comes to my mind but I would like to know how can I set the $\sigma^2$ such that it works with given radius?

$$f(x,x')=e^{-\tfrac{||x-x'||^2}{2\sigma^2}}$$ such that at $x'=R$ the function is 0?

1

There are 1 best solutions below

2
On BEST ANSWER

If you want a function that goes to $0$ at $\Vert x-x^\prime\Vert=R$, you could instead use $\left(1-\tfrac{\Vert x-x^\prime\Vert^2}{R^2}\right)^+$ with $y^+:=\max\{y,\,0\}$. A Gaussian kernel never becomes $0$.