feedforward net, when divideFcn set to 'dividerand', what part of the data is used for training and for testing ?
3 次查看(过去 30 天)
显示 更早的评论
Hello,
If I construct a feedforward neural network like so:
net1=feedforwardnet(50,'traincgf');
net1=configure(net1,x,t); % input vector x, and label vector t
net1.divideFcn = 'dividerand'; % divide the data randomly
and after training, I call
a11=sim(net1,x); % simulate the network on vetor x
Does this takes into account the division of the data (specified by divideFcn) ? In other terms, does calling divideFcn use a part of x for the training ? and then another part of x when we call sim ?
Best regards
Aymeric
0 个评论
回答(1 个)
Prateek Rai
2021-8-16
To my understanding, you want to know whether calling 'divideFcn' uses a part of the input (here 'x') for the training and then another part of the input (here 'x') when calling the 'sim' function for simulating neural network.
'sim' function seems to work differently. It does not take into account the division of the data (specified by divideFcn). That division of data is only used for dividing data into training data, validating data, and testing data respectively.
When you call sim function then it will use the whole input for simulating the neural network.
For example,
a11=sim(net1,x);
here, 'sim' will simulate the neural network for the whole input i.e. for whole 'x'.
If you want to simulate the neural network only for testing data then you have to explicitly pass the testing data as input to sim function.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Pattern Recognition and Classification 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!