Timeline for Generate points of a (n-2)-sphere on a n-hyperplane
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 19, 2012 at 15:34 | comment | added | Douglas Zare | That formula is incorrect. You are normalizing first and then projecting. Instead, you should project first and then normalize the new coordinates. Do not divide by the length of the old, unprojected coordinates. | |
Jun 19, 2012 at 14:21 | comment | added | David | Problem solved. See my answer below. | |
Jun 19, 2012 at 13:17 | vote | accept | David | ||
Jun 19, 2012 at 19:19 | |||||
Jun 19, 2012 at 12:57 | comment | added | David | Ok, let's think about it in $\mathbb{R}^3$. You sample m observations of 3 independent gaussians $(a_1,a_2,a_3)$ which you project orthogonally to the plane x+y+z = 1. So now you get a series of m points on your plane. You normalize using $\frac{a_i}{\sqrt{a_1^2+a_2^2+a_3^2}}$ with the projected coordinates. Then you will get a semi-sphere intersecting your plane not a parallel circle. If I misunderstood, the solution might be to normalize "in 2D" ie on the plane using only 2 coordinates and a basis of the plane but I do not see what general formula to use if we leave $\mathbb{R}^3$. | |
Jun 19, 2012 at 12:22 | comment | added | Douglas Zare | No, that's not how normalization works. | |
Jun 19, 2012 at 10:43 | comment | added | David | wouldn't this give you points inside the sphere instead of on the surface of the sphere ? Meaning if you refer to the graph I posted in 3D the result would be a disc. | |
Jun 19, 2012 at 9:20 | comment | added | Douglas Zare | (1) Generate a rotationally symmetric Gaussian distribution. (2) Project to the hyperplane through the origin parallel to your hyperplane. (3) Normalize to get a uniform distribution on a sphere in the hyperplane. (4) Translate back to your hyperplane. Which step is the problem? And if you need a sphere of a different radius you rescale in step (3). | |
Jun 19, 2012 at 8:22 | comment | added | David | I understood the principle but how to apply it (in my case) ? + another question comes to my mind, how do you manage the radius then ? | |
Jun 19, 2012 at 8:14 | comment | added | Douglas Zare | You normalize after you project, and the normalized vector stays parallel to the subspace. | |
Jun 19, 2012 at 8:07 | comment | added | David | How would you normalize w.r.t a linear subspace ? I think here lies the point I am missing. | |
Jun 19, 2012 at 4:20 | comment | added | Ori Gurel-Gurevich | Of course, you should do it w.r.t. a linear subspace if you want the normalization to preserve the subspace. | |
Jun 19, 2012 at 1:52 | history | answered | Jason Cantarella | CC BY-SA 3.0 |