English

On the Use of Random Forest for Two-Sample Testing

Methodology 2021-05-07 v6

Abstract

Following the line of classification-based two-sample testing, tests based on the Random Forest classifier are proposed. The developed tests are easy to use, require almost no tuning, and are applicable for any distribution on Rd\mathbb{R}^d. Furthermore, the built-in variable importance measure of the Random Forest gives potential insights into which variables make out the difference in distribution. An asymptotic power analysis for the proposed tests is developed. Finally, two real-world applications illustrate the usefulness of the introduced methodology. To simplify the use of the method, the R-package "hypoRF" is provided.

Keywords

Cite

@article{arxiv.1903.06287,
  title  = {On the Use of Random Forest for Two-Sample Testing},
  author = {Simon Hediger and Loris Michel and Jeffrey Näf},
  journal= {arXiv preprint arXiv:1903.06287},
  year   = {2021}
}
R2 v1 2026-06-23T08:08:46.048Z