CPSC540: Regularization, Regularization, Nonlinear Prediction and Generalization
CPSC540: Regularization, Regularization, Nonlinear Prediction and Generalization
CPSC540: Regularization, Regularization, Nonlinear Prediction and Generalization
Regularization,
nonlinear prediction
and generalization
Nando de Freitas
Janurary, 2013
University of British Columbia
Outline of the lecture
This lecture will teach you how to fit nonlinear functions by using
bases functions and how to control model complexity. The goal is for
you to:
θ1
θ2
θ8
y(x) = φ(x)θ + ǫ
J(θ) = ( y − Φ θ ) Τ ( y − Φ θ ) + δ2 θ Τ θ
y y y
small δ medium δ large δ
x x x
Kernel regression and RBFs
We can use kernels or radial basis functions (RBFs) as features:
1
(− λ x−µi 2 )
φ(x) = [κ(x, µ1 , λ), . . . , κ(x, µd , λ)], e.g. κ(x, µi , λ) = e
Too small λ
Right λ
Too large λ
The big question is how do we
choose the regularization coefficient,
the width of the kernels or the
polynomial order?
One Solution: cross-validation
K-fold crossvalidation
The idea is simple: we split the training data into K folds; then, for each
fold k ∈ {1, . . . , K}, we train on all the folds but the k’th, and test on the
k’th, in a round-robin fashion.