kmmd
performs
a non-parametric distribution test.## S3 method for class 'matrix':
kmmd(x, y, kernel="rbfdot",kpar="automatic", alpha = 0.05, asymptotic = FALSE, replace = TRUE, ntimes = 150, frac = 1, ...)## S3 method for class 'kernelMatrix':
kmmd(x, y, Kxy, alpha = 0.05, asymptotic = FALSE, replace = TRUE, ntimes = 100, frac = 1, ...)
## S3 method for class 'list':
kmmd(x, y, kernel="stringdot", kpar=list(type="spectrum",length=4), alpha = 0.05, asymptotic = FALSE, replace = TRUE, ntimes = 150, frac = 1, ...)
matrix
,
list
, or kernelMatrix
matrix
,
list
, or kernelMatrix
kernlMatrix
between $x$ and $y$ values (only for the
kernelMatrix interface)kernlab
provides the most popular kernel functions
which can sigma
inverse kernel width for the Radial Basis
kmmd
containing the
results of whether the H0 hypothesis is rejected or not. H0 being
that the samples $x$ and $y$ come from the same distribution.
The object contains the following slots :H0
AsympH0
kernelf
mmdstats
Radbound
Asymbound
kmmd-class
for more details.kmmd
calculates the kernel maximum mean discrepancy for
samples from two distributions and conducts a test as to whether the samples are
from different distributions with level alpha
.ksvm
# create data
x <- matrix(runif(300),100)
y <- matrix(runif(300)+1,100)
mmdo <- kmmd(x, y)
mmdo
Run the code above in your browser using DataCamp Workspace