Visually Explained: Newton's Method in Optimization

Поділитися
Вставка
  • Опубліковано 25 січ 2025

КОМЕНТАРІ • 106

  • @quyenhuynh572
    @quyenhuynh572 2 роки тому +25

    I'm a visual learner and this video is exactly what I'm looking for! Great content!

  • @iurgnail
    @iurgnail 5 днів тому

    8:27 is such a revelation! That was exactly what I was confused about, thanks for giving it a special mention!

  • @rmrumman4837
    @rmrumman4837 3 роки тому +29

    This is so high quality stuff! Thanks for the graphical explanation at the beginning!

  • @jyothishkumar3098
    @jyothishkumar3098 3 роки тому +25

    I'm here from yesterday's 3b1b video on Newton's method of finding roots, after wondering if there's any way to use it for minimizing a function. Mainly to see why we can't use it instead of Stochastic Gradiend Descent in Linear Regression. Turns out the Hessian of functions with many components can turn out to be large and computationally intensive, and also that if the second derivative is not a parabola, it can lead you far away from the minima. Still it was nice to see how the operation works in practice, and you mentioned the same points about Hessians too. Good job 😊👍

  • @mattkriese7170
    @mattkriese7170 10 місяців тому +1

    Just finished calculus 1 and learning about Newton’s method brought me here. The visuals were fantastic and the explanation was clear. I’ll need to learn a lot more to grasp the entire concept, but it’s exciting to see topics taught like this for us visual learners.
    Subbed 😁

  • @JonasSchmidt-z3b
    @JonasSchmidt-z3b 16 днів тому

    Great quality! Wow! Your explanations are clear, structured and very well understandable - thank you!

  • @bradhatch8302
    @bradhatch8302 3 роки тому +5

    What the what?! Even I understood this. Killer tutorial!

  • @aayushjariwala6256
    @aayushjariwala6256 3 роки тому +14

    It's rare when less viewed video gives best explanation. Your presentations are almost like 3Blue1Brown or Khan academy! Don't know why this video has this less view!!

    • @igbana_ai
      @igbana_ai 2 роки тому

      This guy knowwwwsssss🔥🔥🙌🙌I love 3blue1brown

  • @shimuk8
    @shimuk8 3 роки тому +1

    HOLYYYYY FKKK !!!! I really wish I came across your video much before I took the painful ways to learn all this… definitely a big recommendation for all the people I know who just started with optimisation courses. Great work !!!!!

  • @mlharville
    @mlharville 11 місяців тому

    Loved this - very helpful! I knew this a long time ago and forgot much of it, so this was an excellent refresher, accessible to many. (And this is coming from a Stanford / Caltech grad working in computer vision, machine learning, and related things.)

  • @tuntstunt
    @tuntstunt 2 роки тому +1

    your videos are so good i wish they were a thing when I took my course on continuous optimization. my professor could never. i wish you would keep making them though!!!

  • @SonLeTyP9496
    @SonLeTyP9496 4 роки тому +3

    Hi Bachir, what an interesting series, very helpful. Cant wait to see next episode

  • @anoojjilladwar203
    @anoojjilladwar203 4 місяці тому +1

    Hello Mr. Bachir El Khadir,
    I recently came across your channel and was truly impressed by your videos and your clear explanations. I've just started working with AI and am also using the Manim library (created by Grant Sanderson) to make animated explanations.
    I would really appreciate any advice you could offer, and I'm also curious to learn more about how you create your videos.

  • @razmyhathy2398
    @razmyhathy2398 Рік тому +1

    It is indeed a truly amazing explanation, and it helps me to understand Newton method visually.

  • @wenyunie3575
    @wenyunie3575 3 роки тому

    Your explanation is awesome. Extension from root-finding scenario to minimum-point-finding problem was exactly my question.

  • @aniketbhandare2847
    @aniketbhandare2847 3 роки тому

    It just needs more videos to get rocket growth !! Very Good Quality stuff ..

  • @saqlainsajid4067
    @saqlainsajid4067 3 роки тому +3

    This is brilliant thank you, hope you give us more visual insight into calculus related things

  • @farhanhyder6378
    @farhanhyder6378 2 роки тому

    Loved the graphical presentation

  • @minoh1543
    @minoh1543 3 роки тому +1

    Amazing explaination! This is very helful for understanding. Thanks a lot sir.

  • @SumitChauhan-vv5ix
    @SumitChauhan-vv5ix 4 місяці тому

    Brilliant visualization and explanation

  • @jungeunk
    @jungeunk Рік тому

    What a concise and informative explanation!!! thank you SO MUCH!! I subscribe your channel from now!

  • @jahn4517
    @jahn4517 2 роки тому

    WoW! This is amasing work man, thank you.

  • @swazza9999
    @swazza9999 3 роки тому

    Excellent video. I especially liked how you linked it back to the root finding version we learned in school. My one beef with this video is that that's an unfair depiction of Tuco.

  • @samiissaadi53
    @samiissaadi53 3 роки тому +1

    Crystal clear explanation, thank you!

  • @adnon2604
    @adnon2604 8 місяців тому

    Amazing video! I could save a lot of time! Thank you very much.

  • @sirelkir
    @sirelkir 2 роки тому

    Another problem is for a negative curvature, the method climbs uphill. E.g. ML Loss functions tend to have a lot of saddle points, which attract the method, so gradient descent is used, because it can find the direction down from the saddle

  • @capsbr2100
    @capsbr2100 Рік тому

    Very nice video, complicated topic made easy to understand.

  • @JosephZhang-s2d
    @JosephZhang-s2d 5 місяців тому

    @Visually Explained, could you help me understand @8:26, why the Newton method can be written from xk - grad^2(f(xk))^-1 * grad(f(xk)) to xk- g(x)/ grad(g(x)) ?

  • @fezkhanna6900
    @fezkhanna6900 2 роки тому

    This was such an awesome explanation, so grateful thank you.

  • @benlevy4120
    @benlevy4120 16 днів тому

    still waiting for the video on Quasi-Newton Methods!! especially BFGS

  • @filippocuscito4333
    @filippocuscito4333 3 роки тому

    Amazing video. Looking forward to more.

  • @TheTessatje123
    @TheTessatje123 2 роки тому

    Is my intuition correct (7:21) if the curvature is high you take a small step and vice-versa?

  • @benoitmialet9842
    @benoitmialet9842 3 роки тому +1

    Brillant explanation, thank you so much.

  • @hosseinshahbazi3655
    @hosseinshahbazi3655 3 роки тому

    Excellent, Please explain LBFGS

  • @bryanthien3151
    @bryanthien3151 3 роки тому +4

    Hi, can you please explain how do you convert alpha into 1 over second derivative of xk at 7:06? Thank you!

    • @VisuallyExplained
      @VisuallyExplained  3 роки тому +6

      Sure. Consider the quadratic approximation f(x) ~ f(xk) + f'(xk) (x - xk) + 1/2 f''(xk) (x-xk)^2 at the bottom of the screen at 7:06. To minimize the right hand side, we can take the derivative with respect to x and set it to zero (i.e., f'(xk) + f''(xk) (x - xk) = 0). If you solve for x, you get x = xk - 1 / f''(xk) * f'(xk).

    • @bryanthien3151
      @bryanthien3151 3 роки тому +1

      @@VisuallyExplained Got it. Thank you so much for the explanation! :)

    • @prub4146
      @prub4146 3 роки тому +1

      @@VisuallyExplained I appreciate your answer and video explanation. I have one confusion. Why do we want to take the derivative in the RHS? In other words, why did we decide to take the minimizer of the quadratic equation as the next step?

    • @VisuallyExplained
      @VisuallyExplained  3 роки тому +3

      @@prub4146 What we are really trying to do is minimize the LHS (i.e., the function f), but it is often hard to do that directly. Instead, we approximate f by a quadratic function (the one in the RHS), and we minimize that quadratic instead. (The minimizer of a quadratic function admits a simple analytical formula, which we find by taking the derivative.) The hope is that the quadratic function is a good enough approximation that its minimum and the minimum of f are close to each other. Let me know if this explanation is clear enough, otherwise I can expand a bit more.

    • @prub4146
      @prub4146 3 роки тому +1

      @@VisuallyExplained Thank you for the explanation. Thanks

  • @tuongnguyen9391
    @tuongnguyen9391 3 роки тому +1

    Hey can you do a sum of square, dsos optimization tutorial for post graduate student.

  • @aanchaljain4610
    @aanchaljain4610 9 місяців тому

    just amazing explanation!!

  • @kravacc7369
    @kravacc7369 11 місяців тому

    Truly an amazing video!!

  • @HasdaRocks
    @HasdaRocks 3 роки тому

    you reading out the whole things made things confusing.
    Can you explain what did you meant by pick a direction "IE" @1:51 ?
    Or did you mean i.e. an abbreviation for 'that is'.
    Hope you don't read next time " = " as double dash.

  • @bl4ckr4bbit
    @bl4ckr4bbit 5 місяців тому

    Do you have a video for quasi newton?

  • @AJ-et3vf
    @AJ-et3vf 2 роки тому

    Great video. Thank you!

  • @alle9ro
    @alle9ro Рік тому

    where we can see quasi-newton video??

  • @thegoru0106
    @thegoru0106 2 роки тому

    Great explanation

  • @zhongxina9569
    @zhongxina9569 5 місяців тому

    Love the video!

  • @sidhartsatapathy1863
    @sidhartsatapathy1863 8 місяців тому

    sir do you use "MANIM" libray of python to create these beautiful animations in your great videos ?

  • @LoL4476
    @LoL4476 3 роки тому

    Very good explanation

  • @1239719
    @1239719 2 роки тому

    oh man is this gold

  • @brandondean961
    @brandondean961 2 роки тому

    Great content

  • @weisongwen3042
    @weisongwen3042 Рік тому

    Nice videos! May i know what tools do you use to make this figures?

  • @mrtochiko2885
    @mrtochiko2885 Рік тому

    very useful, thanks !

  • @jfusion99
    @jfusion99 3 роки тому

    Amazingly presented, thank you.

  • @akshayavenkataramanan8121
    @akshayavenkataramanan8121 2 роки тому

    how come by subtracting the multiple of the slope from the current iterate, we find the minimum point?

  • @tomxiao
    @tomxiao 2 роки тому

    Thank you, brilliant stuff.

  • @rajivgulati4298
    @rajivgulati4298 3 роки тому

    Great video man. God bless you

  • @mitratavakkoli2865
    @mitratavakkoli2865 2 роки тому

    Amazing job! Thanks a lot!!

  • @neelabhchoudhary2063
    @neelabhchoudhary2063 11 місяців тому

    holy cow this was super helpful

  • @vigneshbalaji21
    @vigneshbalaji21 Рік тому

    Nice explanation

  • @rayankasam4784
    @rayankasam4784 11 місяців тому

    Loved the video

  • @multiverse6968
    @multiverse6968 2 роки тому

    lovely explanation 🤩🤩🤩🤩🤩🤩

  • @ha15224
    @ha15224 Рік тому

    thank you for this amazing visualization. Is it also possible to find roots of a multivariable vector fuction (f: R^n -> R^m)? The resources I found solved this by using the jacobi matrix such that x_{k+1} = x_{k} - J^{-1} f, where J^{-1} is the inverse or the pseudoinverse. Is this method referred to as the newton method for a vector function or is it a completely different method? Any help and reference to resources would be greatly appreciated.

  • @hyperduality2838
    @hyperduality2838 Рік тому

    Iterative optimization towards a target or goal is a syntropic process -- teleological.
    Convergence (syntropy) is dual to divergence (entropy) -- the 4th law of thermodynamics!
    Teleological physics (syntropy) is dual to non teleological physics (entropy).
    Synchronic lines/points are dual to enchronic lines/points.
    Points are dual to lines -- the principle of duality in geometry.
    "Always two there are" -- Yoda.
    Concepts are dual to percepts -- the mind duality of Immanuel Kant.
    Mathematicians create new concepts all the time from their perceptions or observations.

  • @igbana_ai
    @igbana_ai 2 роки тому

    The first statement you made explained half of my confusions 😩🤲

  • @lalonalel
    @lalonalel 3 роки тому

    can someone please tell me whats the algebra needed for getting the newton method from the taylor series stated in 6:58. thank you in advance

    • @VisuallyExplained
      @VisuallyExplained  3 роки тому +1

      I have explained this in another comment. Let me paste it here:
      "Sure. Consider the quadratic approximation f(x) ~ f(xk) + f'(xk) (x - xk) + f''(xk) (x-xk)^2 at the bottom of the screen at 7:06. To minimize the right hand side, we can take the derivative with respect to x and set it to zero (i.e., f'(xk) + f''(xk) (x - xk) = 0). If you solve for x, you get x = xk - 1 / f''(xk) * f'(xk)."
      Hope this answers your question.

    • @lalonalel
      @lalonalel 3 роки тому

      @@VisuallyExplained thank you it really helped me!

  • @NithinSaiSunkavalli
    @NithinSaiSunkavalli 9 місяців тому +1

    I didnt understand how you changed alpha to 1/f''(x) at 7:00

  • @himanshuprasad9579
    @himanshuprasad9579 Рік тому

    thankyou . very helpful

  • @totalynotfunnyguy6581
    @totalynotfunnyguy6581 Рік тому

    The first iteration gives me 1.25 not 1.7, is this a mistake on the video or am I doing something wrong?
    x_(k+1)= x-(1/(6(x)))(3(x^2)-3)
    Evaluating the with the 2
    x_(k+1)= 2-(1/(6(2)))(3(2^2)-3)=1.25

  • @knobberschrabser424
    @knobberschrabser424 2 роки тому

    You run into another problem with this method when you evaluate the Hessian at a point where it's not positive-definite. Then you're suddenly calculating a saddle point or even a maximum of the approximation which might lead you farther and farther away from the desired minimum of f(x).

  • @angelacy7977
    @angelacy7977 3 місяці тому

    Thank you so much!

  • @fatihburakakcay5026
    @fatihburakakcay5026 3 роки тому

    Again amazing

  • @geze2004
    @geze2004 3 роки тому

    This is great.
    What is the plotting tool you are using?

    • @VisuallyExplained
      @VisuallyExplained  3 роки тому +1

      Thank! For this video I used the excellent library manim: github.com/3b1b/manim

  • @shourabhpayal1198
    @shourabhpayal1198 3 роки тому

    Good job. I am subscribing !

  • @saturapt3229
    @saturapt3229 Рік тому

    Tyvm sir

  • @PapiJack
    @PapiJack Рік тому +1

    Great video!
    Please use a different backgouind music. It's all weird and out of tune :)

  • @yassine-sa
    @yassine-sa 3 роки тому

    I'm curious to know where are you from, my guesses are egypt and Morocco

  • @ivanstepanovftw
    @ivanstepanovftw Рік тому

    More!

  • @deutsch_lernen_mit_kindern
    @deutsch_lernen_mit_kindern 3 роки тому

    amazing

  • @pietheijn-vo1gt
    @pietheijn-vo1gt 2 роки тому

    Hello, great video. I am currently following a course on non-linear optimization and I would like to make videos like this for my own problems. I think you used manim for this video, is this code available somewhere that I can take a look? thanks

  • @preetunadkat8823
    @preetunadkat8823 3 роки тому +1

    i am sad
    you are tooo much underrated :(

    • @VisuallyExplained
      @VisuallyExplained  3 роки тому +1

      Thank you for the words of encouragement, I appreciate it!

  • @amanutkarsh724
    @amanutkarsh724 2 роки тому

    holy good.

  • @jackkrauser1763
    @jackkrauser1763 2 роки тому

    well done but u overskipped intermediate steps which made u lose me

    • @VisuallyExplained
      @VisuallyExplained  2 роки тому

      Thank you for the feedback! Would mind elaborating a little bit on which part of the video I lost you? It will help me a lot for future videos

  • @tsunningwah3471
    @tsunningwah3471 6 місяців тому

    增添

  • @tsunningwah3471
    @tsunningwah3471 6 місяців тому

    😢

  • @epistemocrat
    @epistemocrat Рік тому

    Newton's Method is now LESS clear then before watching this vid.

  • @brandondean961
    @brandondean961 2 роки тому

    Great content