Skip to content
class

VonMises

extendsDistribution
VonMises(loc: Tensor | float, concentration: Tensor | float, validate_args: bool | None = None)

Circular Von Mises distribution on [−π,π][-\pi, \pi].

The circular analogue of the Normal distribution on the unit circle, with density

p(x;μ,κ)=exp⁡(κcos⁡(x−μ))2πI0(κ)p(x; \mu, \kappa) = \frac{\exp(\kappa \cos(x - \mu))}{2\pi I_0(\kappa)}

where μ∈R\mu \in \mathbb{R} is the circular mean / mode, κ>0\kappa > 0 is the concentration, and I0I_0 is the modified Bessel function of order zero.

Parameters

locTensor or float
Circular mean / mode μ∈R\mu \in \mathbb{R} (radians).
concentrationTensor or float
Concentration parameter κ>0\kappa > 0.
validate_argsbool | None= None
If True, validate parameter constraints at construction time.

Used by 1

Constructors

1
dunder

__init__

→None
__init__(loc: Tensor | float, concentration: Tensor | float, validate_args: bool | None = None)

Initialise a VonMises distribution.

Properties

3
prop

variance

→Tensor
variance: Tensor

Circular variance 1−I1(κ)/I0(κ)1 - I_1(\kappa) / I_0(\kappa).

Instance methods

3
fn

expand

→Self
expand(batch_shape: Sequence[int], _instance: Self | None = None)

Return a new VonMises instance expanded to batch_shape.

fn

log_prob

→Tensor
log_prob(value: Tensor)

Log-probability density evaluated at value.

fn

sample

→Tensor
sample(sample_shape: tuple[int, ...] = ())

Draw non-reparameterised samples via Best & Fisher (1979) rejection sampling.