bayespy.utils.random¶

General functions random sampling and distributions.

Functions

 alpha_beta_recursion(logp0, logP) Compute alpha-beta recursion for Markov chain bernoulli(p[, size]) Draw random samples from the Bernoulli distribution. categorical(p[, size]) Draw random samples from a categorical distribution. correlation(D) Draw a random correlation matrix. covariance(D[, size, nu]) Draw a random covariance matrix. dirichlet(alpha[, size]) Draw random samples from the Dirichlet distribution. gamma(a, b[, size]) gamma_entropy(a, log_b, gammaln_a, psi_a, …) Entropy of . gamma_logpdf(bx, logx, a_logx, a_logb, gammaln_a) Log-density of . gaussian_entropy(logdet_V, D) Compute the entropy of a Gaussian distribution. gaussian_gamma_to_t(mu, Cov, a, b[, ndim]) Integrates gamma distribution to obtain parameters of t distribution gaussian_logpdf(yVy, yVmu, muVmu, logdet_V, D) Log-density of a Gaussian distribution. intervals(N, length[, amount, gap]) Return random non-overlapping parts of a sequence. invwishart_rand(nu, V) Solves p from log(p/(1-p)) mask(*shape[, p]) Return a boolean array of the given shape. multinomial(n, p[, size]) orth(D) Draw random orthogonal matrix. sphere([N]) Draw random points uniformly on a unit sphere. svd(s) Draw a random matrix given its singular values. t_logpdf(z2, logdet_cov, nu, D) wishart(nu, V) Draw a random sample from the Wishart distribution. wishart_rand(nu, V) Draw a random sample from the Wishart distribution.