吴恩达《机器学习》

4.1 Multiple features(variables)

notation
n n n = number of feature
x ( i ) x^{(i)} x(i) = input (features) of i i ith training example
x j ( i ) x_j^{(i)} xj(i) = value of features j j j in i i ith training example

hypothesis:

previously: h θ ( x ) = θ 0 + θ 1 x h_{\theta}(x) = \theta_0 +\theta_1x hθ(x)=θ0+θ1x
Now: h θ ( x ) = θ 0 + θ 1 x 1 + θ 2 x 2 + ⋯ + θ n x n = θ T x h_{\theta}(x)=\theta_0 + \theta_1x_1 +\theta_2x_2+\cdots+\theta_nx_n=\theta^Tx hθ(x)=θ0+θ1x1+θ2x2++θnxn=θTx
for convenience of notation,define x 0 = 1 x_0=1 x0=1
X = ( x 0 x 1 x 2 … x n ) ∈ R n + 1 θ = ( θ 0 θ 1 θ 2 … θ n ) ∈ R n + 1 X=\begin{pmatrix} x_0\\x_1\\x_2\\\dots\\x_n\end{pmatrix}\in\mathbb{R^{n+1}}\qquad \theta =\begin{pmatrix}{\theta_0}\\{\theta_1}\\{\theta_2}\\\dots\\{\theta_n}\end{pmatrix}\in\mathbb{R^{n+1}} X=x0x1x2xnRn+1θ=θ0θ1θ2θnRn+1
conclusion:
multivariate linear regression

4.2 Gradient Descent for multiple variables

hypothesis:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值