Description Usage Arguments Value Examples
Distance matrix calculation using Mean Absolute Deviation of Distances (genMADD or MADD distance)
1 | distmat_HDLSS(X, option = c("genMADD", "MADD"))
|
X |
Data matrix (n X p) where n denotes number of observations. Each row is a p dimensional observation vector. |
option |
Distance function to use. Should be one of "genMADD" or "MADD". The default is "genMADD". For the exact mathematical form of the distance functions, refer to the vignette or https://ieeexplore.ieee.org/document/8695805 |
Returns a (n X n) matrix containing the distance between the observations.
1 2 3 4 5 6 7 | set.seed(1)
# Generating n = 10 observations from t distribution with dimension p = 5
X = matrix(stats::rt((10*5), ncp = 0, df = 4), nrow = 10, ncol = 5)
# Distance matrix
D_mat1 = distmat_HDLSS(X = X) # using default generalized MADD distance ("genMADD")
D_mat2 = distmat_HDLSS(X = X, option = "MADD") # using MADD distance ("MADD")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.