tfd_doublesided_maxwell {tfprobability} | R Documentation |
Double-sided Maxwell distribution.
Description
This distribution is useful to compute measure valued derivatives for Gaussian distributions. See Mohamed et al. (2019) for more details.
Usage
tfd_doublesided_maxwell(
loc,
scale,
validate_args = FALSE,
allow_nan_stats = TRUE,
name = "doublesided_maxwell"
)
Arguments
loc |
Floating point tensor; location of the distribution |
scale |
Floating point tensor; the scales of the distribution. Must contain only positive values. |
validate_args |
Logical, default FALSE. When TRUE distribution parameters are checked for validity despite possibly degrading runtime performance. When FALSE invalid inputs may silently render incorrect outputs. Default value: FALSE. |
allow_nan_stats |
Logical, default TRUE. When TRUE, statistics (e.g., mean, mode, variance) use the value NaN to indicate the result is undefined. When FALSE, an exception is raised if one or more of the statistic's batch members are undefined. |
name |
string prefixed to Ops created by this class. Default value: 'doublesided_maxwell'. |
Details
Mathematical details
The double-sided Maxwell distribution generalizes the Maxwell distribution to the entire real line.
pdf(x; mu, sigma) = 1/(sigma*sqrt(2*pi)) * ((x-mu)/sigma)^2 * exp(-0.5 ((x-mu)/sigma)^2)
where loc = mu
and scale = sigma
.
The DoublesidedMaxwell distribution is a member of the
location-scale family,
i.e., it can be constructed as,
X ~ DoublesidedMaxwell(loc=0, scale=1) Y = loc + scale * X
The double-sided Maxwell is a symmetric distribution that extends the one-sided maxwell from R+ to the entire real line. Their densities are therefore the same up to a factor of 0.5.
It has several methods for generating random variates from it. The version here uses 3 Gaussian variates and a uniform variate to generate the samples The sampling path is:
mu + sigma* sgn(U-0.5)* sqrt(X^2 + Y^2 + Z^2) U~Unif; X,Y,Z ~N(0,1)
In the sampling process above, the random variates generated by sqrt(X^2 + Y^2 + Z^2) are samples from the one-sided Maxwell (or Maxwell-Boltzmann) distribution.
Value
a distribution instance.
References
-
Mohamed, et all, "Monte Carlo Gradient Estimation in Machine Learning.",2019
B. Heidergott, et al "Sensitivity estimation for Gaussian systems", 2008. European Journal of Operational Research, vol. 187, pp193-207.
G. Pflug. "Optimization of Stochastic Models: The Interface Between Simulation and Optimization", 2002. Chp. 4.2, pg 247.
See Also
For usage examples see e.g. tfd_sample()
, tfd_log_prob()
, tfd_mean()
.