xtensor.random Random number generator operations#

pytensor.xtensor.random.as_xrv(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

Helper function to define an XRV constructor.

Parameters:
  • core_op (RandomVariable) – The core random variable operation to wrap.

  • core_inps_dims_map (Sequence[Sequence[int]] | None, optional) – A sequence of sequences mapping the core dimensions (specified by the user) for each input parameter. This is used when lowering to a RandomVariable operation, to decide the ordering of the core dimensions for each input. If None, it assumes the core dimensions are positional from left to right.

  • core_out_dims_map (Sequence[int] | None, optional) – A sequence mapping the core dimensions (specified by the user) for the output variable. This is used when lowering to a RandomVariable operation, to decide the ordering of the core dimensions for the output. If None, it assumes the core dimensions are positional from left to right.

pytensor.xtensor.random.bernoulli(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of bernoulli for XTensorVariables

pytensor.xtensor.random.beta(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of beta for XTensorVariables

pytensor.xtensor.random.betabinom(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of beta_binomial for XTensorVariables

pytensor.xtensor.random.binomial(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of binomial for XTensorVariables

pytensor.xtensor.random.categorical(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of categorical for XTensorVariables

pytensor.xtensor.random.cauchy(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of cauchy for XTensorVariables

pytensor.xtensor.random.chisquare(df, extra_dims=None, rng=None)[source]#

Chi-square random variable.

pytensor.xtensor.random.dirichlet(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of dirichlet for XTensorVariables

pytensor.xtensor.random.exponential(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of exponential for XTensorVariables

pytensor.xtensor.random.gamma(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of gamma for XTensorVariables

pytensor.xtensor.random.gengamma(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of gengamma for XTensorVariables

pytensor.xtensor.random.geometric(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of geometric for XTensorVariables

pytensor.xtensor.random.gumbel(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of gumbel for XTensorVariables

pytensor.xtensor.random.halfcauchy(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of halfcauchy for XTensorVariables

pytensor.xtensor.random.halfnormal(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of halfnormal for XTensorVariables

pytensor.xtensor.random.hypergeometric(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of hypergeometric for XTensorVariables

pytensor.xtensor.random.integers(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of integers for XTensorVariables

pytensor.xtensor.random.invgamma(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of invgamma for XTensorVariables

pytensor.xtensor.random.laplace(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of laplace for XTensorVariables

pytensor.xtensor.random.logistic(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of logistic for XTensorVariables

pytensor.xtensor.random.lognormal(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of lognormal for XTensorVariables

pytensor.xtensor.random.multinomial(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of multinomial for XTensorVariables

pytensor.xtensor.random.multivariate_normal(mean, cov, *, core_dims, extra_dims=None, rng=None, method='cholesky')[source]#

Multivariate normal random variable.

pytensor.xtensor.random.nbinom(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of negative_binomial for XTensorVariables

pytensor.xtensor.random.negative_binomial(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of negative_binomial for XTensorVariables

pytensor.xtensor.random.normal(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of normal for XTensorVariables

pytensor.xtensor.random.pareto(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of pareto for XTensorVariables

pytensor.xtensor.random.poisson(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of poisson for XTensorVariables

pytensor.xtensor.random.rayleigh(scale, extra_dims=None, rng=None)[source]#

Rayleigh random variable.

pytensor.xtensor.random.standard_normal(extra_dims=None, rng=None)[source]#

Standard normal random variable.

pytensor.xtensor.random.t(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of t for XTensorVariables

pytensor.xtensor.random.triangular(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of triangular for XTensorVariables

pytensor.xtensor.random.truncexpon(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of truncexpon for XTensorVariables

pytensor.xtensor.random.uniform(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of uniform for XTensorVariables

pytensor.xtensor.random.vonmises(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of vonmises for XTensorVariables

pytensor.xtensor.random.wald(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of wald for XTensorVariables

pytensor.xtensor.random.weibull(core_op, core_inps_dims_map=None, core_out_dims_map=None, name=None)[source]#

XRV version of weibull for XTensorVariables