Statistical Mechanics of Learning by