我正在使用 Matlab 的神经网络工具箱来训练一个网络。现在我的代码如下:
x = xdata.';
t = target1';
% Create a Pattern Recognition Network
hiddenLayerSize = 10;
net = patternnet(hiddenLayerSize);
net.input.processFcns = {'removeconstantrows','mapminmax'};
net.output.processFcns = {'removeconstantrows','mapminmax'};
net.layers{2}.transferFcn = 'softmax';
net.divideFcn = 'dividerand'; % Divide data randomly
net.divideMode = 'sample'; % Divide up every sample
net.divideParam.trainRatio = 60/100;
net.divideParam.valRatio = 20/100;
net.divideParam.testRatio = 20/100;
net.trainFcn = 'trainscg'; % Scaled conjugate gradient
net.performFcn = 'mse';
net.performParam.regularization = 0.5;
%net.performParam.normalization = 0.01;
net.plotFcns = {'plotperform','plottrainstate','ploterrhist', ...
'plotregression', 'plotfit', 'plotconfusion'};
% Train the Network
[net,tr] = train(net,x,t);
% Test the Network
y = net(x);
e = gsubtract(t,y);
tind = vec2ind(t);
yind = vec2ind(y);
percentErrors = sum(tind ~= yind)/numel(tind);
performance = perform(net,t,y)
% Recalculate Training, Validation and Test Performance
trainTargets = t .* tr.trainMask{1};
valTargets = t .* tr.valMask{1};
现在我应该通过不同的数据运行获得不同的精度,因为采样(将数据集划分为训练测试和验证集)是随机的。但我得到了一个恒定的准确度(89.7%)。变量“xdata”仅包含由特征选择算法选择的那些特征。我的准确度值是恒定的有什么原因吗?
我也用相同的数据集训练了一个 SVM。即使多次运行(94%),我也得到了陈旧的准确性
输出 y 包含 2 个值。这些值意味着什么?