home..
cs229
huyi / August 2022
[toc]
Lecture 1 - Welcome
What’s machine learning?
- 1959 Arthur Samuel: gives computers the ability to learn without being explicitly programmed (无需显式编程)
- well-posed learning problem
Supervised Learning
- 定义 给一个dataset,有 input:x 和 label:y,学一个映射。
- 分类
- Regression output 连续
- classification output 离散
- 举例
- support vector machine: 支持输入是无限维的
Machine Learning Strategy (Learning Theory)
Deep Learning
Unsupervised Learning
Lecture 2 - Linear Regression & Gradoent Descent
PART I - linear regression
notation
- n = # number of features
- m = # number of training exaple
- 注意$n$个feature对应着x的维度是$n+1$维 \(x=\begin{bmatrix} {x_0}\\ {x_1}\\ {\vdots}\\ {x_n}\\ \end{bmatrix}\) \(\theta=\begin{bmatrix} {\theta_0}\\ {\theta_1}\\ {\vdots}\\ {\theta_n}\\ \end{bmatrix}\) 其中$x_0=1$
- 如果有两个feature的话 $h(x)=\theta_0+\theta_1 x_1+\theta_2 x_2=\sum\limits_{j=0}^2\theta_jx_j=\theta^{T}x$
- $h(x)$也可写作$h_{\theta}(x)$
如何选取$\theta$?
希望$\theta$–minimize->$\sum\limits_{i=1}^{m}(h(x^{(i)})-y^{(i)})^2$
为了方便,一般前面加一个系数$\frac{1}{2}$
\[J(\theta)=\frac{1}{2}\sum\limits_{i=1}^{m}(h(x^{(i)})-y^{(i)})^2\]