Skip to contents

skip_bias zeroes the mask at the FIRST element of the row-major flattening, which for a matrix theta is entry [1, 1].

Usage

morie_geron_l1_regularization(theta, alpha, skip_bias = FALSE)

Arguments

theta

Coefficients.

alpha

Non-negative penalty.

skip_bias

Leave the first coefficient unpenalised.

Value

List with penalty, gradient, prox, n_zero, estimate, n.

Examples

morie_geron_l1_regularization(theta = 0.5, alpha = 0.5)
#> $penalty
#> [1] 0.25
#> 
#> $gradient
#> [1] 0.5
#> 
#> $prox
#> [1] 0
#> 
#> $n_zero
#> [1] 1
#> 
#> $estimate
#> [1] 0.25
#> 
#> $n
#> [1] 1
#> 
#> $method
#> [1] "L1 (Lasso) regularization penalty"
#>