Probing transfer learning with a model of synthetic correlated datasets