MAPE Calculation | Regression Learner App

13 visualizzazioni (ultimi 30 giorni)
Ibrahim Patel
Ibrahim Patel il 3 Dic 2022
Risposto: Drew il 31 Gen 2024
I want to calculate the relative mean absolute error (or as a percentage ) the mean absolute percentage error of my regression models in a Regression Learner app session .
I could only find provision for RMSE, R^2 and MAE. How can I automatically calculate MAPE?
I am also trying to calculate myself. But when I export Error plot as a figure , I am unable to get the X and Y data of the opened figure.
I tried using the following code, but I get
s = 0x0 empty GraphicsPlaceholder array.
Unrecognized method, property, or field 'XData' for class 'matlab.graphics.GraphicsPlaceholder'
s=findobj(gca,'Type','Scatter');
X = s.XData;
Y = s.YData;

Risposte (1)

Drew
Drew il 31 Gen 2024
Mean Absolute Percentage Error (MAPE) was added to the Regression Learner app in R2024a. As of this writing, you can access R2024a in the prerelease version. See https://www.mathworks.com/help/releases/R2024a/stats/release-notes.html and https://www.mathworks.com/help/releases/R2024a/stats/assess-model-performance-in-regression-learner.html#bvj4xvn-1 .
For the separate question of using handle graphics to access data in a figure that was exported from the Regression Learner plot, see https://www.mathworks.com/matlabcentral/answers/2072706-extract-predictor-and-reponse-as-an-array-format-from-ml-app
Also, note that the mape() function was added to the MATLAB command line in R2022b https://www.mathworks.com/help/matlab/ref/mape.html
If this answer helps you, please remember to accept the answer.

Community Treasure Hunt

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

Start Hunting!

Translated by