Description Usage Arguments Value
estimates the density ratio for two density objects.
1 2 | make_ratio_obj(numerator_density, denominator_density, ratio_method,
ratio_lambda, keep_samples = TRUE, ...)
|
numerator_density |
a "density_sugi" object representing the density of the numerator. |
denominator_density |
a "density_sugi" object representing the density of the denominator. |
ratio_method |
string: either "clisf" for CLISF fitting (L1 penalty, no positivity constraint), or "ulsif" for ULSIF fitting (L2 penalty, with positivity constraint). |
ratio_lambda |
positive numeric: value of regularisation parameter. |
keep_samples |
boolean: keep the samples used for estimating the density ratio or not. |
... |
named list of other options passed to either
|
an S3 object of type "ratio_sugi", with components:
numerator_density S3 object of type "density" for the numerator.
denominator_density S3 object of type "density" for the denominator.
ratio_method see: ratio_method.
ratio function: evaluates the estimated density at the requested location.
basis_estimate list, basis estimate. see
clsif
and
eval.basis
.
plot_limits list, named elements are some reasonable(?) bounds for plots
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.