Use Neural Network app to predict and calculate the MAPE error
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi guys, I'm new in Matlab I now I want to use Neural Network app to predict the data. I want to train all the value with 80% data and test with 20% data and use power as a target( don't minh about the cluster). I have read many document and answer but I think I did the wrong way. Thank you guyssss
0 Kommentare
Antworten (1)
Omega
am 20 Nov. 2024 um 5:33
Hi Huy,
You can use the "Neural Network Fitting" application, which is well-suited for your tasks. The application allows you to specify the split ratios for training, validation, and testing. You can adjust these values according to your requirements.
To calculate the Mean Absolute Percentage Error (MAPE), you can export the predictions and actual values to the MATLAB workspace and use the following formula:
% Assuming y_true is the actual values and y_pred is the predicted values
y_true = ...; % Replace with actual values
y_pred = ...; % Replace with predicted values
% Calculate MAPE
mape = mean(abs((y_true - y_pred) ./ y_true)) * 100;
fprintf('Mean Absolute Percentage Error (MAPE): %.2f%%\n', mape);
For more information about MAPE, please refer to the following documentation link:
0 Kommentare
Siehe auch
Kategorien
Mehr zu Sequence and Numeric Feature Data Workflows finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!