Skip to contents

min_i y_i f(x_i) / sum_k |alpha_k| (ESL eq 16.7).

Usage

morie_esl_l1_margin(y, fitted, coefficients)

Arguments

y

Labels in -1, +1.

fitted

f(x_i).

coefficients

alpha_k.

Value

Named list: margin, l1_norm, argmin (1-based).

References

Hastie, Tibshirani & Friedman (2009), sec. 16.2.2.

Examples

morie_esl_l1_margin(c(1, -1, 1), c(0.8, -0.5, 0.2), c(0.5, 0.3))$margin
#> [1] 0.25