#gradient descent ??

5 messages · Page 1 of 1 (latest)

rancid cliff
#

i am trying to implement a gradient descent algorithm to find possible solutions of an equation
example equation: 2x^2 + 5x + 2 = 0

the minimum of this function is at x=-1.25 which is not the actual solution
in order to get around this, i decided to square the equation
(2x^2 + 5x + 2)^2 = 0

now, the actual solutions have a slope of 0, but the x=1.25 has a slope of 0 as well
how do i get around this

spring geyserBOT
coarse lichen
#

Why do you think slope of x=1.25 is 0?

#

It's an x^2 curve... there's only one place slope =0 (at x=-1.25 as the min)

stable pier
#

([f(-1.25)]^2)' = 0, i think you mistyped.

Ok, so you're not convex

if you use newton's method and guess -1.25, you'll divide by ZERO

Just don't do that. You can have whatever initial guess you want.