ImageVerifierCode 换一换
格式:PDF , 页数:11 ,大小:676.53KB ,
资源ID:3430273      下载积分:10 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bingdoc.com/d-3430273.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(上海交通大学神经网络原理与应用作业2.pdf)为本站会员(wj)主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(发送邮件至service@bingdoc.com或直接QQ联系客服),我们立即给予删除!

上海交通大学神经网络原理与应用作业2.pdf

1、Neural Network Theory and ApplicationsHomework Assignment 2oxstarSJTUJanuary 19,2012Suppose the output of each neuron in a multilayer quadratic perceptron(MLQP)networkisxkj=fNk1Xi=1(ukjix2k1,i+vkjixk1,i)+bkjfor k=2,3,.,M and j=1,2,.,Nkwhere both ukjiand vkjiare the weights connecting the ith unit in

2、 the layer k 1 to thejth unit in the layer k,bkjis the bias of the jth unit in the layer k,Nkis the number ofunits in the k(1 k M),and f(.)is the sigmoidal activation function.1.Please design the corresponding back propagation algorithm.Ans.From the network,we haveinput=x1(1)xk=f(ukx2k1+vkxk1+bk),k=

3、2,3,.,M(2)output=xM(3)The steepest descent algorithm for the approximate mean square error isukji(m+1)=ukji(m)Fukjivkji(m+1)=vkji(m)Fvkjibkj(m+1)=bkj(m)FbkjThe net input to layer k is an explicit function of the weights and bias in that layernkj=Nk1Xi=1(ukjix2k1,i+vkjixk1,i)+bkjThereforenkjukji=x2k1

4、,i,nkjvkji=xk1,i,nkjbkj=1LetskjFnkj,skFnk1Using the chain rule of calculus,we haveuk(m+1)=uk(m)sk(x2k1)T(4)vk(m+1)=vk(m)sk(xk1)T(5)bk(m+1)=bk(m)sk(6)In order to obtain the recurrence relation,we should calculatenk+1,jnki=?PNki=1(uk+1,jix2ki+vk+1,jixki)+bk+1,j?nki=uk+1,jix2kinki+vk+1,jixkinki=uk+1,ji

5、f2(nki)nki+vk+1,jif(nki)nki=(2uk+1,jixki+vk+1,ji)f(nki)=(2uk+1,jixki+vk+1,ji)(1 xki)xkink+1nk=(2uk+1xk+vk+1)F(nk)We can now write out the recurrence relation for the sensitivity by using the chain rulein matrix form:sk=Fnk=?nk+1nk?TFnk+1(7)=F(nk)(2uk+1xk+vk+1)Tsk+1(8)The starting point,sM,for the re

6、currence relation has been derived:sM=2F(nM)(t xM)(9)2.Write a program to realize it(3 layers).Ans.cf.src/mlqp.m3.Run your program for pattern classification on the two-spiral data set,which is thesame as homework one.You can choose 10 hidden units in this problem.Ans.We can first discuss about the

7、process of convergence.When learning rate is setto 0.1 and initial values are randomly chosen.We choose MSE(Mean Squared Error)topresent the learning quality of our NN.However,the final results are classifications,so wealso present Error Rate(Figure 1).In Figure 2,we present the process of convergen

8、ce.From Figure 1b we can notice thatwhen iteration is between 200 and 250,Error Rate changed a lot.So we snapshot moredecision boundaries in this domain.Trying 3 different learning ratesWe choose three different learning rates,which are 0.1,0.5 and 1.Here we fix initialvalues to the same random valu

9、es.Results are shown in Figure 3.Trying 3 different initial valuesThree different kinds of initial values are chosen,which are random values,all 0.01s andall 0s.Here we fix learning rate to 0.1.Results are shown in Figure 4.2010020030040050060070080000.10.20.30.40.50.60.7IterationMSE TrainTest(a)Mea

10、n Squared Error010020030040050060070080000.10.20.30.40.50.60.70.80.91IterationError Rate TrainTest(b)Error RateFigure 1:Results of Ex.2.3(learning rate:0.1,initial values:random)4321012343210123 ClassificationClass 1Class 2(a)Iteration=1004321012343210123 ClassificationClass 1Class 2(b)Iteration=200

