ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
This module contains classes and procedures for computing various statistical quantities related to the Multiple MultiVariate Uniform Ellipsoid (MMVUE) distribution. More...
Data Types | |
type | distUnifElls_type |
This is the derived type for signifying distributions that are of type Multiple MultiVariate Uniform Ellipsoid (MMVUE) as defined in the description of pm_distUnifElls. More... | |
interface | getUnifEllsLogPDF |
Generate and return the natural logarithm of an approximation of the Probability Density Function (PDF) of the Multiple MultiVariate Uniformly Ellipsoidal (MMVUE) Distribution. More... | |
interface | setUnifEllsRand |
Return a collection of random vectors of size ndim from the ndim -dimensional Multiple MultiVariate Uniform Ellipsoidal (MMVUE) distribution, with the specified input mean(1:ndim, 1:nell) and optionally the specified subset of the Cholesky Factorization of the Gramian matrices of the MMVUE distribution.More... | |
Variables | |
character(*, SK), parameter | MODULE_NAME = "@pm_distUnifElls" |
This module contains classes and procedures for computing various statistical quantities related to the Multiple MultiVariate Uniform Ellipsoid (MMVUE) distribution.
Specifically, this module contains routines for computing the following quantities of the Multiple MultiVariate Uniform Ellipsoid (MMVUE) distribution:
An \(\ndim\)-dimensional MMVUE distribution is represented by a set of \(\ndim\)-dimensional hyper-ellipsoid supports.
The MMVUE distribution is fully determined by a set of ellipsoids \(\ell_i, i = 1 : N_\ell\) containing its support.
An ellipsoid \(\ell\) is in turn fully determined by its representative Gramian matrix \(\gramian_\ell\), containing all points in \(\mathbb{R}^\ndim\) that satisfy,
\begin{equation} \large (X - \mu_\ell)^T ~ \gramian_\ell^{-1} ~ (X - \mu_\ell) \leq 1 ~, \end{equation}
where \(\mu_\ell\) represents the center of the ellipsoid, \((X - \mu_\ell)^T\) is the transpose of the vector \((X - \mu_\ell)\), and \(\gramian_\ell^{-1}\) is the inverse of the matrix \(\gramian_\ell\).
The volume of this ellipsoid is given by,
\begin{equation} \large V(\ell) = V_\ndim \sqrt{\left| \gramian_\ell \right|} ~, \end{equation}
where \(\left|\gramian_\ell\right|\) is the determinant of \(\gramian_\ell\) and,
\begin{equation} \large V_\ndim = \frac{\pi^{\ndim / 2}}{\up\Gamma(1 + \ndim / 2)} = \begin{cases} \frac{1}{(\ndim/2)!} \pi^{\ndim/2} & \text{if $\ndim$ is even} \\\\ 2^\ndim \frac{1}{\ndim!} \big( \frac{\ndim-1}{2} \big)! ~ \pi^{(\ndim-1)/2} & \text{if $\ndim$ is odd} \end{cases} \end{equation}
is the volume of an \(\ndim\)-ball (that is, a unit-logChoDia \(\ndim\)-dimensional hyper-sphere).
It is readily seen that the corresponding unit-volume ellipsoid \(\widehat\ell\) has the representative Gramian matrix,
\begin{equation} \large \gramian_{\widehat\ell} = V_\ell^{-2/\ndim} ~ \gramian_\ell ~. \end{equation}
More generally, to scale the ellipsoidal support of an MMVUE distribution \(\ell\) by some factor \(\alpha\) along each coordinate axis, it suffices to be used the new scaled ellipsoid \(\ell^*\) with the representative Gramian matrix,
\begin{equation} \large \gramian_{\ell^*} = \alpha^2 ~ \gramian_\ell ~, \end{equation}
in which case, the volume of \(\ell^*\) becomes,
\begin{equation} \large V_{\ell^*} = \alpha^\ndim ~ V_\ell ~. \end{equation}
The Probability Density Function (PDF) of the MMVUE distribution with multiple-ellipsoidal support \(\ell\) is given by,
\begin{equation} \large \pi(X | \ell) = \frac{1}{V(\ell)} = \frac{1}{V_\ndim \sqrt{\left|\gramian_\ell\right|}} ~, \end{equation}
where \(\sqrt{\left|\gramian_\ell\right|}\) represents the union of the volumes of all ellipsoids representing the distribution.
Because there is no closed-form expression for the shared volume of two more overlapping ellipsoids, this union of volumes must be approximated.
Within this module, this approximation is done using a Monte Carlo approach via the generic interface getUnifEllsLogPDF.
Random Number Generation
Note that in an MMVUE distribution, multiple ellipsoids can have partially overlapping support, in which case, the shared support is counted only once in random number generation.
Therefore, the random number generation has to be carefully done so that overlapping ellipsoids are not sampled too often.
The RNG generic interfaces within this module generate uniformly-distributed random vectors from within a single \(\ndim\)-dimensional hyper-ellipsoid by generalizing the proposed approach of Marsaglia (1972) for choosing a point from the surface of a sphere.
\begin{equation} \unit{r} = \frac{1}{\sqrt{\sum_{i=1}^\ndim g_i^2}} \sum_{j=1}^{\ndim} g_j \unit{r}_j ~, \end{equation}
where \(\unit{r}_j\) are the unit vectors representing the orthogonal basis the of \(\ndim\)-space.\begin{equation} \bs{r}_{\sphere} = u^{1/\ndim} \unit{r} ~, \end{equation}
represents a vector pointing to a uniformly-distributed location inside of the \(\ndim\)-sphere.\begin{equation} \gramian = \mat{L}\mat{L}^H ~, \end{equation}
where \(\mat{L}\) is the left triangular matrix resulting from the Cholesky factorization, and \(\mat{L}^T\) is its Hermitian transpose.\begin{equation} \bs{r}_\ell = \mat{L} ~ \bs{r}_\sphere + \mu_\ell ~, \end{equation}
is uniformly distributed inside ellipsoid \(\ell\) centered at \(\mu_\ell\).The covariance matrix of a single ellipsoidal support in the MMVUE distribution
The covariance matrix of the multivariate uniform ellipsoidal distribution is given by its Gramian matrix as,
\begin{eqnarray*} \Sigma = \frac{\gramian}{\ndim + 2} ~, \end{eqnarray*}
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
character(*, SK), parameter pm_distUnifElls::MODULE_NAME = "@pm_distUnifElls" |
Definition at line 165 of file pm_distUnifElls.F90.