wolffd@0: function [net, error] = mlptrain(net, x, t, its); wolffd@0: %MLPTRAIN Utility to train an MLP network for demtrain wolffd@0: % wolffd@0: % Description wolffd@0: % wolffd@0: % [NET, ERROR] = MLPTRAIN(NET, X, T, ITS) trains a network data wolffd@0: % structure NET using the scaled conjugate gradient algorithm for ITS wolffd@0: % cycles with input data X, target data T. wolffd@0: % wolffd@0: % See also wolffd@0: % DEMTRAIN, SCG, NETOPT wolffd@0: % wolffd@0: wolffd@0: % Copyright (c) Ian T Nabney (1996-2001) wolffd@0: wolffd@0: options = zeros(1,18); wolffd@0: options(1) = -1; % To prevent any messages at all wolffd@0: options(9) = 0; wolffd@0: options(14) = its; wolffd@0: wolffd@0: [net, options] = netopt(net, options, x, t, 'scg'); wolffd@0: wolffd@0: error = options(8); wolffd@0: