compose_regularization: Compose an existing loss function with regularization

Description Usage Arguments Author(s) Examples

Description

Given an arbitrary loss function, compose it with elastic net regularization

Usage

1
compose_regularization(loss, elastic_net_parameter, lambda)

Arguments

loss

the loss function to be built on

elastic_net_parameter

the weighting of L1 regularization in the elastic net. L2 will be weighted as 1 - elastic_net_parameter

lambda

parameter controlling how much regularization contributes to the overall loss

Author(s)

kholub

Examples

1
2
lasso_ls <- compose_regularization(LS_LOSS, 1, 1e-5)
ridge_ls <- compose_regularization(LS_LOSS, 0, 1e-5)

holub008/gdlm documentation built on May 13, 2019, 6:14 p.m.