chapter 6 Model representation
liner regression. this chapter see what the model looks like and what the overall process of supervised learning looks likes.
supervised learning ,has a data set ,called training set.
m =Number of traning examples
x’s = “input” variable/features
y’s =”output” variable/”target” variable
(x,y) - a single training example
(xi,yi) - ith training example
h - hypothesis
Housing price prediction model called linear regression, linear regression with one variable(univariate linear regression )
chapter 7 Cost function
-Housing price prediction
hypothesis:
’s:Parameter
choose , so that is close to y for our training examples (x,y)
Goal: ,
is Cost function or Squate error cost function
chapter 8 Cost function intuition 1
give some example to get back to intuition about what the cost function is doing and why we use it .
look up some plots to understand the cost function ,to do so ,we simplify the algorithm,so that it only had one parameter theta one.
chapter 10 Gradient descent
it is taking about gradient descent for minimizing some arbitrary function J.
Have some function
Want
Outline:
- start with some .
- keep changing to reduce until we hopefully end up to a minimum.
Gradient descent algorithm:
repeat until convergence {
(for j=0 and j=1)
}
a- called the learning rate,it basically controls how big a step we take downhill with gradient descent.
- it is a derivative term
simultaneously update :
in the next chapter ,we’re going to go into the details of the derivative term.which it wrote out but didn’t really define.
chapter 11 Gradient descent intuition
get better intuition about what the algorithm is doing ,and why the steps of the gradient descent algorithm might make sense.
if is too small,gradient descent can be slow.
if is too large,gradient descent can overshoot the minimum.it may fail to converge or even diverge.
if you’re already at a local optimum,one step of gradient descent does absolutely nothing.It doesn’t change parameter.cause it keeps your solution at the local optimum.
Gradient descent can converge to a local minimum,even with the learning rate fixed.
As we approach a local minimum.gradient descent will automatically take smaller steps.So,no need to decrease over time.
derivative term and partial derivative
chapter 12 Gradient descent for linear regression
put together gradient descent with our cost function,and that will give us an algorithm for linear regression for fitting a straight line to our data.
Gradient descent algorithm :
the key term we need is this derivative term over here.
“Batch” Gradient Descent :
“Batch”: Each step of gradient descent uses all the training examples.