MMD_l: Compute the MMD between two samples in linear time

Description Usage Arguments References Examples

View source: R/mmd_l.R

Description

Compute the MMD between two samples in linear time

Usage

1
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

1
2
3
4
5
6
7
8
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 May 29, 2018, 8:05 a.m.