classifier_test {Ecume} | R Documentation |
Classifier k-sample test
classifier_test(
x,
y,
split = 0.7,
thresh = 0,
method = "knn",
control = caret::trainControl(method = "cv"),
...
)
x |
Samples from the first distribution or a list of samples from k distribution |
y |
Samples from the second distribution. Only used if x is a vector. |
split |
How to split the data between training and test. Default to .7 |
thresh |
Value to add to the null hypothesis. See details. |
method |
Which model(s) to use during training. Default to knn. |
control |
Control parameters when fitting the methods. See trainControl |
... |
Other parameters passed to train |
See Lopez-Paz et .al for more background on those tests.
A list containing the following components:
statistic the value of the test statistic.
p.value the p-value of the test.
Lopez-Paz, D., & Oquab, M. (2016). Revisiting Classifier Two-Sample Tests, 1–15. Retrieved from http://arxiv.org/abs/1610.06545
x <- matrix(c(runif(100, 0, 1),
runif(100, -1, 1)),
ncol = 2)
y <- matrix(c(runif(100, 0, 3),
runif(100, -1, 1)),
ncol = 2)
classifier_test(x, y)