MY MEMO
[MACHINE LEARNING] Week2 과제 본문
+)Octave,MATLAB
1.Simple Octave/MATLAB function
2.1 Plotting the Data
Before starting on any task, it is often useful to understand the data by visualizing it. For this dataset, you can use a scatter plot to visualize the data, since it has only two properties to plot (profit and population). (Many other problems that you will encounter in real life are multi-dimensional and can’t be plotted on a 2-d plot.) In ex1.m, the dataset is loaded from the data file into the variables X and y:
2.2 Gradient Descent
2.2.1 Update Equations
The objective of linear regression is to minimize the cost function
where the hypothesis hθ(x) is given by the linear model
gradient descent function
(simultaneously update θj for all j).
2.2.2 Implementation
2.2.3 Computing the cost J(θ)
ex1.m
if you want to submit code and check whether your code is right, write down code in here
they execute this function and give you score
computeCost.m
you have to write down right code in this function
and this assignment want to check you can make right code for calculating cost function