mxfusion.components.distributions.pointmass¶
Members¶
-
class
mxfusion.components.distributions.pointmass.
PointMass
(location, rand_gen=None, dtype=None, ctx=None)¶ Bases:
mxfusion.components.distributions.univariate.UnivariateDistribution
The Point Mass distribution.
Parameters: location – the location of the point mass. -
log_pdf_impl
(location, random_variable, F=None)¶ Computes the logarithm of probabilistic density function of the normal distribution.
Parameters: - F – MXNet computation type <mx.sym, mx.nd>.
- location – the location of the point mass.
- random_variable – the point to compute the logpdf for.
Returns: An operator chain to compute the logpdf of the Normal distribution.
-
draw_samples_impl
(location, rv_shape, num_samples=1, F=None)¶ The implementation of draw_samples for a specific distribution.
Parameters: Returns: a set samples of the distribution.
Rtypes: MXNet NDArray or MXNet Symbol or [MXNet NDArray or MXNet Symbol]
-
static
define_variable
(location, shape=None, rand_gen=None, dtype=None, ctx=None)¶ Creates and returns a random variable drawn from a Normal distribution.
Parameters: - location – the location of the point mass.
- shape – Shape of random variables drawn from the distribution. If non-scalar, each variable is drawn iid.
- rand_gen (RandomGenerator) – the random generator (default: MXNetRandomGenerator).
- dtype (numpy.float32 or numpy.float64) – the data type for float point numbers.
- ctx (None or mxnet.cpu or mxnet.gpu) – the mxnet context (default: None/current context).
Returns: RandomVariable drawn from the distribution specified.
-