MatrixkNorm: Calculate l_p-norm distance between samples

Description Usage Arguments Value Author(s) Examples

Description

Given a N \times k matrix X, this function calculates the l_p norm between rows.

Usage

1

Arguments

X

A N \times k matrix

p

A positive integer value which determines the norm to be used. When k = ∞, the maximum norm is calculated.

Value

A N \times N symmetric matrix, where N is the number of rows of the argument matrix X. All the diagonal elements are zeroes and the (i,j)^{th} element represents the l_p-norm distance between the i^{th} and j^{th} rows, given by ≤ft(\mathop{∑}_{s=1}^{k} |X_{is} - X_{js}|^p \right)^{1/p}

Author(s)

Deepak Nag Ayyala <deepaknagayyala@gmail.com>

Examples

1
2
3
    ## Not run: data(metagencounts)
    Distance <- MatrixkNorm(metagencounts$Counts, p = 2);
## End(Not run)

GrammR documentation built on May 1, 2019, 8:46 p.m.