基于matlab性能问题的神经网络

基于matlab性能问题的神经网络,matlab,Matlab,我正在使用此代码进行NN,以便训练我的网络,使其能够对图像进行分类: net = newff(p,t,15,{},'traingd'); net.divideParam.trainRatio = 70/100; % Adjust as desired net.divideParam.valRatio = 15/100; % Adjust as desired net.divideParam.testRatio = 15/100; % Adjust as desired net.trainP

我正在使用此代码进行NN,以便训练我的网络,使其能够对图像进行分类:

net = newff(p,t,15,{},'traingd');
net.divideParam.trainRatio = 70/100;  % Adjust as desired
net.divideParam.valRatio = 15/100;  % Adjust as desired
net.divideParam.testRatio = 15/100;  % Adjust as desired
net.trainParam.epochs = 10000;
net.trainParam.goal = 0.01;
net.trainParam.show = 25;
net.trainParam.time = inf;
net.trainParam.min_grad = 1e-10;
net.trainParam.max_fail = 10;
net.trainParam.sigma = 5.0e-5;
net.trainParam.lambda = 5.0e-7;
net.trainParam.mu_max = 1e-20;
net.trainParam.lr = 0.001; 

% Train and Apply Network
[net,tr] = train(net,p,t);
outputs = sim(net,p);

% Create P.

% Plot
plotperf(tr)
plotfit(net,p,t)
plotregression(t,outpts)
但我的表现从未低于0.5。尝试对数据进行PCA,但我认为代码中存在不正确的地方?是否可以更改nntraintool上显示的性能初始值

多谢各位
保罗

如果没有你的数据很难说,但根据我对神经网络的经验,只有一件事可能发生:

  • 您没有足够的隐藏节点来表示数据
  • 你的时间步长太高了
  • 你的错误空间是复杂的,因为你的数据,你正在达到许多局部极小值。这是一种类似但略有不同的说法1
  • 您的数据是退化的,因为您的训练样本具有不同的标签,但特征完全相同
  • 如果为1,则增加隐藏节点的数量。 如果为2,则减小时间步长 如果是3,您可以尝试使用Nguyen Widrow初始化来更好地初始化(这以前在函数
    initnw
    中) 如果是4,请找出您的数据为何如此,并修复它


    感谢@sazary在使用
    newff
    newcf
    创建新网络时指出了一些有关默认值
    initnw
    的详细信息

    谢谢你的帮助,克里斯。我在1、5、10和15小时内进行训练,但仍然没有反馈。我会试试你的建议你试过降低net.trainParam.lr吗?是的。但这可能很愚蠢,你认为这和重量有关吗?有两次网络运行时没有任何改变。由于搜索空间的复杂性,你很可能正在达到局部极小值。您是否尝试使用类似于
    nwinit
    的东西初始化网络?根据我的经验,这种方法可以产生更一致的结果。此外,当您使用
    newff
    时,它会自动调用。这来自matlab的帮助:
    您可以通过调用newff或newcf创建使用initnw的标准网络