Kgmd | R Documentation |
Computes Kernel Gini mean difference statistics, in which Xs are quantitative, sigma is kernel standard deviation, alpha is an exponent on the Euclidean distance and returns the kernel Gini mean difference.
Kgmd(x, sigma)
x |
data |
sigma |
kernel standard deviation |
Kgmd
compute kernel Gini mean difference statistics for data.
It is a self-contained R function dealing with both univariate and multivariate data.
The sample size (number of rows) of the data must agree with the length of the label vector, and samples must not contain missing values. Argument
x
, is treated as data.
Energy distance based statistics naturally generalizes from a Euclidean space to metric spaces (Lyons13). By using a positive definite kernel (Mercer kernel) (Mercer1909), distributions are mapped into a RKHS (Smola07) with a kernel induced distance. Hence one can extend energy distances to a much richer family of statistics defined in RKHS (Sejdinovic13). Let κ: R^q \times R^q \rightarrow R be a Mercer kernel (Mercer1909). There is an associated RKHS H_{κ} of real functions on R^q with reproducing kernel κ, where the function d: {R}^q \times {R}^q \rightarrow{{R}} defines a distance in \mathcal{H}_κ,
d_κ(x,x') = √{κ(x,x) + κ(x',x') - 2 κ(x,x')}.
Here Kgcov
is defined as Gini distance covariance between x and \mathrm{rank}(x).
Kgmd
returns the sample Kernel Gini distance
Lyons, R. (2013). Distance covariance in metric spaces. The Annals of Probability, 41 (5), 3284-3305.
gCov
gCor
dCor
x<-iris[,1] Kgmd(x, sigma=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.