Imported from https://github.com/neuropoly/domainadaptation
