net = gmm(1, 2, 'spherical');
type: 'gmm'nin: 1ncentres: 2nparams: 6covar_type: 'spherical'priors: [0.5000 0.5000]centres: [2x1 double]covars: [1 1]
net.centres
save gmm.net net
[net, options] = netopt(net, options, x, t, 'quasinew');
% Generate the matrix of inputs x and targets t. x = [0:1/19:1]'; t = sin(2*pi*x) + 0.2*randn(ndata, 1);
% Set up network parameters. net = mlp(1, 3, 1, 'linear');
% Set up vector of options for the optimiser. options = zeros(1,18); options(1) = 1; % This provides display of error values. options(9) = 1; % Check the gradient calculations. options(14) = 100; % Number of training cycles.
% Train using scaled conjugate gradients. [net, options] = netopt(net, options, x, t, 'scg');
% Plot the trained network predictions. plotvals = [0:0.01:1]'; y = mlpfwd(net, plotvals); plot(plotvals, y, 'ob')
nin 2 nout 1 ndata 12