练习的文件介绍
- ex1_multi.py 对于第二个练习的步骤脚本
- ex1data1.txt 一元线性回归数据集,第一列是城市的人口,第二列是食物卡车在该城市的盈利状况,负数表明亏损
- ex1data2.txt 多元线性回归数据集,第一列是房子的大小,第二列是卧室的数量,第三列是房子的价格
- computerCost.py 计算线性损失的方法
- featureNormalize.py 特征规范化的方法
- gradientDescent.py 运行梯度下降的方法
- normalEqn.py 计算正规方程的方法
- plotData.py 显示数据集的方法
参考链接:
https://github.com/metpallyv/LinearRegression/blob/master/normal_equation.py
https://github.com/nex3z/machine-learning-exercise/tree/master/coursera-machine-learning-python/ex1
https://github.com/nex3z/machine-learning-exercise/tree/master/coursera-machine-learning-python
网友评论