Skip to contents

With eps = a1 (h (log(a2 N / h) + 1) - log(eta / 4)) / N, the classification bound err + eps / 2 (1 + sqrt(1 + 4 err / eps)) and the regression bound err / (1 - c sqrt(eps))_+ (ESL eq 7.46), plus the practical regression bound of eq 7.47. Defaults a1 = 4, a2 = 2 (classification) or a1 = a2 = 1 (regression).

Usage

morie_esl_vc_bound(
  err,
  h,
  N,
  eta = 0.05,
  task = c("classification", "regression"),
  a1 = NULL,
  a2 = NULL,
  c = 1
)

Arguments

err

Training error.

h

VC dimension.

N

Sample size.

eta

One minus the confidence.

task

"classification" or "regression".

a1, a2, c

Constants.

Value

Named list: epsilon, bound, and for regression practical_bound.

References

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

Examples

morie_esl_vc_bound(0.1, 5, 100)$bound
#> [1] 1.305396