Modelling the influence of data structure on learning in neural networks