11、4321012343210123 ClassificationClass 1Class 2(c)Iteration=2144321012343210123 ClassificationClass 1Class 2(d)Iteration=2204321012343210123 ClassificationClass 1Class 2(e)Iteration=2504321012343210123 ClassificationClass 1Class 2(f)Iteration=500Figure 2:Process of Convergence305010015020025000.10.20.

12、30.40.50.60.7IterationMSE TrainTest(a)MSE(learning rate:0.5)0501001500.20.250.30.350.40.450.50.550.60.650.7IterationMSE TrainTest(b)MSE(learning rate:1)05010015020025000.10.20.30.40.50.60.70.80.91IterationError Rate TrainTest(c)ER(learning rate:0.5)05010015000.10.20.30.40.50.60.70.80.91IterationErro

13、r Rate TrainTest(d)ER(learning rate:1)Figure 3:Results of Ex.2.3(initial values:random)401002003004005006007008000.40.420.440.460.480.50.52IterationMSE TrainTest(a)MSE(initial values:0s)01002003004005006007008000.40.420.440.460.480.50.52IterationMSE TrainTest(b)MSE(initial values:0.01s)0100200300400

14、5006007008000.20.30.40.50.60.70.80.91IterationError Rate TrainTest(c)ER(initial values:0s)01002003004005006007008000.20.30.40.50.60.70.80.91IterationError Rate TrainTest(d)ER(initial values:0.01s)Figure 4:Results of Ex.2.3(learning rate:0.1)5Discussing the algorithm convergenceA.Different Learning R

15、atesComparing Figure 3 with Figure 1,we can obtain that the more learning rates are,thefaster the algorithm converges,but the more rough the MSE and ER curves are.Whenlearning rate is 0.5,correct decision boundary can still be learned.But when learning rateis as large as 1,the NN can hardly find the

16、 final correct decision boundary and the algorithmconverged to a local minimum points(ER does not reach 0).B.Different Initial ValuesComparing Figure 4 with Figure 1,we can find that setting initial values as 0s or 0.01sdoes not affect the smoothness of MSE and ER curves,but they both converged to a

17、 localminimum points.In order to understand local minimum points intuitively,we draw thedecision boundary for initial values are 0s and 0.01s(Figure 5).4321012343210123 ClassificationClass 1Class 2(a)initial values:0s4321012343210123 ClassificationClass 1Class 2(b)initial values:0.01sFigure 5:Final

18、Decision Boundaries(local optimization)Obviously,it is difficult for the algorithm to jump out of the local solution(compare itwith Figure 2f).4.Run you program for a yeast data set from UCI benchmark,which is collected fromyeast protein locations.It is a 4-class problem so that more complicated tha

19、n two-spiralproblem.Ans.This NN can not solve a 4-class problem,so we use a two phase method.Firstly,we map class 1 and class 2 to new class 0,map class 3 and class 4 to new class 1.Secondly,we map class 1 and class 3 to new class 0,map class 2 and class 4 to new class 1.Finally,we combine results o

20、f these two classification procedure(Table 1).Table 1:Two Phase MethodStep 1Step 2Combination001012103114In this exercise,we also use MSE and ER to evaluate the learning quality.But 8-dimension data is difficult to be plotted on the canvas,so decision boundaries are notprovided as we did in the last

21、 exercise.6Before trying different learning rates and initial values,we also provide our baseline(Figure 6).Note that it includes ER results of the two steps as well as the combination.However,the MSE results of combination can not be calculated because the final classifica-tion is based on the forw

22、ard two 2-class classifications results but the values calculated bysigmoid function are put away.050010001500200025000.10.150.20.250.30.350.40.450.5IterationMSE TrainTest(a)Mean Squared Error(Step 1)050010001500200025000.050.10.150.20.250.30.350.40.450.50.55IterationMSE TrainTest(b)Mean Squared Err

