Nonlinear modelling and prediction with feedforward and recurrent networks