NcmStatsDistKernelST

NcmStatsDistKernelST — An N-dimensional Student's t kernel used to compute the kernel density estimation function (KDE) in the NcmStatsDist class.

Functions

Properties

double nu Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── NcmStatsDistKernel
        ╰── NcmStatsDistKernelST

Description

An N-dimensional Student's t kernel used to compute the kernel density estimation function (KDE) in the NcmStatsDist class.

This object defines a multivariate Student's t kernel to be used in the NcmStatsDistKernel class. Also, this object implements the virtual methods of the NcmStatsDistKernel class. For more information about the class, check the documentation of NcmStatsDistKernel. Below, there are some definitions of the multivariate Student t distribution. For more information, check [On Sampling from the Multivariate t Distribution, Marius Hofert].

The multivariate t distribution with $\nu$ degrees of freedom has its stochastic representation as \begin{align} \label{st} \textbf{X} &= \mu + \sqrt{W} 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, $\mu$ is a $d$-dimensional random vector that defines the mean of the distribution and $W=\frac{\nu}{\chi^2}$, being $\chi^2$ a random variable following a chi-squared distribution with $\nu > 0$ degrees of freedom. The covariance matrix is defined as $\Sigma = AA^T$, such that the distribution of $\textbf{X}$ is uniquely defined by its covariance matrix and the mean vector, that is, $\textbf{X} \sim t(\mu, \Sigma)$.

Assuming that $n=d$, the probability density function (pdf) of $\textbf{X}$ is \begin{align} \label{pdfst} f_{\textbf{X}(x)} = \frac{\Gamma\left(\frac{\nu + d}{2}\right)}{\Gamma\left(\frac{\nu}{2}\right)(2\pi)^{\frac{d}{2}} \sqrt{det \Sigma}} \left[1+\frac{(x-\mu)^T \Sigma^-1 (x-\mu)}{\nu}\right]^{-\frac{\nu + d}{2}} ,\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.

The $\sqrt{W}$ factor makes the multivariate t distribution more flexible than the multivariate Gaussian distribution, especially on its tails. Therefore, for problems that require a smoother function, the multivariate t kernell shall be used. Also, as seen in equation \eqref{st}, the Student's t distribtuion can be generated using normal random variables, which makes the distribution easier to be generated. For the case $\nu \rightarrow \infty$, the multivariate t distribution becomes the Gaussian distribution.

This object uses the pdf given by equation \eqref{pdfst} to define a Student's t kernel, such that it can generate points distributed by multivariate t distributions.

The user must provide the following input value: dim - ncm_stats_dist_kernel_st_new(). Once this object is initialized, the user can use the methods in the NcmStatsDistKernel class with this object.

Functions

ncm_stats_dist_kernel_st_new ()

NcmStatsDistKernelST *
ncm_stats_dist_kernel_st_new (const guint dim,
                              const gdouble nu);

Creates a new NcmStatsDistKernelST object with sample dimension dim and $\nu$ = nu .

Parameters

dim

sample space dimension

 

nu

Student-t parameter $\nu$

 

Returns

a new NcmStatsDistKernelST.


ncm_stats_dist_kernel_st_ref ()

NcmStatsDistKernelST *
ncm_stats_dist_kernel_st_ref (NcmStatsDistKernelST *sdkst);

Increase the reference of stats_dist_kernel_st by one.

Parameters

Returns

stats_dist_kernel_st .

[transfer full]


ncm_stats_dist_kernel_st_free ()

void
ncm_stats_dist_kernel_st_free (NcmStatsDistKernelST *sdkst);

Decrease the reference count of stats_dist_kernel_st by one.

Parameters


ncm_stats_dist_kernel_st_clear ()

void
ncm_stats_dist_kernel_st_clear (NcmStatsDistKernelST **sdkst);

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

Parameters


ncm_stats_dist_kernel_st_set_nu ()

void
ncm_stats_dist_kernel_st_set_nu (NcmStatsDistKernelST *sdkst,
                                 const gdouble nu);

Sets the over-smooth factor to nu .

Parameters

sdkst

a NcmStatsDistKernelST

 

nu

the over-smooth factor

 

ncm_stats_dist_kernel_st_get_nu ()

gdouble
ncm_stats_dist_kernel_st_get_nu (NcmStatsDistKernelST *sdkst);

Parameters

Returns

the over-smooth factor.

Types and Values

NCM_TYPE_STATS_DIST_KERNEL_ST

#define NCM_TYPE_STATS_DIST_KERNEL_ST (ncm_stats_dist_kernel_st_get_type ())

NcmStatsDistKernelST

typedef struct _NcmStatsDistKernelST NcmStatsDistKernelST;

Property Details

The “nu” property

  “nu”                       double

nu value of the function.

Owner: NcmStatsDistKernelST

Flags: Read / Write

Allowed values: >= 1

Default value: 3