I have a function $f, R^n \rightarrow R$ , which I evaluate at a vector $x \in R^n$. So, $f(x) = y$.
Now, I calculate $f'(x) = g, g \in R^n$ . I want to "move" x in the tangent space of $f$. The part I'm stuck at, is rather silly.
I compute a vector projected to the tangent space as below:
- $g \in R^n$ is the gradient of $f$ at $x$. Compute $g_u$, which is $g$ unit normalized.
- Sample a random vector $v \in R^n$ from a Unit Gaussian.
- Compute $ w = v - <v,g_u> g_u$ , where $<.>$ is the inner product. So, $w \in R^n$ is the vector $v$ projected to tangent space of $f$.
I have two questions:
- Is the above procedure of finding a direction in the tangent space correct? If not, how do I find a random vector in the tangent space of $f$ for given $x$ and $f'(x)$ ?
- If it is correct, now that I have $w$ which is a vector in the tangent space of $f$, how do I use it to "move" $x$ in the tangent space? Right now, I do $x = x + \alpha*w$, where $\alpha$ is simply the step size.
Thank you for the help.
What is sure:
What is less sure is:
But why don't you use a Unit Gaussian distribution in $\mathbb R^{n-1}$ and a basis in the tangent plane?
At the end, the most important question is to understand what kind of distribution do you expect in the tangent plane?