Skip to main content
added 12 characters in body
Source Link
Charlie Parker
  • 7.1k
  • 14
  • 77
  • 130

I want to choose a random vector in high dimensions such that it all directions have the same uniform chance (i.e. isotropic in all directions). My current idea is the following algorithm:

  1. sample v from a high dim multivariate Gaussian
  2. then normalize that vector by dividing by its norm

I believe this is sufficient but don't know how to prove it. I know that high dimension stats can have weird behaviours (like most of the volume of a Gaussian is at the "edge") so I wanted to make sure I didn't miss anything trivial but important. Anyone know if this is correct? If it is how do I prove it?


What I have in mind in pytorch looks as follows:

v = MultivariateNormal(torch.zeros(210000), torch.eye(210000))
v = v/v.norm(210000)

I want to choose a random vector in high dimensions such that it all directions have the same uniform chance (i.e. isotropic in all directions). My current idea is the following algorithm:

  1. sample v from a high dim multivariate Gaussian
  2. then normalize that vector by dividing by its norm

I believe this is sufficient but don't know how to prove it. I know that high dimension stats can have weird behaviours (like most of the volume of a Gaussian is at the "edge") so I wanted to make sure I didn't miss anything trivial but important. Anyone know if this is correct? If it is how do I prove it?


What I have in mind in pytorch looks as follows:

v = MultivariateNormal(torch.zeros(2), torch.eye(2))
v = v/v.norm(2)

I want to choose a random vector in high dimensions such that it all directions have the same uniform chance (i.e. isotropic in all directions). My current idea is the following algorithm:

  1. sample v from a high dim multivariate Gaussian
  2. then normalize that vector by dividing by its norm

I believe this is sufficient but don't know how to prove it. I know that high dimension stats can have weird behaviours (like most of the volume of a Gaussian is at the "edge") so I wanted to make sure I didn't miss anything trivial but important. Anyone know if this is correct? If it is how do I prove it?


What I have in mind in pytorch looks as follows:

v = MultivariateNormal(torch.zeros(10000), torch.eye(10000))
v = v/v.norm(10000)
Source Link
Charlie Parker
  • 7.1k
  • 14
  • 77
  • 130

How does one choose a random isotropic direction and then have the vector have norm 1?

I want to choose a random vector in high dimensions such that it all directions have the same uniform chance (i.e. isotropic in all directions). My current idea is the following algorithm:

  1. sample v from a high dim multivariate Gaussian
  2. then normalize that vector by dividing by its norm

I believe this is sufficient but don't know how to prove it. I know that high dimension stats can have weird behaviours (like most of the volume of a Gaussian is at the "edge") so I wanted to make sure I didn't miss anything trivial but important. Anyone know if this is correct? If it is how do I prove it?


What I have in mind in pytorch looks as follows:

v = MultivariateNormal(torch.zeros(2), torch.eye(2))
v = v/v.norm(2)