
AdaGrad update, theta-first signature (Geron Ch 11, morie.fn grada2)
Source:R/geron_ml_native.R
morie_geron_adagrad_update.RdSame kernel as morie_geron_adagrad(), with grada2's positive-step
convention: theta_new = theta - step, step = effective_lr * g.
Examples
morie_geron_adagrad_update(c(1, 2), c(2, -1), c(0, 3), 0.1, eps = 1e-10)
#> $theta_new
#> [1] 0.90 2.05
#>
#> $s_new
#> [1] 4 4
#>
#> $effective_lr
#> [1] 0.05 0.05
#>
#> $step
#> [1] 0.10 -0.05
#>
#> $step_norm
#> [1] 0.1118034
#>
#> $estimate
#> [1] 0.1118034
#>
#> $n
#> [1] 2
#>
#> $method
#> [1] "AdaGrad parameter update"
#>