Gradient descent: Difference between revisions
no edit summary
No edit summary |
No edit summary |
||
Line 380:
load 'math/calculus'
coinsert 'jcalculus'
NB. initial guess
go=: 0.1 _1
NB. function
func=: monad define
Line 388 ⟶ 391:
((1-xp)*(1-xp) * ] ^-(yp)^2) + yp*(yp+2)* ] ^ _2 * xp^2 NB. evaluates from right to left without precedence
)
NB. gradient descent
shortygd =: monad define
Line 401 ⟶ 406:
{{out}}
<pre>
0.107627 _1.22326
</pre>
|