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="rbfdot",kpar="automatic", alpha = 0.05, asymptotic = FALSE, replace = TRUE, ntimes = 150, frac = 1, ...)
matrix,
list, or kernelMatrixmatrix,
list, or kernelMatrixkernlMatrix between $x$ and $y$ values (only for the
kernelMatrix interface)kernlab provides the most popular kernel functions
which can sigmainverse 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 :H0AsympH0kernelfmmdstatsRadboundAsymboundkmmd-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)
mmdoRun the code above in your browser using DataLab