geometrystatistics

How

  • Draw from a standard distribution for each dimension.
  • Do not draw from a uniform distribution.

Implementation

import numpy as np
import torch
 
# numpy
v = np.random.normal(0, 1, size)
 
# torch
v = torch.normal(torch.tensor([0.0] * size), torch.tensor([1.0] * size))

Why that works

  • Considering a 2D space, the probability of a point being at is
  • The PDF for the standard distribution is , which is roughly in the form of
  • Thus is in the form of , which is a function of the distance to the origin
  • So the resulting distribution is radially symmetric around the origin

An intuitive explanation of why uniform sampling don’t work

  • Considering a 2D space, uniformly sampling from both dimension results in a square population
  • Whereas a random distribution in 2D space should be a circle
  • This is called the corner effect