SphericallyCorrelated

class qdflow.util.distribution.SphericallyCorrelated(n, radius=1)

Bases: CorrelatedDistribution[float]

A CorrelatedDistribution which returns n variables drawn uniformly from the surface of an n-dimensional hypershphere with the given radius (or radius drawn from the given Distribution).

Parameters:
  • n (int) – The number of variables.

  • radius (float | Distribution[float]) – The radius of the hypersphere or a distribution from which to draw such radius.

__init__(n, radius=1)

Methods

draw(rng[, size])

Draws one or more samples from the distribution.