为什么我的验证设置为空(matlab-patternnet)?
我在自定义输入数据上使用简单的演示代码。 我遇到了奇怪的问题,我的验证集是空的,并且只监视测试集的性能(可能是第一个问题的第二个问题结果)。
>> size(x)
ans =
25 764
>> size(t)
ans =
7 764
trainFcn = 'trainbr'; % Scaled conjugate gradient backpropagation.
% Create a Pattern Recognition Network
hiddenLayerSize = 100;
net = patternnet(hiddenLayerSize, trainFcn);
% Setup Division of Data for Training, Validation, Testing
net.divideParam.trainRatio = 60/100;
net.divideParam.valRatio = 20/100;
net.divideParam.testRatio = 20/100;
% Train the Network
[net,tr] = train(net,x,t);
>> tr
tr =
struct with fields:
divideFcn: 'dividerand'
divideMode: 'sample'
divideParam: [1×1 struct]
trainInd: [1×611 double]
valInd: []
testInd: [1×153 double]
best_perf: 0.0015
best_vperf: NaN
best_tperf: 0.0942
I'm using simple demo code on custom input data.
I get weird problem, where my validation set is empty and only performance on test set is monitored (perhaps is the second problem consequence of the first one).
>> size(x)
ans =
25 764
>> size(t)
ans =
7 764
trainFcn = 'trainbr'; % Scaled conjugate gradient backpropagation.
% Create a Pattern Recognition Network
hiddenLayerSize = 100;
net = patternnet(hiddenLayerSize, trainFcn);
% Setup Division of Data for Training, Validation, Testing
net.divideParam.trainRatio = 60/100;
net.divideParam.valRatio = 20/100;
net.divideParam.testRatio = 20/100;
% Train the Network
[net,tr] = train(net,x,t);
>> tr
tr =
struct with fields:
divideFcn: 'dividerand'
divideMode: 'sample'
divideParam: [1×1 struct]
trainInd: [1×611 double]
valInd: []
testInd: [1×153 double]
best_perf: 0.0015
best_vperf: NaN
best_tperf: 0.0942
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
似乎它依赖于方法。其他方法(scg)具有非空验证......
It seems that it is method dependent.. Other method (scg) has validation non-empty...