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
조회 수: 5 (최근 30일)
이전 댓글 표시
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?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/884200/image.jpeg)
댓글 수: 1
Sarmed Wahab
2022년 11월 6일
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!