23、or(Step 2)050010001500200025000.10.150.20.250.30.350.40.45IterationError Rate TrainTest(c)Error Rate(Step 1)050010001500200025000.20.250.30.350.40.450.50.55IterationError Rate TrainTest(d)Error Rate(Step 2)050010001500200025000.350.40.450.50.550.60.650.7IterationError Rate TrainTest(e)Error Rate(Com

24、bination)Figure 6:Results of Ex.2.4(learning rate:0.1,initial values:random)Trying 3 different learning ratesWe choose three different learning rates,which are 0.1,0.5 and 1.Here we fix initialvalues to the same random values.Results are shown in Figure 7.MSE1 is short for MSE(Step 1),ERcom stands f

25、or ER(Combination)and LR represents learning rate.Trying 3 different initial valuesThree different kinds of initial values are chosen,which are random values,all 0.01sand all 0s.Here we fix learning rate to 0.1.Results are shown in Figure 8.Note that IVrepresents initial value.Discussing the algorit

26、hm convergenceA.OverfittingFrom Figure 6,we can see the situation of overfitting.For example,while the error rateof training data has the downward trend,the error rate of testing data has a upward trendwhen it meet its minimum.As a matter of fact,this task is so hard that we can hardly leadthe error

27、 rate of testing data,even training data,to a quite low level.B.Different Learning RatesComparing Figure 7 with Figure 6,we also obtain that when learning rates is increasing,both MSE and ER curves are becoming more rough.Also,high learning rates will lead thealgorithm to be unstable and hardly conv

28、erged.C.Different Initial ValuesComparing Figure 8 with Figure 6,we can still find that setting initial values as 0s or7050010001500200025000.10.150.20.250.30.350.40.450.50.550.6IterationMSE TrainTest(a)MSE1(LR:0.5)050010001500200025000.10.150.20.250.30.350.40.450.50.550.6IterationMSE TrainTest(b)MS

29、E2(LR:0.5)050010001500200025000.20.250.30.350.40.450.50.55IterationMSE TrainTest(c)MSE1(LR:1)050010001500200025000.050.10.150.20.250.30.350.40.450.50.55IterationMSE TrainTest(d)MSE2(LR:1)050010001500200025000.050.10.150.20.250.30.350.4IterationError Rate TrainTest(e)ER1(LR:0.5)050010001500200025000.

30、20.250.30.350.40.450.50.55IterationError Rate TrainTest(f)ER2(LR:0.5)050010001500200025000.050.10.150.20.250.30.350.4IterationError Rate TrainTest(g)ER1(LR:1)050010001500200025000.20.250.30.350.40.450.50.55IterationError Rate TrainTest(h)ER2(LR:1)050010001500200025000.250.30.350.40.450.50.550.60.650

31、.7IterationError Rate TrainTest(i)ERcom(LR:0.5)050010001500200025000.250.30.350.40.450.50.550.60.650.7IterationError Rate TrainTest(j)ERcom(LR:1)Figure 7:Results of Ex.2.4(initial values:random)050010001500200025000.10.150.20.250.30.350.40.450.5IterationMSE TrainTest(a)MSE1(IV:0s)0500100015002000250

32、00.050.10.150.20.250.30.350.40.450.50.55IterationMSE TrainTest(b)MSE2(IV:0s)050010001500200025000.10.150.20.250.30.350.40.450.5IterationMSE TrainTest(c)MSE1(IV:0.01s)050010001500200025000.050.10.150.20.250.30.350.40.450.50.55IterationMSE TrainTest(d)MSE2(IV:0.01s)050010001500200025000.20.250.30.350.

33、4IterationError Rate TrainTest(e)ER1(IV:0s)050010001500200025000.250.30.350.40.450.50.550.6IterationError Rate TrainTest(f)ER2(IV:0s)050010001500200025000.20.250.30.350.4IterationError Rate TrainTest(g)ER1(IV:0.01s)050010001500200025000.250.30.350.40.450.50.550.6IterationError Rate TrainTest(h)ER2(IV:0.01s)050010001500200025000.350.40.450.50.550.60.650.7IterationError Rate TrainTest(i)ERcom(IV:0s)

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2