Domain Generalization by Marginal Transfer Learning