Top |
NcmStatsDistKernelGaussNcmStatsDistKernelGauss — An N-dimensional Gaussian kernel used to compute the kernel density estimation function (KDE) in the NcmStatsDist class. An N-dimensional Gaussian kernel used to compute the kernel density estimation function (KDE) in the NcmStatsDist class. |
This object defines a multivariate Gaussian kernel to be used in the NcmStatsDistKernel class. Also, this object implements the virtual methods of the NcmStatsDistKernel class. For more information, check the documentation of NcmStatsDistKernel. Below, there are some definitions of the multivariate Gaussian distribution. For more information, check [On Sampling from the Multivariate t Distribution, Marius Hofert].
The multivariate Normal distribution has its stochastic representation as \begin{align} \textbf{X} &= \mu + A \textbf{Z} ,\end{align} where $\textbf{Z}= (Z_1,Z_2,...,Z_n)$ is a $n$-dimension random vector whose components are independent normal random variables. $A$ is a $d \times n$ matrix and $\mu$ is a $d$-dimensional random vector that defines the mean of the distribution. The covariance matrix is defined as $\Sigma = AA^T$, such that the distribtuion of $\textbf{X}$ is uniquely defined by its covariance matrix and the mean vector, that is,$ \textbf{X} \sim N(\mu, \Sigma)$.
Assuming that $n=d$, the probability density function (pdf) of $\textbf{X}$ is \begin{align} \label{pdf} f_{\textbf{X}(x)} = \frac{1}{(2\pi)^{\frac{d}{2}} \sqrt{det \Sigma}} \exp\left[-\frac{1}{2}(x-\mu)^T \Sigma^-1 (x-\mu)\right] ,\end{align} considering that the covariance matrix is positive definite and $x \in \mathbb{R^d}$. Also, the covariance matrix can be decomposed in its Cholesky decomposition, \begin{align} \Sigma = LL^T ,\end{align} where $L$ is a triangular matrix with positive definite values. This decomposition can facilitate some computational calculations.
This object uses the pdf given by equation \eqref{pdf} to define a Gaussian kernel, such that it can generate points distributed by multivariate Gaussian distributions. The normal distribution is easy to sample from and therefore is commonly used as a kernel.
The user must provide the following input value: dim
- ncm_stats_dist_kernel_gauss_new()
. Once this object is initialized,
the user can use the methods in the NcmStatsDistKernel class with this object.
NcmStatsDistKernelGauss *
ncm_stats_dist_kernel_gauss_new (const guint dim
);
Creates a new NcmStatsDistKernelGauss object with sample dimension dim
.
NcmStatsDistKernelGauss *
ncm_stats_dist_kernel_gauss_ref (NcmStatsDistKernelGauss *sdkg
);
Increase the reference of stats_dist_nd_vbk_gauss
by one.
void
ncm_stats_dist_kernel_gauss_free (NcmStatsDistKernelGauss *sdkg
);
Decrease the reference count of stats_dist_nd_vbk_gauss
by one.
void
ncm_stats_dist_kernel_gauss_clear (NcmStatsDistKernelGauss **sdkg
);
Decrease the reference count of stats_dist_nd_vbk_gauss
by one, and sets the pointer *stats_dist_nd_vbk_gauss
to
NULL.