Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use the Matlab programs in Appendices as a starting point. Copy, paste and modify the code for the homework. Hand in the following as your

Use the Matlab programs in Appendices as a starting point. Copy, paste and modify the code for the homework.

Hand in the following as your submission for the homework:

  1. The program you modified.
  2. Resultant plots to show results you produced.
  3. Add caption with and parameters (weight, bias, activation function) to describe the result.
  4. Add a comment to summarize what you observed/learned from simulating the FNN.

image text in transcribed

image text in transcribed

Problem 4: Unanticipatable 3-layer FNN (25%) Modify the 2-layer FNN program in Appendix C so as to generate the input-output of the 3-layer FNN. s = W,u +b, W = , x2 b, %3 x1 y1 =radbas(s) s2 = W2y1 +b2 Wz %3D n, bz 3D , 1 y2 = tan sig(s,) S3 = W3y2 +b3 b3 =1x1 W3 =1xn2 V3 = purelin(s3) Consider a 2-10-5-1 FNN, use random matrices & vectors for the weights and biases and produce the ul-u2-y3 map as done in the earlier problems. The mapping can be more complicated and not anticipatable in nature. Note: Appendix C. Matlab Program for a 2-n1-1 Neuron Network Model $ MISO FF Neuron mapping function HW2_P3_2_n1_1_fcn_2018 I Initialize Weights & biases clear all; close all; clc; ni = 20; Wi = randn (n1,2); b1 = randn (nl1,1); W2 = ul = -10:0.1:10; u2 = -5:0.1:5; ones (1, n1); b2 = randn (1); nCol = nRow = length (ul): length (u2); y = zeros (nRow, nCol) ; $* FFNN surface actfcn radbas'; logsig, tansig, radbas %3D for i = 1:nRow; u = [ul; u2 (i) *ones (size (ul))] ; y(1, :) = FNN 2n1_fcnfcn (W1,b1,w2,b2,u, actfcn); end toc * Plot figure (1); mesh (ul,u2,y); xlabell'ul'); ylabel ('u2'); zlabel ('y');grid on; [n1,n0] title (num2str (no),'-',num2str (n1),'-',num2str (n2),' FNN with end size (W1); n2 = size (W2,1) ; ',actfen,'-purelin']); function y2 = FNN_2n1_fcnfcn (W1,b1,W2, b2,u, actfcn) s1 = W1*u + B1; y1 s1 = W1*u + bl*ones (1, size (u, 2)); switch E1 (s1); s2 = W2*y1 + B2; y2 = f2 (s2); ctfcn radbas 'tansig 'logsig y1 = radbas (s1); y1 = tansig (s1); y1 = logsig (s1) ; case case case end y2 = W2*y1 + b2; end Problem 4: Unanticipatable 3-layer FNN (25%) Modify the 2-layer FNN program in Appendix C so as to generate the input-output of the 3-layer FNN. s = W,u +b, W = , x2 b, %3 x1 y1 =radbas(s) s2 = W2y1 +b2 Wz %3D n, bz 3D , 1 y2 = tan sig(s,) S3 = W3y2 +b3 b3 =1x1 W3 =1xn2 V3 = purelin(s3) Consider a 2-10-5-1 FNN, use random matrices & vectors for the weights and biases and produce the ul-u2-y3 map as done in the earlier problems. The mapping can be more complicated and not anticipatable in nature. Note: Appendix C. Matlab Program for a 2-n1-1 Neuron Network Model $ MISO FF Neuron mapping function HW2_P3_2_n1_1_fcn_2018 I Initialize Weights & biases clear all; close all; clc; ni = 20; Wi = randn (n1,2); b1 = randn (nl1,1); W2 = ul = -10:0.1:10; u2 = -5:0.1:5; ones (1, n1); b2 = randn (1); nCol = nRow = length (ul): length (u2); y = zeros (nRow, nCol) ; $* FFNN surface actfcn radbas'; logsig, tansig, radbas %3D for i = 1:nRow; u = [ul; u2 (i) *ones (size (ul))] ; y(1, :) = FNN 2n1_fcnfcn (W1,b1,w2,b2,u, actfcn); end toc * Plot figure (1); mesh (ul,u2,y); xlabell'ul'); ylabel ('u2'); zlabel ('y');grid on; [n1,n0] title (num2str (no),'-',num2str (n1),'-',num2str (n2),' FNN with end size (W1); n2 = size (W2,1) ; ',actfen,'-purelin']); function y2 = FNN_2n1_fcnfcn (W1,b1,W2, b2,u, actfcn) s1 = W1*u + B1; y1 s1 = W1*u + bl*ones (1, size (u, 2)); switch E1 (s1); s2 = W2*y1 + B2; y2 = f2 (s2); ctfcn radbas 'tansig 'logsig y1 = radbas (s1); y1 = tansig (s1); y1 = logsig (s1) ; case case case end y2 = W2*y1 + b2; end

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

1. What is meant by Latitudes? 2. What is cartography ?

Answered: 1 week ago

Question

What is order of reaction? Explain with example?

Answered: 1 week ago