1

我找不到任何关于神经网络结果准确性的有用信息,

  1. 我在 Matlab 中运行字符识别示例,通过输入测试进行网络训练和模拟后,如何计算模拟后输出结果的准确性?

  2. 由于某些原因(研究)在网络训练后我想改变一些神经元的权重并通过输入测试进行模拟,那么与精确的输出结果相比,我如何计算它的输出精度?这个任务在神经网络中是否可行,

提前感谢您的帮助。

4

2 回答 2

2

当您使用配置网络、输入矩阵和目标矩阵之类[net,tr] = train(net,x,t)的东西训练网络时,第二个返回的参数是训练记录。如果你只是在控制台上显示,你会得到一些看起来像netxttrtr

tr = 

    trainFcn: 'trainlm'
  trainParam: [1x1 struct]
  performFcn: 'mse'
performParam: [1x1 struct]
    derivFcn: 'defaultderiv'
   divideFcn: 'dividerand'
  divideMode: 'sample'
 divideParam: [1x1 struct]
    trainInd: [1x354 double]
      valInd: [1x76 double]
     testInd: [1x76 double]
        stop: 'Validation stop.'
  num_epochs: 12
   trainMask: {[1x506 double]}
     valMask: {[1x506 double]}
    testMask: {[1x506 double]}
  best_epoch: 6
        goal: 0
      states: {1x8 cell}
       epoch: [0 1 2 3 4 5 6 7 8 9 10 11 12]
        time: [1x13 double]
        perf: [1x13 double]
       vperf: [1x13 double]
       tperf: [1x13 double]
          mu: [1x13 double]
    gradient: [1x13 double]
    val_fail: [0 0 0 0 0 1 0 1 2 3 4 5 6]
   best_perf: 7.0111
  best_vperf: 10.3333
  best_tperf: 10.6567

其中包含有关培训结果的所有信息。Matlab 有一些内置函数用于操作此记录,我发现其中最有用的是:

plotperform(tr)- 绘图性能由performFcnin计算tr

plotconfusion(t,y)- 绘制混淆矩阵,这是一个非常简洁的图形显示您的网络如何错误分类事物,并显示每个类别中正确/错误的百分比以及总数。t是目标矩阵,y是计算的输出,您可以使用输入矩阵提取y=net(x)x

于 2014-12-19T18:41:50.300 回答
2

绘制分类混淆矩阵

plotconfusion(Target,Output)显示分类混淆网格。

以下是正确和错误分类的总体百分比:

[c,cm] = confusion(Target,Output)

fprintf('Percentage Correct Classification   : %f%%\n', 100*(1-c));
fprintf('Percentage Incorrect Classification : %f%%\n', 100*c);
于 2014-12-27T08:12:23.893 回答