Error percentage calculated in excel and matlab not matching. why?

1 回表示 (過去 30 日間)
Sunita
Sunita 2023 年 11 月 28 日
コメント済み: Cris LaPierre 2023 年 11 月 28 日
I calculated error percentage for actual and predicted after ANN implementation using below code. Same I calculted using excel. both are not matching . why?
x = input';
t = output';
trainFcn = 'trainlm'; % Levenberg-Marquardt backpropagation.
hiddenLayerSize = 30;
net = fitnet(hiddenLayerSize,trainFcn);
net.divideParam.trainRatio = 80/100;
net.divideParam.valRatio = 10/100;
net.divideParam.testRatio = 10/100;
[net,tr] = train(net,x,t);
y = net(x);
e = gsubtract(t,y);
percentage_error = abs(t- y) / abs(t) * 100;
  1 件のコメント
Cris LaPierre
Cris LaPierre 2023 年 11 月 28 日
Without the data, it is impossible for us to say. Save your variables to file and attach that to your post using the paperclip icon.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeGPU Computing についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by