1.derivative (only one variable)
it measures the sensitivity of f(x) with respect to a trivial change of x (slope of the tangent line)
2. partial derivative (multi variable, but not any direction)
at lease two variables.
Actually,it’s derivative based on each dimension(x bar,y bar ,z bar….)
3.directional derivative (multi variables ,any direction)
break a vector down into each dimension,so we can use partial derivative to solve this
actually it’s just vector dot product ([partial derivative] * [vector in this direction])
it’s all about how the vector in this direction affects the partial derivative.
we only care about the direction of the vector,so vector v is a unit vector
so what is gradient?
gradient is about finding a direction which we can get the steepest slope. it means we need to find a direction which maximize [partial derivative ]* [initial vector].
multiplication of two vectors ,obviously when they stick together(theta = 0) ,we can get the steepest slope. meanwhile ,we only care about the direction.
so the gradient = [partial derivative]
In conclusion, if we want to minimize the cost function, we can decrease each direction in the vector by its gradient respectively. This is gradient descent.
another way to comprehend.
if we want to minimize the cost , we should find to make negative.
suppose we choose , alpha is a small,positive parameter.
so the cost will be negative.this is what we looking for.
, we can minimize the cost function