mx.nd.random.pdf.generalized.negative.binomial
¶
Description¶
Computes the value of the PDF of sample of generalized negative binomial distributions with parameters mu (mean) and alpha (dispersion). This can be understood as a reparameterization of the negative binomial, where k = 1 / alpha and p = 1 / (mu * alpha + 1).
mu and alpha must have the same shape, which must match the leftmost subshape of sample. That is, sample can have the same shape as mu and alpha, in which case the output contains one density per distribution, or sample can be a tensor of tensors with that shape, in which case the output is a tensor of densities such that the densities at index i in the output are given by the samples at index i in sample parameterized by the values of mu and alpha at index i.
Example:
random_pdf_generalized_negative_binomial(sample=[[1, 2, 3, 4]], alpha=[1], mu=[1]) =
[[0.25, 0.125, 0.0625, 0.03125]]
sample = [[1,2,3,4],
[1,2,3,4]]
random_pdf_generalized_negative_binomial(sample=sample, alpha=[1, 0.6666], mu=[1, 1.5]) =
[[0.25, 0.125, 0.0625, 0.03125 ],
[0.26517063, 0.16573331, 0.09667706, 0.05437994]]
Arguments¶
Argument |
Description |
---|---|
|
NDArray-or-Symbol. Samples from the distributions. |
|
NDArray-or-Symbol. Means of the distributions. |
|
boolean, optional, default=0. If set, compute the density of the log-probability instead of the probability. |
|
NDArray-or-Symbol. Alpha (dispersion) parameters of the distributions. |
Value¶
out
The result mx.ndarray
Link to Source Code: http://github.com/apache/incubator-mxnet/blob/1.6.0/src/operator/random/pdf_op.cc#L314