wmkouw / sample-covariateshift

Sample from synthetic covariate shift problem

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sample-covariateshift

Scripts to sample from class-conditional distributions, under covariate shift.

To be precise:

Assume that there is a single sample space X, and a fixed number of classes Y. Let the source domain, referred to as pS(x,y), be one distribution over (X,Y) and the target domain another, pT(x,y). In cases of covariate shift, the posterior distributions are equal in both domains; pS(y|x) = pT(y|x).

Distributions:

  • p(y) is the distribution of the classes (equal in both domains).
  • p(y|x) is the posterio distribution (equal in both domains; hence covariate shift)
  • pS(x) is the source distribution of the data.
  • pT(x) is the target distribution of the data.

The scripts generate class-conditional distributions for each domain, pS(x|y) and pT(x|y), using Bayes' rule. Samples are drawn using a rejection sampler.

Usage

Have a look at example_call.m

Questions

Questions, comments and bugs can be submitted in the issues tracker.

About

Sample from synthetic covariate shift problem

License:MIT License


Languages

Language:MATLAB 100.0%