Model Representation--machine learning

content

  • 1.How does the nervous system work
  • 2.What do we learn from nervous system?
  • 3.In terms of matrices

1.How does the nervous system work

Model Representation--machine learning_第1张图片
这是一个简单的模型,一个神经元接受来自其他神经元的输入,并且输出信息到其他神经元。考虑到神经元之间的联系,我们有更加复杂的模型
Model Representation--machine learning_第2张图片
几个神经元作为一个神经元的输入,这个神经元作为下一个神经元的输入,这样子就构成了很多层。

2.What do we learn from nervous system?

仿照神经元的信息传输模式,我们建立了神经网络,针对没有中间层的神经元传输模型我们建立了没有中间层的神经网络。
Model Representation--machine learning_第3张图片
即: h θ x = g ( θ 0 x 0 + θ 1 x 1 + θ 2 x 2 + θ 3 x 3 ) h_{\theta}x=g(\theta_0x_0+\theta_1x_1+\theta_2x_2+\theta_3x_3) hθx=g(θ0x0+θ1x1+θ2x2+θ3x3) x 0 x_0 x0作为偏置输入
对有中间层的神经网络,我们同样可以建立模型
Model Representation--machine learning_第4张图片
即: a 1 ( 2 ) = g ( θ 10 ( 1 ) x 0 + θ 11 ( 1 ) x 1 + θ 12 ( 1 ) x 2 + θ 13 ( 1 ) x 3 ) a_1^{(2)}=g(\theta_{10}^{(1)}x_0+\theta_{11}^{(1)}x_1+\theta_{12}^{(1)}x_2+\theta_{13}^{(1)}x_3) a1(2)=g(θ10(1)x0+θ11(1)x1+θ12(1)x2+θ13(1)x3) a 2 ( 2 ) = g ( θ 20 ( 1 ) x 0 + θ 21 ( 1 ) x 1 + θ 22 ( 1 ) x 2 + θ 23 ( 1 ) x 3 ) a_2^{(2)}=g(\theta_{20}^{(1)}x_0+\theta_{21}^{(1)}x_1+\theta_{22}^{(1)}x_2+\theta_{23}^{(1)}x_3) a2(2)=g(θ20(1)x0+θ21(1)x1+θ22(1)x2+θ23(1)x3) a 3 ( 2 ) = g ( θ 30 ( 1 ) x 0 + θ 31 ( 1 ) x 1 + θ 32 ( 1 ) x 2 + θ 33 ( 1 ) x 3 ) a_3^{(2)}=g(\theta_{30}^{(1)}x_0+\theta_{31}^{(1)}x_1+\theta_{32}^{(1)}x_2+\theta_{33}^{(1)}x_3) a3(2)=g(θ30(1)x0+θ31(1)x1+θ32(1)x2+θ33(1)x3)我们令 z 1 ( 2 ) = θ 10 ( 1 ) x 0 + θ 11 ( 1 ) x 1 + θ 12 ( 1 ) x 2 + θ 13 ( 1 ) x 3 z^{(2)}_1=\theta_{10}^{(1)}x_0+\theta_{11}^{(1)}x_1+\theta_{12}^{(1)}x_2+\theta_{13}^{(1)}x_3 z1(2)=θ10(1)x0+θ11(1)x1+θ12(1)x2+θ13(1)x3 z 2 ( 2 ) = θ 20 ( 1 ) x 0 + θ 21 ( 1 ) x 1 + θ 22 ( 1 ) x 2 + θ 23 ( 1 ) x 3 z^{(2)}_2=\theta_{20}^{(1)}x_0+\theta_{21}^{(1)}x_1+\theta_{22}^{(1)}x_2+\theta_{23}^{(1)}x_3 z2(2)=θ20(1)x0+θ21(1)x1+θ22(1)x2+θ23(1)x3 z 3 ( 2 ) = θ 30 ( 1 ) x 0 + θ 31 ( 1 ) x 1 + θ 32 ( 1 ) x 2 + θ 33 ( 1 ) x 3 z^{(2)}_3=\theta_{30}^{(1)}x_0+\theta_{31}^{(1)}x_1+\theta_{32}^{(1)}x_2+\theta_{33}^{(1)}x_3 z3(2)=θ30(1)x0+θ31(1)x1+θ32(1)x2+θ33(1)x3可以得到 a 1 ( 2 ) = g ( z 1 ( 2 ) ) a_1^{(2)}=g(z^{(2)}_1) a1(2)=g(z1(2)) a 2 ( 2 ) = g ( z 2 ( 2 ) ) a_2^{(2)}=g(z^{(2)}_2) a2(2)=g(z2(2)) a 3 ( 2 ) = g ( z 3 ( 2 ) ) a_3^{(2)}=g(z^{(2)}_3) a3(2)=g(z3(2))
二层的表示与上面的例子类似。

3.In terms of matrices

从上面的式子中,相信同学们已经发现可以用矩阵来表示
[ z 1 ( 2 ) z 2 ( 2 ) z 3 ( 2 ) ] = [ θ 10 ( 1 ) θ 11 ( 1 ) θ 12 ( 1 ) θ 13 ( 1 ) θ 20 ( 1 ) θ 21 ( 1 ) θ 22 ( 1 ) θ 23 ( 1 ) θ 30 ( 1 ) θ 31 ( 1 ) θ 32 ( 1 ) θ 33 ( 1 ) ] [ x 0 x 1 x 2 x 3 ] \left[ \begin{matrix} z_1^{(2)} \\z_2^{(2)} \\z_3^{(2)} \end{matrix}\right] =\left[\begin{matrix} \theta_{10}^{(1)}& \theta_{11}^{(1)} &\theta_{12}^{(1)}&\theta_{13}^{(1)} \\\theta_{20}^{(1)} & \theta_{21}^{(1)} & \theta_{22}^{(1)} & \theta_{23}^{(1)}\\ \theta_{30}^{(1)} & \theta_{31}^{(1)} &\theta_{32}^{(1)} & \theta_{33}^{(1)} \end{matrix} \right]\left[ \begin{matrix} x_0 \\x_1 \\x_2 \\ x_3 \end{matrix}\right] z1(2)z2(2)z3(2)=θ10(1)θ20(1)θ30(1)θ11(1)θ21(1)θ31(1)θ12(1)θ22(1)θ32(1)θ13(1)θ23(1)θ33(1)x0x1x2x3

你可能感兴趣的:(机器学习,深度学习,神经网络,矩阵)