Skip to contents

L2 (ridge) regularization penalty (Geron Ch 11, morie.fn hml2r)

Usage

morie_geron_l2_regularization(theta, alpha, skip_bias = FALSE, eta = NULL)

Arguments

theta

Parameters.

alpha

Strength.

skip_bias

Exclude theta[1].

eta

Optional learning rate.

Value

List with penalty, gradient, l2_norm, shrink_factor, estimate, n, method.

Examples

morie_geron_l2_regularization(theta = 0.5, alpha = 0.5)
#> $penalty
#> [1] 0.0625
#> 
#> $gradient
#> [1] 0.25
#> 
#> $l2_norm
#> [1] 0.5
#> 
#> $shrink_factor
#> NULL
#> 
#> $estimate
#> [1] 0.0625
#> 
#> $n
#> [1] 1
#> 
#> $method
#> [1] "L2 (ridge) regularization penalty"
#>