Converting an equation into MATLAB code
Afficher commentaires plus anciens
I am trying to write a code that calculates the accuracy of my network using sMAPE. The equation is depicted here:

(Y is actual value, F is forecast value, n is the amount of data)
I have written this code (I have 25 data):
e= gsubtract(output,y);
y= net(input);
accuracy = (0.08*mean(abs(e./(abs((output)+(y))))))
"output" on the code above is the target, "y" is the output (sorry for the misleading name with the actual output) Assuming I use the equation above as a reference, is this code correct?
2 commentaires
Walter Roberson
le 22 Avr 2018
We do not know. How does e relate to Y or F? How does output relate to Y or F ?
NeverPerfecT
le 23 Avr 2018
Réponse acceptée
Plus de réponses (2)
JD Wiley
le 10 Sep 2019
0 votes

1 commentaire
Walter Roberson
le 10 Sep 2019
log10(x + y.^3) ./ (y./x).^(1/4)
Gujju
le 27 Juin 2023
0 votes

Can someone please create the Matlab code for Equation (6) & (8). Those are curves but I'm getting diefferent results.
1 commentaire
Steven Lord
le 27 Juin 2023
This isn't related to the original question in this discussion, so you should ask it as a separate question using the Ask link near the top of the page. When you ask that separate question, please show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty and we may be able to provide some guidance.
Catégories
En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!