# how to compute and plot mean square error for two vectors?

조회 수: 4(최근 30일)
DEEPAK Chekuri 2021년 1월 9일
댓글: DEEPAK Chekuri 2021년 1월 13일
i have a dataset to classify, using perceptron learning rule . i've calculated the weight matrix but don't know how to plot MSE .
{𝑝1 = [ 1 1 ],𝑡1 = [ 0 0 ]}, {𝑝2 = [ 1 2 ],𝑡2 = [ 0 0 ]}, {𝑝3 = [ 2 −1 ],𝑡3 = [ 0 1 ]}, {𝑝4 = [ 2 0 ],𝑡4 = [ 0 1 ]}, {𝑝5 = [ −1 2 ],𝑡5 = [ 1 0 ]}, {𝑝6 = [ −2 1 ],𝑡6 = [ 1 0 ]}, {𝑝7 = [ −1 −1 ],𝑡7 = [ 1 1 ]}, {𝑝8 = [ −2 −2 ],𝑡8 = [ 1 1 ]}.
This the dataset and w=[-2 0;0 -2],bias =[-1 0]

댓글을 달려면 로그인하십시오.

### 채택된 답변

Gaurav Garg 2021년 1월 13일
Hi Deepak,
You can plot MSE/Loss and accuracy for each iteration of your training/testing.
To do this, you can make a network with 'n' number of layers, train your network on it and store the loss returned per iteration in a list. Finally, you can plot this loss on y-axis and number of iterations on x-axis.
For any more information on monitoring metrics, you can look at the documentation here.
##### 댓글 수: 1표시숨기기 없음
DEEPAK Chekuri 2021년 1월 13일
Thankyou Gaurav,
Storing mse in a new list for every iteration worked out for me and i'm instruucted to use single layer.
I've stored MSE of each iteration in new list and plotted the same.

댓글을 달려면 로그인하십시오.

### Community Treasure Hunt

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

Start Hunting!