Docsity

Kernel Smoothing III: Lecture 14 - Gaussian Kernel Smoothing and Heat Equation, Study notes of Statistics

Toggle sidebar
bg1
Stat 992: Lecture 14
Kernel Smoothing III.
Moo K. Chung [email protected]
February 20, 2004
Theorem. If Z∼N(0,1),
EZ2m= 1 ·3·5· ··(2m−1).
Proof. (Prof. Tsui) For density f(x) = 1
√2πe−x2/2,
f0(x) = −xf(x). From integration by parts
Zx2mf(x)dx =−Z∞
−∞
x2m−1f0(x)dx
= (2m−1) Zx2(m−1)f(x)dx.
Hence we have recurrence
EZ2m= (2m−1)EZ2(m−1).
Solve this with initial condition EZ0= 1.¤
Problem 6. Is the variance of signal smaller after
smoothing? Come up with interesting inequality involv-
ing variances. Note that Varˆµ(t) = R(t, t).
Partial solution. For stochastic signal Y(x) = µ(x) +
²(x). We showed that the covariance function of Kσ∗Y
is
R(x, y) = Z Z Kσ(x−x0)Kσ(y−y0)RY(x0, y0)dx0dy0
=Kσ∗xKσ∗yRY(x, y)
where ∗xand ∗yindicate convolution with respect to ar-
gument xand yrespectively. Let x=yand we have
Var[Kσ∗Y(x)] = K√2σ∗VarY(x).
Consider heat equation
1
σ
∂f
∂σ = ∆f
for nonnegative function f≤0. Suppose x0is the point
that gives local minimum of f(x, σ)at fixed σ. Then it
is trivial to show that ∆f(x0, σ)<0. Hence ∂ f
∂σ <0.
Hence solution to the heat equation is decreasing at x0
with increasing σ. Since the solution of heat equation is
also a Gaussian kernel smoother,
K√2σ∗VarY(x0)<VarY(x0)
where x0is now a point that gives local maximum of
VarY(x).
Problem 8. Using the Fourier transform and its in-
verse transform, implement 2D Gaussian kernel smooth-
ing in computer. In MATLAB, you can perform finite
fourier transform.
Solution. (Partial solution given by Shijie Tang) We de-
fine Fourier integral transform Fsuch that
Ff(w) = ZRn
f(x)e−2πihw,xidx
and its inverse
F−1f(x) = ZRn
f(w)e2πihx,widw.
See Folland’s Real Analysis for details. For f , g ∈
L(R),F−1(Ff) = F(F−1f) = falmost everywhere.
Then it can be shown that
F(f∗g) = Ff· Fg.
Hence
Kσ∗Y=F−1[FKσ· FY].(1)
Gaussian kernel of the form K(x) = e−πkxk2is in-
variant under the Fourier transform. Then Kσ(x) =
1
(2π)n/2σnK¡x
√2πσ ¢. It can be shown that for an invert-
ible linear transform T
F(f◦T) = |det T|−1Ff◦T−1.
So
FKσ(w) = K(√2πσw)(2)
In MATLAB, we implement Gaussian kernel smoothing
using discrete fourier transform FFT2 and its inverse
IFFT2 which are implemented as the Riemann sum of
the integral operators. There is a way to speed things up
using the fast fourier transform.

Partial preview of the text

Download Kernel Smoothing III: Lecture 14 - Gaussian Kernel Smoothing and Heat Equation and more Study notes Statistics in PDF only on Docsity!

Stat 992: Lecture 14

Kernel Smoothing III.

Moo K. Chung [email protected]

February 20, 2004

Theorem. If Z ∼ N (0, 1),

EZ^2 m^ = 1 · 3 · 5 · · · (2m − 1).

Proof. (Prof. Tsui) For density f (x) = √^12 π e−x^2 /^2 ,

f ′(x) = −xf (x). From integration by parts ∫ x^2 mf (x) dx = −

−∞

x^2 m−^1 f ′(x) dx

= (2m − 1)

x2(m−1)f (x) dx.

Hence we have recurrence

EZ^2 m^ = (2m − 1)EZ2(m−1).

Solve this with initial condition EZ^0 = 1. § Problem 6. Is the variance of signal smaller after smoothing? Come up with interesting inequality involv- ing variances. Note that Varμˆ(t) = R(t, t). Partial solution. For stochastic signal Y (x) = μ(x) + ≤(x). We showed that the covariance function of Kσ ∗ Y is

R(x, y) =

Kσ(x − x′)Kσ(y − y′)RY (x′, y′) dx′dy′ = Kσ ∗x Kσ ∗y RY (x, y)

where ∗x and ∗y indicate convolution with respect to ar- gument x and y respectively. Let x = y and we have

Var[Kσ ∗ Y (x)] = K√ 2 σ ∗ VarY (x).

Consider heat equation

1 σ

∂f ∂σ = ∆f

for nonnegative function f ≤ 0. Suppose x 0 is the point that gives local minimum of f (x, σ) at fixed σ. Then it is trivial to show that ∆f (x 0 , σ) < 0. Hence ∂f∂σ < 0. Hence solution to the heat equation is decreasing at x 0 with increasing σ. Since the solution of heat equation is also a Gaussian kernel smoother,

K√ 2 σ ∗ VarY (x 0 ) < VarY (x 0 )

where x 0 is now a point that gives local maximum of VarY (x). Problem 8. Using the Fourier transform and its in- verse transform, implement 2D Gaussian kernel smooth- ing in computer. In MATLAB, you can perform finite fourier transform. Solution. (Partial solution given by Shijie Tang) We de- fine Fourier integral transform F such that

Ff (w) =

Rn

f (x)e−^2 πi〈w,x〉^ dx

and its inverse

F−^1 f (x) =

Rn

f (w)e^2 πi〈x,w〉^ dw.

See Folland’s Real Analysis for details. For f, g ∈ L(R), F−^1 (Ff ) = F(F−^1 f ) = f almost everywhere. Then it can be shown that

F(f ∗ g) = Ff · Fg.

Hence

Kσ ∗ Y = F−^1 [FKσ · FY ]. (1)

Gaussian kernel of the form K(x) = e−π‖x‖ 2 is in- variant under the Fourier transform. Then Kσ(x) = 1 (2π)n/^2 σn^ K

( (^) x √ 2 πσ

. It can be shown that for an invert- ible linear transform T

F(f ◦ T ) = | det T |−^1 Ff ◦ T −^1.

So

FKσ(w) = K(

2 πσw) (2)

In MATLAB, we implement Gaussian kernel smoothing using discrete fourier transform FFT2 and its inverse IFFT2 which are implemented as the Riemann sum of the integral operators. There is a way to speed things up using the fast fourier transform.