Giter Club home page Giter Club logo

optimisation_algorithms's Introduction

Optimisation algorithms

Introduction

My exam project for MSU course "The introduction course to math for data science", Fall 2021 - Spring 2022. The program of the course can be found here or here. Exam consists of 4 problems describing convergence of 4 iterative optimisation algorithms using the example of function minimisation. Optimisation algorithms include: Gradient descent, Heavy ball descent, Accelerated gradient descent, Newton's method.

Assignment

Objective: Solve 4 problems using the example of the $f(x)$ function minimization.

$$f(x)\ =\ ∣∣Ax−b∣∣^3_{2} $$
m = 100, n = 10, np.random.seed(0);
Generate matrix: A = np.random.randn(m, n).
Generate matrix: b = np.random.randn(m).
The initial approximation is the zero vector: $x_0$ = jax.numpy.zeros(n)

  1. How many iterations does the gradient descent method with a constant step of $α=10^{−4}$ take to achieve an accuracy in gradient norm less than $10^{−4} $ ?
  2. How many iterations does the heavy ball method with a constant step of $α = 10^{-4}$ and coefficient $β = 0.5 $ take to achieve an accuracy in the gradient norm less than $10^{-4} $ ?
  3. How many iterations does the accelerated gradient method with a constant step of $α = 3* 10^{-4} $ take to achieve an accuracy in gradient norm less than $10^{-4}$ ?
  4. After how many iterations does Newton's method with a constant step of $α = 10^{-1} $ begins to stagnate, that is, the gradient norm stops changing? In your answer, indicate the number of iteration k such that the value of the gradient norm at the next iteration k+1 remains the same.
    What rate of convergence of Newton's method is observed in the norm of the gradient?

Files:

  • Optimisation_algorithms.ipynb - The description of the problem, initial conditions, solution, and visual answer.
  • Optimisation_algorithms_supplementary.ipynb - Additional code needed to convert the notebook to html.
    $$ $$
    $$Created\ by\ the\ end\ of\ March,\ 2022.$$

optimisation_algorithms's People

Contributors

konstantinburkin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.