sugiyama_dr: Estimate a density ratio and save the outputs

Description Usage Arguments Details Value

Description

Major scaffolding function for my simulation study. The default arguments demonstrate the expected formats for this function (and all functions within this package). I've tried to be consistent with the naming, but there are some issues.

Usage

1
2
3
4
5
6
sugiyama_dr(numerator = list(base_dist = "norm", params = list(mean = 1,
  sd = 0.2)), denominator = list(base_dist = "t", params = list(df = 3,
  ncp = 0)), numerator_sample_size = 500,
  denominator_sample_size = 500, keep_samples = TRUE,
  ratio_method = "clsif", ratio_lambda = 0.1, ...,
  rds_directory = NULL, pdf_directory = NULL)

Arguments

numerator

List with named components "base_dist" and "args", see defaults for example.

denominator

Same as numerator.

numerator_sample_size

Number of samples to draw from the numerator.

denominator_sample_size

Number of samples to draw from the denominator.

keep_samples

boolean, should the ratio object keep the samples used to estimate it? FALSE saves memory, but it can be useful to keep them if the ratio estimator breaks in a non-obvious way.

ratio_method

string, either "clsif" or "ulsif".

ratio_lambda

regularisation parameter for the ratio_method objectives.

...

other arugments that are passed to either clsif or ulsif

rds_directory

directory to save the ratio object to as an RDS file.

pdf_directory

directory to save the ratio plot to.

Details

Important assumptions: - The "base_dist" component of the numerator/denominator objects has to have corresponding dbase_dist and rbase_dist methods, which are functions of x and n_samples respectively (and the named parameters in the args component). The default arguments of both numerator and denominator demonstrate this.

Value

I have no idea what to return here


hhau/sugiyamastudy documentation built on May 7, 2019, 9:20 p.m.