How to calculate mean square error for 3 input and 2 output neural network architecture? How to plot regression curve for predicted outputs vs target using ANN-PSO optimizatio
8 views (last 30 days)
Show older comments
I have 3 inputs and 2 outputs.
I am using optimizing weights of ANN using PSO and predicting the 2 outputs.
How to calculate Mean Squared error for the two outputs? How to plot the predicted values of 2 ouputs vs target values?
1 Comment
Sarmed Wahab
on 6 Nov 2022
MSE is between predicted and actual target values. So just use the MSE formula or mse function of MATLAB.
For plotting the predicted values against the actual values of output, you can use the scatter plot.
scatter(predicted_values, actual_values);
plot([0,1],[0,1]);
Or you can use the saved results to generate the regression plots
plotregression(trTarg_ANNPSO,trOut_ANNPSO,'Train',tsTarg_ANNPSO,tsOut_ANNPSO,'Testing',targets, net_ANNPSO(inputs),'All');
Where,
tr = training data proportion
ts= testing data proportion
Targ = target value
Out = predicted values
Answers (0)
See Also
Categories
Find more on Regression in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!