【问题标题】:Compute the mean square error at the end of each iteration and plot the same in matlab在每次迭代结束时计算均方误差并在 matlab 中绘制相同的图
【发布时间】:2021-04-15 03:48:59
【问题描述】:

我有一个数据集要分类,使用感知器学习规则。我已经计算了权重矩阵,但不知道如何绘制 MSE .{????1 = [ 1 1 ],????1 = [ 0 0 ]}, {??????2 = [ 1 2 ],????2 = [ 0 0 ]}, {????3 = [ 2 -1 ],????3 = [ 0 1 ]}, {????4 = [ 2 0 ],????4 = [ 0 1 ]}, {????5 = [ -1 2 ],????5 = [ 1 0 ]}, {??????6 = [ -2 1 ],????6 = [ 1 0 ]}, {??????7 = [ -1 -1 ],????7 = [ 1 1 ]}, {????8 = [ -2 -2 ],????8 = [ 1 1 ]}。 这是数据集和 w=[-2 0;0 -2],bias =[-1 0];

【问题讨论】:

    标签: matlab neural-network perceptron mse


    【解决方案1】:

    计算一个神经元对应的权重变化,并将变化后的权重应用于所有其他输入并找到mse。

     P=[p1,p2,...]
    for i=1:number of inputs
    
        ///change weights here
    
       for j=1:number of inputs
           a=f(net);
          error[j] =target[j] -a[j];
    
         
       end
       mse=error *error' / numel(error);
       
    
    end
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-13
      • 1970-01-01
      • 2017-04-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多