Learn R Programming

LPKsample (version 2.1)

W.Gen: Similarity matrix based on eLP basis and polynomial kernel

Description

Given data matrix \(X\) and eLP order \(k\), this function generate the similarity matrix \(W\) for graph analysis.

Usage

W.Gen(X, k, c.poly = 0.5)

Arguments

X

A \(n\)-by-\(d\) matrix of the observations

k

An integer, order of LP component

c.poly

Numeric, parameter for polynomial kernel

Value

A \(n\)-by-\(n\) similarity matrix generated from \(k\)-th order eLP transformation of \(X\)

References

Mukhopadhyay, S. and Wang, K. (2020), "A Nonparametric Approach to High-dimensional K-sample Comparison Problem", arXiv:1810.01724.

See Also

GLP

Examples

Run this code
# NOT RUN {
#example: 6 observations on 3 features:
 x<-rbind(matrix(runif(9),3,3),matrix(runif(9)+1,3,3))
#LP similarity matrix:
 simmat<-W.Gen(x,1)$W
 image(simmat)
# }

Run the code above in your browser using DataLab