I
目录
第 1 周 .............................................................................................................................................. 1
一、 引言(Introduction) .................................................................................................... 1
1.1 欢迎............................................................................................................................ 1
1.2 机器学习是什么? .................................................................................................... 4
1.3 监督学习 .................................................................................................................... 6
1.4 无监督学习 .............................................................................................................. 10
二、单变量线性回归(Linear Regression with One Variable) ................................................ 15
2.1 模型表示 .................................................................................................................. 15
2.2 代价函数 .................................................................................................................. 18
2.3 代价函数的直观理解 I ............................................................................................ 20
2.4 代价函数的直观理解 II ........................................................................................... 21
2.5 梯度下降 .................................................................................................................. 23
2.6 梯度下降的直观理解 .............................................................................................. 26
2.7 梯度下降的线性回归 .............................................................................................. 29
2.8 接下来的内容 .......................................................................................................... 31
三、线性代数回顾(Linear Algebra Review) ........................................................................... 32
3.1 矩阵和向量 .............................................................................................................. 32
3.2 加法和标量乘法 ...................................................................................................... 34
3.3 矩阵向量乘法 .......................................................................................................... 35
3.4 矩阵乘法 .................................................................................................................. 36
3.5 矩阵乘法的性质 ...................................................................................................... 37
3.6 逆、转置 .................................................................................................................. 38
第 2 周 ............................................................................................................................................ 39
四、多变量线性回归(Linear Regression with Multiple Variables) ........................................ 39
4.1 多维特征 .................................................................................................................. 39
4.2 多变量梯度下降 ...................................................................................................... 41
4.3 梯度下降法实践 1-特征缩放 ................................................................................. 43
4.4 梯度下降法实践 2-学习率 ..................................................................................... 45
4.5 特征和多项式回归 .................................................................................................. 46
4.6 正规方程 .................................................................................................................. 48
4.7 正规方程及不可逆性(选修) .............................................................................. 51
五、Octave 教程(Octave Tutorial) .......................................................................................... 54
5.1 基本操作 .................................................................................................................. 54
5.2 移动数据 .................................................................................................................. 61
5.3 计算数据 .................................................................................................................. 70
5.4 绘图数据 .................................................................................................................. 77
5.5 控制语句:for,while,if 语句 ............................................................................. 83
5.6 向量化 ...................................................................................................................... 89
5.7 工作和提交的编程练习 .......................................................................................... 94
第 3 周 ............................................................................................................................................ 97
六、逻辑回归(Logistic Regression) ........................................................................................ 97
6.1 分类问题 .................................................................................................................. 97