Skip to contents

Same kernel as morie_geron_adagrad(), with grada2's positive-step convention: theta_new = theta - step, step = effective_lr * g.

Usage

morie_geron_adagrad_update(theta, grad, s, eta, eps = 1e-10)

Arguments

theta, grad, s

Equal-length numeric vectors.

eta

Positive learning rate.

eps

Non-negative floor.

Value

List with theta_new, s_new, effective_lr, step, step_norm.

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"
#>