必做: [*] warmUpExercise.m - Simple example function in Octave/MATLAB[*] plotData.m - Function to display the dataset[*] computeCost.m - Function to compute the cost of linear regression[*] gradientDescent.m - Function to run gradient descent 1.warmUpE…
https://www.coursera.org/learn/machine-learning/exam/7pytE/linear-regression-with-multiple-variables 1. Suppose m=4 students have taken some class, and the class had a midterm exam and a final exam. You have collected a dataset of their scores on the…
https://www.coursera.org/learn/machine-learning/exam/dbM1J/octave-matlab-tutorial Octave Tutorial 5 试题 1. Suppose I first execute the following Octave commands: A = [1 2; 3 4; 5 6]; B = [1 2 3; 4 5 6]; Which of the following are then valid Octave com…
一.准备工作 从网站上将编程作业要求下载解压后,在Octave中使用cd命令将搜索目录移动到编程作业所在目录,然后使用ls命令检查是否移动正确.如: 提交作业:提交时候需要使用自己的登录邮箱和提交令牌,如下: 二.单变量线性回归 绘制图形:rx代表图形中标记的点为红色的x,数字10表示标记的大小. plot(x, y, ); % Plot the data 计算代价函数(Cost Funtion):迭代次数1500,学习速率0.01.  iterations = 1500; alpha = 0.…
一.准备工作 从网站上将编程作业要求下载解压后,在Octave中使用cd命令将搜索目录移动到编程作业所在目录,然后使用ls命令检查是否移动正确.如: 提交作业:提交时候需要使用自己的登录邮箱和提交令牌,如下: 二.单变量线性回归 绘制图形:rx代表图形中标记的点为红色的x,数字10表示标记的大小. plot(x, y, ); % Plot the data 计算代价函数(Cost Funtion):迭代次数1500,学习速率0.01.  iterations = 1500; alpha = 0.…
    最近开始看斯坦福的公开课<Machine Learning>,对其中单参数的Linear Regression(未涉及Gradient Descent)做个总结吧. [设想]     最近想要租房,收集了一些信息,得知房价与房间大小有关,那成本函数就可以预测在不同房间大小下租房的价格(PS:价格可能也与该房地理有关,那若把大小和距离市中心距离一并考虑,则属于多参数的线性回归) [数据]     1.准备一个ex1data1.txt,第一列为年龄,第二列为价格     2.导入matla…
编程作业有两个文件 1.machine-learning-live-scripts(此为脚本文件方便作业) 2.machine-learning-ex1(此为作业文件) 将这两个文件解压拖入matlab工作区内并将machine-learning-live-scripts内的ex1.mlx拖入到machine-learning-ex1\ex1中 在命令提示符区输入subimit命令,并填写邮箱与提交凭证来提交作业. 1.A simple MATLAB function 修改warmUpExerc…
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvenFoXzE5OTE=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt=""> watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvenFoXzE5OTE=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFC…
第二周编程作业:Linear Regression 分为单一变量和多变量,假想函数为:hθ(x)=θ0+θ1x1+θ2x2+θ3x3+⋯+θnxn.明显已经包含单一变量的情况,所以完成多变量可以一并解决单一变量问题. 其中,需要注意的地方: Feature normalization中,sigma是均方误差(标准差).mu是某一列feature的平均值. 代码包上传到gitlab,所有问题的公式都在:coursera的lecture上. 最终结果:Nice work!…