DomainAdaptationasaProblemofInference onGraphicalModels