clsif: Constrained Least Squares Importance Fitting (CLISF)

Description Usage Arguments Details Value

Description

Sugiyama density ratio estimation method, with an L1 penalty on the parameters.

Usage

1
2
3
clsif(x.de, x.nu, lambda, sigma.chosen = 0.2, is.adaptive = FALSE,
  neigh.rank = 5, kernel.low = 0.5, kernel.high = 2, b = 50,
  fold = 6)

Arguments

x.de

A matrix with d rows, with one sample from p(x_de) per column.

x.nu

A matrix with d rows, with one sample from p(x_nu) per column.

lambda

Positive real number. Regularisation parameter, see Sugiyama, Suzuki and Kanamori (2012) Section 6.2.1 for details

sigma.chosen

Positive real number. Sigma for the Gaussian kernel radial basis functions. If this is set to zero, will be chosen via cross validation.

is.adaptive

Boolean. Adaptively choose location of basis functions.

neigh.rank

Positive integer. How many other kernels to use to compute distance metrics.

kernel.low

Real number. Lower bound for rescaled distances.

kernel.high

Real number. Upper bound for rescaled distances.

b

Positive integer. How many kernels to use.

fold

Positive integer. How many cross validation folds to use to select sigma.chosen

Details

x.de and x.nu should be the same dimension (same number of rows), but there can an uneven number of samples (number of rows)

Value

list with the following elements:

alpha

basis function parameter estimates.

score

final cross validation score, used to select sigma.chosen.

x.ce

the chosen centers for the density ratio.

sigma

the value of sigma.chosen after the cross validation.

is.adaptive

the value of is.adaptive - used to figure out which basis function to call later.

c.dists

vector of distances between centers, used if is.adaptive is true

Note that this is list is meant to be passed to fit.dr. It also serves as a small way to represent the estimated density ratio.


hhau/densityratiosugiyama documentation built on May 14, 2019, 7:57 p.m.