前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >学习回归 1-5 多重回归

学习回归 1-5 多重回归

作者头像
触摸壹缕阳光
发布2022-11-08 13:36:34
2830
发布2022-11-08 13:36:34
举报

多重回归

之前我们是根据广告费来预测点击量,但是在实际中可能要解决的很多问题是变量超过两个的复杂问题。我们收集的数据中不仅包括了广告费,还有其它的信息,比如广告的展示位置和广告版面的大小等多个要素,现在我们要用这些要素来预测点击量。

f_{\theta}(x_1, x_2, x_3) = \theta_0+\theta_1x_1 + \theta_2x_2 + \theta_3x_3
f_{\theta}(x_1, \cdots, x_n) = \theta_0 + \theta_1x_1 + \cdots +\theta_nx_n
f_{\theta}(x_1, \cdots, x_n) = \theta_0x_1 + \theta_1x_1 + \cdots +\theta_nx_n
{\theta} = \begin{bmatrix} \theta_0 \\ \theta_1 \\ \theta_2 \\ \vdots \\ \theta_n \end{bmatrix} \ \ \ \ \ \ \ \ \ {x} = \begin{bmatrix} x_0 \\ x_1 \\ x_2 \\ \vdots \\ x_n \end{bmatrix} (x_0 = 1)
f_{\theta}({x}) = {\theta}^{T}{x}
\frac{\partial E}{\partial \theta_j} = \frac{\partial E}{\partial f_{\theta}(x)}\frac{\partial f_{\theta}(x)}{\partial\theta_j}

其中

\frac{\partial E}{\partial f_{\theta}(x)}

学习回归 1-3 梯度下降法已经计算过了,现在只需要计算

\frac{\partial f_{\theta}(x)}{\partial\theta_j}

\begin{split} \frac{\partial f_{\theta}(x)}{\partial\theta_j} &= \frac{\partial}{\partial\theta_j}({\theta}^{T}{x})\\ &=\frac{\partial}{\partial\theta_j}(\theta_0x_1 + \theta_1x_1 + \cdots +\theta_nx_n) \\ &= x_j \end{split}

j

个参数的梯度下降算法的更新表达式如下:

\theta_j := \theta_j - \eta\sum_{i = 1}^{n}(f_{\theta}(x^{(i)}) - y^{(i)})x_j^{(i)}

至此,我们将每个参数的梯度下降算法的更新表达式汇总成一个通用的表达式。

References:

《白话机器学习的数学》

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2022-06-26,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 AI机器学习与深度学习算法 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 多重回归
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档