Classification with a domain shift in medical imaging