Documente Academic
Documente Profesional
Documente Cultură
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
x2
5
5
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
0.6
0.6
0.6
0.4
0.4
0.4
0.2
0.2
0.2
0.2
0.2
0.2
0.4
0.4
0.4
0.6
0.6
0.6
0.8
0.8
1
0.5
0.5
1.5
1
0.5
0.8
0
0.5
1.5
1
0.5
0.5
1.5
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Hilbert space
Reproducing property
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Hilbert space
Definition (Inner product)
Let H be a vector space over R. A function h, iH : H H R
is an inner product on H if
1
2
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Hilbert space
Definition (Inner product)
Let H be a vector space over R. A function h, iH : H H R
is an inner product on H if
1
2
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Hilbert space
Definition (Inner product)
Let H be a vector space over R. A function h, iH : H H R
is an inner product on H if
1
2
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Hilbert space
Definition (Cauchy sequence)
A sequence {fn }
n=1 of elements of a normed vector space
(F, kkF ) is said to be a Cauchy (fundamental) sequence if for
every > 0, there exists N = N() N, such that for all n, m N,
kfn fm kF < .
Definition (Complete space)
A metric space F is said to be complete if every Cauchy sequence
{fn }
n=1 in F converges: it has a limit, and this limit is in F.
Complete + norm = Banach space
Complete + inner product = Hilbert space
Lecture 1: Introduction to RKHS
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Hilbert space
Definition (Cauchy sequence)
A sequence {fn }
n=1 of elements of a normed vector space
(F, kkF ) is said to be a Cauchy (fundamental) sequence if for
every > 0, there exists N = N() N, such that for all n, m N,
kfn fm kF < .
Definition (Complete space)
A metric space F is said to be complete if every Cauchy sequence
{fn }
n=1 in F converges: it has a limit, and this limit is in F.
Complete + norm = Banach space
Complete + inner product = Hilbert space
Lecture 1: Introduction to RKHS
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Kernel
Definition
Let X be a non-empty set. A function k : X X R is a kernel
if there exists an R-Hilbert space and a map : X H such that
x, x 0 X ,
k(x, x 0 ) := (x), (x 0 ) H .
Almost no conditions on X (eg, X itself doesnt need an inner
product, eg. documents).
A single kernel can correspond to several possible features. A
trivial example for X := R:
x/2
1 (x) = x
and
2 (x) =
x/ 2
Lecture 1: Introduction to RKHS
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
*
ha, Lbi =
=
X
j
and
H1
ha b, LiHS =
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Proof.
Special case:
hu v , a biHS = hu, aiH1 hb, v iH2 .
Apply this to
k1 (x, x 0 )k2 (y , y 0 ) = 1 (x), 1 (x 0 ) H 2 (y ), 2 (y 0 ) H
1
2
= 1 (x) 2 (y ), 1 (x 0 ) 2 (y 0 ) HS .
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
m
k(x, x 0 ) := x, x 0 + c
is a valid kernel.
To prove: expand into a sum (with non-negative scalars) of kernels
hx, x 0 i raised to integer powers. These individual terms are valid
kernels by the product rule.
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Infinite sequences
The kernels weve seen so far are dot products between finitely
many features. E.g.
>
sin(y ) y 3 log y
k(x, y ) = sin(x) x 3 log x
where (x) = sin(x) x 3 log x
Can a kernel be a dot product between infinitely many features?
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
Infinite sequences
Definition
The space `p of p-summable sequences is defined as all sequences
(ai )i1 for which
X
aip < .
i=1
i (x)i (x 0 )
i=1
Lecture 1: Introduction to RKHS
(1)
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
Infinite sequences
Definition
The space `p of p-summable sequences is defined as all sequences
(ai )i1 for which
X
aip < .
i=1
i (x)i (x 0 )
i=1
Lecture 1: Introduction to RKHS
(1)
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
v
u
uX
a2 ,
:= t
i
i=1
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
an z n
|z| < r , z R,
n=0
Define X to be the
k(x, x 0 ) = f
x, x 0
r,
n
an x, x 0 .
n=0
x, x 0
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
x, x 0 kxkkx 0 k < r ,
so the Taylor series converges. Define cj1 ...jd =
d
X
X
k(x, x 0 ) =
an
xj xj0
n=0
i =1 ji !
j=1
an
n=0
n!
Qd
X
j1 ...jd >0
cj1 ...jd
i=1
j1 . . . jd 0
j1 + . . . + jd = n
aj1 +...+jd cj1 ...jd
d
Y
i=1
d
Y
(xi , xi0 )ji
xiji
d
Y
(xi0 )ji .
i=1
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Gaussian kernel
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
2
2
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
ai aj k(xi , xj ) 0.
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
ai aj k(xi , xj ) =
n X
n
X
i=1 j=1
2
n
X
=
ai (xi )
0.
i=1
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
x2
5
5
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
x1
x1
x=
7 (x) = x2 ,
x2
x1 x2
with kernel
>
x1
y1
k(x, y ) = x2 y2
x1 x2
y1 y2
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
k(x, y ) = hk (, x) , k (, y )iH .
Note: the feature map of every point is in the feature space:
x X , k(, x) = (x) H,
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
(x) : x X
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
(x) : x X
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
X
X
f (x) =
f` exp(`x) =
f` (cos(`x) + sin(`x)) .
`=
l=
f (x) =
2f` cos(`x).
`=0
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Basis function
1
cos( x)
1.4
1.2
1
0.5
0
0.5
1
4
0.6
10
t
Fourier series coefficients
0.5
0.4
0.4
0.2
0.3
f (x)
0.8
0.2
0.1
0.2
4
0
10
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Basis function
1
cos( x)
1.4
1.2
1
0.5
0
0.5
1
4
0.6
10
t
Fourier series coefficients
0.5
0.4
0.4
0.2
0.3
f (x)
0.8
0.2
0.1
0.2
4
0
10
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Basis function
1
cos( x)
1.4
1.2
1
0.5
0
0.5
1
4
0.6
10
t
Fourier series coefficients
0.6
0.4
0.4
0.2
f (x)
0.8
0.2
0
0
0.2
4
0.2
10
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Basis function
1
cos( x)
1.4
1.2
1
0.5
0
0.5
1
4
0.6
10
t
Fourier series coefficients
0.6
0.4
0.4
0.2
f (x)
0.8
0.2
0
0
0.2
4
0.2
10
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Basis function
1
cos( x)
1.4
1.2
1
0.5
0
0.5
1
4
0.6
10
t
Fourier series coefficients
0.6
0.4
0.4
0.2
f (x)
0.8
0.2
0
0
0.2
4
0.2
10
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Basis function
1
cos( x)
1.4
1.2
1
0.5
0
0.5
1
4
0.6
10
t
Fourier series coefficients
0.6
0.4
0.4
0.2
f (x)
0.8
0.2
0
0
0.2
4
0.2
10
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Basis function
1
cos( x)
1.4
1.2
1
0.5
0
0.5
1
4
0.6
10
t
Fourier series coefficients
0.6
0.4
0.4
0.2
f (x)
0.8
0.2
0
0
0.2
4
0.2
10
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
k` exp (`x) ,
`=
,
,
k` =
exp
.
k(x) =
2
2 2
2
2
is the Jacobi theta function, close to Gaussian when 2 sufficiently narrower than
[, ].
Lecture 1: Introduction to RKHS
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Basis function
cos( x)
0.6
0.5
0.5
0
0.5
1
4
t
Fourier series coefficients
0.3
0.2
0.2
0.15
0.1
k (x)
0.4
0.1
4
0.1
0.05
0
10
10
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Basis function
cos( x)
0.6
0.5
0.5
0
0.5
1
4
t
Fourier series coefficients
0.3
0.2
0.2
0.15
0.1
k (x)
0.4
0.1
4
0.1
0.05
0
10
10
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Basis function
cos( x)
0.6
0.5
0.5
0
0.5
1
4
t
Fourier series coefficients
0.3
0.2
0.2
0.15
0.1
k (x)
0.4
0.1
4
0.1
0.05
0
10
10
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Basis function
cos( x)
0.6
0.5
0.5
0
0.5
1
4
t
Fourier series coefficients
0.3
0.2
0.2
0.15
0.1
k (x)
0.4
0.1
4
0.1
0.05
0
10
10
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
. . . f` /
i>
q
.
k` . . .
f g
q ` ` q .
`=
k`
k`
...
k` exp(`x) . . .
i>
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
. . . f` /
i>
q
.
k` . . .
f g
q ` ` q .
`=
k`
k`
...
i>
q
k` exp(`x) . . .
Lecture 1: Introduction to RKHS
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
X
f`
`=
q
k` exp(`x)
q
k`
f` exp(`x) = f (x),
`=
`=
`=
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
X
f`
`=
q
k` exp(`x)
q
k`
f` exp(`x) = f (x),
`=
`=
`=
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
X
f` f`
.
k`
l=
X
f (x) =
f` (cos(`x) + sin(`x)) .
`=
Enforces smoothness.
Question: is the top hat function in the Gaussian RKHS?
Lecture 1: Introduction to RKHS
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
X
f` f`
.
k`
l=
X
f (x) =
f` (cos(`x) + sin(`x)) .
`=
Enforces smoothness.
Question: is the top hat function in the Gaussian RKHS?
Lecture 1: Introduction to RKHS
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
X
f` f`
.
k`
l=
X
f (x) =
f` (cos(`x) + sin(`x)) .
`=
Enforces smoothness.
Question: is the top hat function in the Gaussian RKHS?
Lecture 1: Introduction to RKHS
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
f(x)
0.6
0.4
0.2
0
0.2
0.4
6
What do the features (x) look like (there are infinitely many
of them, they are not unique!)
What do these features have to do with smoothness?
Lecture 1: Introduction to RKHS
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
f(x)
0.6
0.4
0.2
0
0.2
0.4
6
What do the features (x) look like (there are infinitely many
of them, they are not unique!)
What do these features have to do with smoothness?
Lecture 1: Introduction to RKHS
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
f(x)
0.6
0.4
0.2
0
0.2
0.4
6
What do the features (x) look like (there are infinitely many
of them, they are not unique!)
What do these features have to do with smoothness?
Lecture 1: Introduction to RKHS
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
L2 () L2 ()
f 7 f (x 0 )k(x, x 0 )d (x 0 )
X
1 i =j
Tk f =
j hf , ej i ej
ei (x)ej (x)d (x) =
0 i 6= j.
X
j
Can we use the {i , ei } to construct a feature space for H?
Lecture 1: Introduction to RKHS
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
Theorem
(Mercer) Let X be a compact metric space, k be a continous
kernel, and be a finite Borel measure with supp{} = X . Then
the convergence of
X
k(x, y ) =
j ej (x)ej (y )
j
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
is an RKHS
with
kernel k. The feature map is
i ei (x) . . . .
(x) = . . .
Given two functions in the RKHS
X p
X p
f :=
ai i ei ,
g :=
bi i ei ,
i
ai bi
Lecture 1: Introduction to RKHS
(2)
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
i ei (x) is
`2
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Proof:
Second part:
The reproducing property holds: using the inner product definition,
X p
i ei (x) = f (x),
hf , k(x, )iH =
fi
i
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
bk
b<1
k(x, x ) =
i ei (x)ei (x 0 )
i=1
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
m
m
hp
i
X
X
X
X
j ej (xi )ej (x) =
fj
i k(xi , x) =
i
f (x) :=
j ej (x)
i=1
where fj =
j=1
i=1
Pm
i=1 i
j=1
j ej (xi ).
1
0.8
f(x)
0.6
0.4
0.2
0
0.2
0.4
6
x
Lecture 1: Introduction to RKHS
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
(3)
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
f , g H.
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
kk(, x)kH kf kH
1/2
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Moore-Aronszajn Theorem
Theorem (Moore-Aronszajn)
Let k : X X R be positive definite. There is a unique RKHS
H RX with reproducing kernel k.
Recall feature map is not unique (as we saw earlier): only kernel is.
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Main message #1
Reproducing kernels
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
Main message #2
Small RKHS norm results in smooth functions.
E.g. kernel ridge regression with Gaussian kernel:
n
X
f = arg min
f H
i=1
!
2
=0.1, =0.6
=10, =0.6
0.5
0.5
=1e07, =0.6
1.5
1
0.5
0.5
0.5
1
0.5
0.5
1.5
1
0.5
0.5
0.5
1.5
1
0.5
0.5
1.5
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
f(x)
0.6
0.4
0.2
0
0.2
0.4
6
x
Lecture 1: Introduction to RKHS
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Pn
i=1 i k(, xi )
n X
m
X
i j k(xi , yj ),
i=1 j=1
and g =
Pm
j=1 j k(, yj ),
is a valid
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Pn
i=1 i k(, xi )
n X
m
X
i j k(xi , yj ),
i=1 j=1
and g =
Pm
j=1 j k(, yj ),
is a valid
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
3
4
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
3
4
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
3
4
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
3
4
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
3
4
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
What is a kernel?
Constructing new kernels
Positive definite functions
Reproducing kernel Hilbert space
3
4
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
0.6
0.6
0.6
0.4
0.4
0.4
0.2
0.2
0.2
0.2
0.2
0.2
0.4
0.4
0.4
0.6
0.6
0.6
0.8
0.8
0.8
1
0.5
0.5
1.5
1
0.5
0.5
1.5
1
0.5
0.5
1.5
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
x1 . . . xn
RDn
y :=
y1 . . . yn
>
f Rd
n
X
(yi xi> f )2 + kf k2
i=1
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
x1 . . . xn
RDn
y :=
y1 . . . yn
a = arg min
f Rd
i=1
Solution is:
f =
XX > + I
1
Xy ,
>
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
f H
n
X
i=1
!
(yi hf , (xi )iH )2 + kf k2H
p (x) =
x
x2
..
.
x`
s (x) =
sin x
cos x
sin 2x
..
.
cos `x
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
n
X
i (xi ) =
i=1
n
X
i=1
i k(xi , ).
1
0.8
f(x)
0.6
0.4
0.2
0
0.2
0.4
6
x
Lecture 1: Introduction to RKHS
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
Representer theorem
Given a set of paired observations (x1 , y1 ), . . . (xn , yn ) (regression or
classification).
Find the function f in the RKHS H which satisfies
J(f ) = min J(f ),
f H
where
J(f ) = Ly (f (x1 ), . . . , f (xn )) + kf k2H ,
(4)
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
Representer theorem
n
X
i=1
i k(xi , ).
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
where fs =
Regularizer:
i=1 i k(xi , ).
kf k2H kfs k2H ,
(5)
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
n
X
i (xi ).
i=1
Then
n
X
i=1
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
Reminder: smoothness
What does kakH have to do with smoothing?
Example 1: The Fourier series representation on torus T:
f (x) =
fl exp(lx),
l=
and
hf , g iH =
X
fl gl
.
kl
l=
Thus,
kf k2H = hf , f iH =
2
fl
l=
kl
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
Reminder: smoothness
What does kakH have to do with smoothing?
Example 2: The Gaussian kernel on R. Recall
f (x) =
X
p
ai i ei (x),
i=1
kf k2H =
ai2 .
i=1
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
= arg min
f H
n
X
i=1
!
2
k2H
How do we choose
The regularization parameter ?
The kernel parameter: for Gaussian kernel, in
kx y k2
k(x, y ) = exp
.
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
Choice of
=0.1, =0.6
1
0.5
0.5
1
0.5
0.5
1.5
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
Choice of
=0.1, =0.6
=10, =0.6
0.5
0.5
=1e07, =0.6
1.5
1
0.5
0.5
0.5
1
0.5
0.5
1.5
1
0.5
0.5
0.5
1.5
1
0.5
0.5
1.5
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
Choice of
=0.1, =0.6
1
0.5
0.5
1
0.5
0.5
1.5
Feature space
Basics of reproducing kernel Hilbert spaces
Kernel Ridge Regression
Choice of
=0.1, =0.6
=0.1, =2
=0.1, =0.1
0.5
0.5
0.5
0.5
0.5
0.5
1
0.5
0.5
1.5
1
0.5
0.5
1.5
1
0.5
0.5
1.5