densityratio
0.2.3Distribution Comparison Through Density Ratio Estimation
Overview
Fast, flexible and user-friendly tools for distribution comparison through direct density ratio estimation. The estimated density ratio can be used for covariate shift adjustment, outlier-detection, change-point detection, classification and evaluation of synthetic data quality. The package implements multiple non-parametric estimation techniques (unconstrained least-squares importance fitting, ulsif(), Kullback-Leibler importance estimation procedure, kliep(), spectral density ratio estimation, spectral(), kernel mean matching, kmm(), and least-squares hetero-distributional subspace search, lhss()). with automatic tuning of hyperparameters. Helper functions are available for two-sample testing and visualizing the density ratios. For an overview on density ratio estimation, see Sugiyama et al. (2012) doi:10.1017/CBO9781139035613 for a general overview, and the help files for references on the specific estimation techniques.
Install
Health
- OK2026-08-0513 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- NOTE2026-08-0112 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- OK2026-07-1813 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- NOTE2026-04-2210 OK · 4 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- ERROR2026-04-189 OK · 4 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
Show 3 earlier snapshots
- NOTE2026-04-108 OK · 6 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- ERROR2026-04-098 OK · 5 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
- NOTE2026-03-1010 OK · 4 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Documentation
- Examples that run
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- References docs
- 12%
Downloads
Repository
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
Repository practices
6 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/thomvolker/densityratio on 2026-08-16.
Show all practices
Dependencies
Code & Tests
Datasets
People & History
4 releases. Pick two to compare their code metrics. R releases are shown for context.
Package metadata
- First published
- 2025-05-19
- Total releases
- 4 / 1 yrs
- License
- GPL (>= 3) OSI
- Minimum R
- ≥ 2.10
- Bundled data
- 497 KB / 7 files
- Download size
- 1.4 MB
- Installed size
- not tracked yet
- With dependencies
- not tracked yet
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("densityratio")This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-08-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.