Model Representation--machine learning

1.How does the nervous system work

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

2.What do we learn from nervous system?

仿照神经元的信息传输模式,我们建立了神经网络,针对没有中间层的神经元传输模型我们建立了没有中间层的神经网络。
在这里插入图片描述
即: 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) x 0 x_0 作为偏置输入
对有中间层的神经网络,我们同样可以建立模型
在这里插入图片描述
即: 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) 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) 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) 我们令 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 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 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 可以得到 a 1 ( 2 ) = g ( z 1 ( 2 ) ) a_1^{(2)}=g(z^{(2)}_1) a 2 ( 2 ) = g ( z 2 ( 2 ) ) a_2^{(2)}=g(z^{(2)}_2) a 3 ( 2 ) = g ( z 3 ( 2 ) ) a_3^{(2)}=g(z^{(2)}_3)
二层的表示与上面的例子类似。

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]
在这里插入图片描述

原创文章 265 获赞 80 访问量 11万+

猜你喜欢

转载自blog.csdn.net/xd15010130025/article/details/105152087