Relative Density Ratio Estimation (RuLSIF) by Python



This is a Python implementation of Relative Density Ratio Estimation (RuLSIF) method, whose detail can be found here. With the support of pylab, this software implements the exact same algorithm described in the above webpage.

This distribution is under GPL license.



The picture below shows an estimation of RuLSIF method with alpha = 0. The numerator samples are drawn from N(-1, 0.25^2) and the denominators are drawn from N(0, .5^2). To obtain the following result, run:


You need a pylab-enabled python distribution to run this code. On windows, I found python(x,y) is handy.



Yamada, M., Suzuki, T., Kanamori, T., Hachiya, H., & Sugiyama, M.
Relative density-ratio estimation for robust distribution comparison.
Neural Computation, to appear.

Song Liu (