>> help newcf
Create a cascade-forward backpropagation network.
Obsoleted in R2010b NNET 7.0. Last used in R2010a NNET 6.0.4.
The recommended function is cascadeforwardnet.
Using the data in help and rng(0) to initialize the random number generator, I get
close all, clear all, clc
P = [0 1 2 3 4 5 6 7 8 9 10];
T = [0 1 2 3 4 3 2 1 2 3 4];
L=[4 8];
net=newcf(P,T,L);
%Defaults
net.trainparam.goal
net.trainParam.min_grad
net.trainparam.epochs
net.trainFcn
net.layers{1}.transferFcn
net.layers{2}.transferFcn
%Assigned
net.trainparam.goal = 1e-5;
net.trainParam.min_grad = 1e-5;
net.trainparam.epochs = 200;
net.trainFcn = 'traincgf';
net.layers{1}.transferFcn = 'tansig';
net.layers{2}.transferFcn = 'tansig';
rng(0)
[net,tr,Y]=train(net,P,T);
NMSE = mse(T-Y)/var(T,1)
%Final
net.trainparam.goal
net.trainParam.min_grad
net.trainparam.epochs
net.trainFcn
net.layers{1}.transferFcn
net.layers{2}.transferFcn
Which shows that goal, min_grad, and epochs have changed
However, only goal and epochs have changed to default values
Obviously, there are bugs.
The important thing is whether the normalized MSE is acceptable when longer data sets are used
Hope this helps.
Thank you for formally accepting my answer
Greg
Best Answer