【问题标题】:Find accuracy of neural network application result查找神经网络应用结果的准确性
【发布时间】:2015-02-18 17:16:12
【问题描述】:

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

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

  2. 1234563这个任务在神经网络中是否可行,

提前感谢您的帮助。

【问题讨论】:

    标签: matlab neural-network bias-neuron


    【解决方案1】:

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

    的东西
    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) - 由performFcntr 中计算的绘图性能

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

    【讨论】:

      【解决方案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);
      

      【讨论】:

        猜你喜欢
        • 2016-05-30
        • 2012-08-30
        • 2017-08-31
        • 2020-06-03
        • 1970-01-01
        • 1970-01-01
        • 2017-11-17
        • 2016-08-02
        • 2018-01-10
        相关资源
        最近更新 更多