Domain Adaptation with Randomized Expectation Maximization
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Domain Adaptation with Randomized Expectation Maximization

This is the implementation of the AdREM method for domain adaptation, plus accompanying code to test it on a variety of datasets.

The method itself is implemented in src/adrem/predict_adrem.m. Example:

addpath src/adrem
addpath src/evaluation
data = load_dataset('amazon');
% Predict labels of 'dvd' target domain using 'books' as source
% Preprocess data: divide by standard deviation over both domains
[x_src, x_tgt] = preprocess(data.x{1}, data.y{1}, data.x{2}, 'joint-std');
y = predict_adrem(x_src, data.y{1}, x_tgt);
mean(y == data.y{2})

The method requires that the MATLAB/octave bindings for liblinear are installed. These can be downloaded from

As a starting point for the experiments, look at src/evaluation/run_methods.m.

If you use this code, please cite

Biased Bagging for Unsupervised Domain Adaptation
Twan van Laarhoven, Elena Marchiori

Additional information can be found at The datasets used in the experiments can also be downloaded there.

Comparison methods

The comparison methods can be downloaded from:


The AdREM method and evaluation code is provided under the MIT license (see file LICENSE). The comparison methods may be subject to other licenses.