josipd / torch-two-sample

A PyTorch library for two-sample tests
Other
237 stars 33 forks source link

New kernel functions needed! #2

Open noeagles opened 6 years ago

noeagles commented 6 years ago

When computing MMD, it is possible to used other kernels besides RBF.

josipd commented 6 years ago

Not at the moment, but you could easily use any p-norm (i.e., exp(-|x-x'|_p) by modifying the following line

https://github.com/josipd/torch-two-sample/blob/d0771287fa1ba820ad975f1f038bfd8e155d2b91/torch_two_sample/statistics_diff.py#L370

I will submit a patch soon that accepts norm as an argument to the test. Do you have any other kernels in mind?