https://www.coursera.org/learn/machine-learning/home/week/2
Multivariate Linear Regression
上周学的是单个参数的Linear Regression, 模型中只有一个变量x。Multivariate Linear Regression是,
$h_\theta (x) = \theta_0 + \theta_1 x_1 + \theta_2 x_2 + \theta_3 x_3 + \cdots + \theta_n x_n$具体描述:
$\begin{align*}x_j^{(i)} &= \text{value of feature } j \text{ in the }i^{th}\text{ training example} \newline x^{(i)}& = \text{the input (features) of the }i^{th}\text{ training example} \newline m &= \text{the number of training examples} \newline n &= \text{the number of features} \end{align*}$适用Matrix表示就变成,
$\begin{align*}h_\theta(x) =\begin{bmatrix}\theta_0 \hspace{2em} \theta_1 \hspace{2em} ... \hspace{2em} \theta_n\end{bmatrix}\begin{bmatrix}x_0 \newline x_1 \newline \vdots \newline x_n\end{bmatrix}= \theta^T x\end{align*}$其中,
$x_{0}^{(i)} =1 \text{ for } (i\in { 1,\dots, m } )$