distmat_HDLSS: Distance matrix calculation using Mean Absolute Deviation of...

Description Usage Arguments Value Examples

View source: R/Distances.R

Description

Distance matrix calculation using Mean Absolute Deviation of Distances (genMADD or MADD distance)

Usage

1
distmat_HDLSS(X, option = c("genMADD", "MADD"))

Arguments

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

Value

Returns a (n X n) matrix containing the distance between the observations.

Examples

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")

DawnTrisha/hclustHDCP documentation built on Dec. 17, 2021, 4:10 p.m.