random unit vector in multi-dimensional space

后端 未结 5 1958
栀梦
栀梦 2020-12-05 10:42

I\'m working on a data mining algorithm where i want to pick a random direction from a particular point in the feature space.

If I pick a random number for each of

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-05 11:23

    I had the exact same question when also developing a ML algorithm.
    I got to the same conclusion as Jim Lewis after drawing samples for the 2-d case and plotting the resulting distribution of the angle.

    Furthermore, if you try to derive the density distribution for the direction in 2d when you draw at random from [-1,1] for the x- and y-axis ,you will see that:

    f_X(x) = 1/(4*cos²(x)) if 0 < x < 45⁰
    and
    f_X(x) = 1/(4*sin²(x)) if x > 45⁰

    where x is the angle, and f_X is the probability density distribution.

    I have written about this here: https://aerodatablog.wordpress.com/2018/01/14/random-hyperplanes/

提交回复
热议问题