MMD_l: Compute the MMD between two samples in linear time

View source: R/mmd_l.R

MMD_lR Documentation

Compute the MMD between two samples in linear time

Description

Compute the MMD between two samples in linear time

Usage

MMD_l(y, x, var = 1, permute = FALSE)

Arguments

y

numeric vector, method for matrix input not yet implemented which means observations must be 1D.

x

numeric vector, method for matrix input not yet implemented which means observations must be 1D.

var

numeric kernel variance.

permute

logical Should y and x be permuted before MMD_l computation?

References

Gretton, Arthur, et al. "A kernel two-sample test." Journal of Machine Learning Research 13.Mar (2012): 723-773.

Examples

y <- rnorm(2000)
x <- rnorm(2000, 5)

MMD_full <- MMD(y, x)
MMD_linear <- MMD_l(y, x)

MMD_full
MMD_linear


AnthonyEbert/EasyMMD documentation built on March 29, 2022, 8:55 p.m.