Coursera ML笔记4

神经网络的来源

Neuron in the brain

Neural Network:input layer,hidden layer,output layer

x0x1x2x3a(2)1a(2)2a(2)3hθ(x)

a(j)i="activation" of unit i in layer jΘ(j)=matrix of weights controlling function mapping from layer j to layer j+1

a(2)1=g(Θ(1)10x0+Θ(1)11x1+Θ(1)12x2+Θ(1)13x3)a(2)2=g(Θ(1)20x0+Θ(1)21x1+Θ(1)22x2+Θ(1)23x3)a(2)3=g(Θ(1)30x0+Θ(1)31x1+Θ(1)32x2+Θ(1)33x3)hΘ(x)=a(3)1=g(Θ(2)10a(2)0+Θ(2)11a(2)1+Θ(2)12a(2)2+Θ(2)13a(2)3)

If network has sj units in layer j and sj+1 units in layer j+1, then Θ(j) will be of dimension sj+1×(sj+1). (because of the bias unit)

向量化

z(2)k=Θ(1)k,0x0+Θ(1)k,1x1++Θ(1)k,nxn

a(2)1=g(z(2)1)a(2)2=g(z(2)2)a(2)3=g(z(2)3)

x=x0x1xn/a(1)=a(1)0a(1)1a(1)nz(j)=z(j)1z(j)2z(j)n

z(2)=Θ(1)x=Θ(1)a(1)
a(2)=g(z(2))
Add a(2)0=1 then a(2)Rm,z(2)Rm;n=m+1.
hΘ(x)=a(3)=g(z(3))

a(j)=g(z(j))
z(j+1)=Θ(j)a(j)
hΘ(x)=a(j+1)=g(z(j+1))

Example

Example1

hΘ(x)=g(30+20x1+20x2)x1=0  and  x2=0  then  g(30)0x1=0  and  x2=1  then  g(10)0x1=1  and  x2=0  then  g(10)0x1=1  and  x2=1  then  g(10)1

Example2

AND:Θ(1)NOR:Θ(1)OR:Θ(1)=[302020]=[102020]=[102020]

x0x1x2a(2)1a(2)2[a(3)]hΘ(x)

Θ(1)=[301020202020]

Θ(2)=[102020]

多分类问题

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值