r_mvmf_polysph: Sample mixtures of von Mises-Fisher distributed polyspherical...

View source: R/samplers.R

r_mvmf_polysphR Documentation

Sample mixtures of von Mises–Fisher distributed polyspherical data

Description

Simulates from an m-mixture of product of von Mises–Fisher distributions on the polysphere \mathcal{S}^{d_1} \times \cdots \times \mathcal{S}^{d_r}.

Usage

r_mvmf_polysph(n, d, mu, kappa, prop, norm_mu = FALSE)

Arguments

n

sample size.

d

vector of size r with dimensions.

mu

a matrix of size c(m, sum(d + 1)) with the means of each mixture components in the rows.

kappa

a matrix of size c(m, r) with the concentrations of each mixture components in the rows.

prop

a vector of size m with the proportions of the mixture components.

norm_mu

ensure a normalization of mu? Defaults to FALSE.

Value

A matrix of size c(n, sum(d) + r) with the sample.

Examples

# Simulate mixture of vMF data on (S^1)^2
r_mvmf_polysph(n = 10, d = c(1, 1),
               mu = rbind(c(0, 1, 0, 1), c(1, 0, 1, 0)),
               kappa = rbind(c(5, 2), c(1, 2)), prop = c(0.7, 0.3))

polykde documentation built on Aug. 8, 2025, 6:55 p.m.