Skip to content

In this little project I'm going to optimize a cost function (predefined) through the Gradient Descent algorithm

Notifications You must be signed in to change notification settings

xavierperez21/Gradient_descent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Gradient_descent

In this little project I'm going to optimize a cost function (predefined) through the Gradient Descent algorithm

gradient_descent

The Gradient Descent is an optimization algorithm that can help us on minimize the cost function of our model.

When we talk about optimization in mathematics, we talk abot finding the critical points of a function.

So in the field of Machine Learning, this algorithm is very useful to improve our model on minimizing the error. We calculate this "error" evaluating our model against real data. This evaluation is known as "cost function".

Once we get the cost function we can optimize it to get the minimum error through the use of the gradient vector (that's why the name of "gradient descent"), that's going to tell us the direction where the function decreases in function of certain parameters.

By doing this we can get or model to get better and better, so this is what we call "to learn" in machine learning. :)

For this project we're going to optimize a cost function that is predefined for practical reasons. The cost function is the next one:

cost_function

If we plot the function in top view, we can see how we are optimizing the parameters until we reach the local minimum (deep zone in blue).

optimization

Libraries Used

  • Numpy
  • SciPy
  • Matplotlib

Project Online

You can see the project working online here

Once you get there click on the "Runtime" option, and then in the "Run all" option and you can see the project working. Go to the last line :)

About

In this little project I'm going to optimize a cost function (predefined) through the Gradient Descent algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published