densityratio - Distribution Comparison Through Density Ratio Estimation
Fast, flexible and user-friendly functionality to directly
estimate the ratio of two probability distributions from
samples from these distributions without estimating the
densities separately. Estimated density ratios can, among other
things, be used for prediction, outlier detection, change-point
detection in time-series, importance weighting under domain
adaptation (i.e., sample selection bias) and evaluation of
synthetic data utility. The rationale behind these use-cases is
that differences between two data distributions can be captured
in the ratio their density ratio, which is estimated over the
entire multivariate space of the data. Computationally
intensive code is executed in `C++` using `Rcpp` and
`RcppArmadillo`. The package provides good default
hyperparameters that can be optimized in cross-validation (we
do recommend understanding those parameters before using
`densityratio` in practice). Multiple density ratio estimation
methods are implemented, such as unconstrained least-squares
importance fitting (`ulsif()`), Kullback-Leibler importance
estimation procedure (`kliep()`), spectral density ratio
estimation (`spectral()`), and least-squares
heterodistributional subspace search (`lhss()`).