# 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]
##### ๋๊ธ ์: 0ํ์์จ๊ธฐ๊ธฐ ์ด์  ๋๊ธ ์: -1

๋๊ธ์ ๋ฌ๋ ค๋ฉด ๋ก๊ทธ์ธํ์ญ์์ค.

### ์ฑํ๋ ๋ต๋ณ

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!

Translated by