Class

NumCosmoMathStatsDistKernelGauss

Description [src]

final class NumCosmoMath.StatsDistKernelGauss : NumCosmoMath.StatsDistKernel
{
  /* No available fields */
}

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.

Constructors

ncm_stats_dist_kernel_gauss_new

Creates a new NcmStatsDistKernelGauss object with sample dimension dim.

Functions

ncm_stats_dist_kernel_gauss_clear

Decrease the reference count of stats_dist_nd_vbk_gauss by one, and sets the pointer *stats_dist_nd_vbk_gauss to NULL.

Instance methods

ncm_stats_dist_kernel_gauss_free

Decrease the reference count of stats_dist_nd_vbk_gauss by one.

ncm_stats_dist_kernel_gauss_ref

Increase the reference of stats_dist_nd_vbk_gauss by one.

Methods inherited from NcmStatsDistKernel (10)
ncm_stats_dist_kernel_eval_sum0_gamma_lambda

Computes the weighted sum of kernels at $\chi^2=$chi2 (the density estimator function), $$ e^\gamma (1+\lambda) = \sum_i w_i\bar{K} (\chi^2_i) / u_i,$$ where $\gamma = \ln(w_a\bar{K} (\chi^2_a) / u_a)$ and $a$ labels is the largest term of the sum. This function shall be used when each kernel has a different normalization factor.

ncm_stats_dist_kernel_eval_sum1_gamma_lambda

Computes the weighted sum of kernels at $\chi^2=$chi2 (the density estimator function), $$ e^\gamma (1+\lambda) = \sum_i w_i\bar{K} (\chi^2_i) / u,$$ where $\gamma = \ln(w_a\bar{K} (\chi^2_a) / u)$ and $a$ labels is the largest term of the sum. This function shall be used when all the kernels have the same normalization factor.

ncm_stats_dist_kernel_eval_unnorm

Computes the unnormalized kernel at $\chi^2=$chi2.

ncm_stats_dist_kernel_eval_unnorm_vec

Computes the unnormalized kernel at $\chi^2=$chi2 for all elements of chi2 and store the results at Ku.

ncm_stats_dist_kernel_free

Decrease the reference count of sdk by one.

ncm_stats_dist_kernel_get_dim

Gets current kernel dimension.

ncm_stats_dist_kernel_get_lnnorm

Computes the kernel normalization for a given covariance cov_decomp.

ncm_stats_dist_kernel_get_rot_bandwidth

Computes the rule-of-thumb bandwidth for a interpolation using n kernels.

ncm_stats_dist_kernel_ref

Increase the reference of sdk by one.

ncm_stats_dist_kernel_sample

Generates a random vector from the kernel distribution using the covariance cov_decomp, bandwidth href and location vector mu. The result is stored in y.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

Properties inherited from NcmStatsDistKernel (1)
NumCosmoMath.StatsDistKernel:dimension
No description available.

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct NumCosmoMathStatsDistKernelGaussClass {
  NcmStatsDistKernelClass parent_class;
  
}

No description available.

Class members
parent_class: NcmStatsDistKernelClass

No description available.