Top Banner
Two new approaches to smoothing over complex regions David Lawrence Miller Mathematical Sciences University of Bath useR! 2009, Rennes
24

Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

Aug 27, 2018

Download

Documents

trinhthuan
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

Two new approaches to smoothing overcomplex regions

David Lawrence Miller

Mathematical SciencesUniversity of Bath

useR! 2009, Rennes

Page 2: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

Outline

Smoothing over complex regionsIntroSolutions

Schwarz-Christoffel transform

Multidimensional ScalingDetailsSimulation Results

Conclusions

Page 3: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

Outline

Smoothing over complex regionsIntroSolutions

Schwarz-Christoffel transform

Multidimensional ScalingDetailsSimulation Results

Conclusions

Page 4: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

Smoothing in 2 dimensions

I Have some geographical region and wish to find outsomething about the biological population in it.

I Response is eg. animal distribution, wish to predict basedon (x , y) and other covariates eg. habitat, size, sex, etc.

I This problem is relatively easy if the domain is simple.

Page 5: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

Smoothing over complex domains

I Smoothing of complex domains makes this a lot moredifficult.

I Problem of leakage.I Euclidean distance doesn’t always make sense.I Models need to incorporate information about the intrinsic

structure of the domain.

−4

−3.5

−3

−2.

75

−2.

5

−2

−1.

75

−1.

5

−1

−0.

75

−0.

5

0

0.5

0.75

1

1.25

1.5

1.75

2

2.25

2.5

2.75

3

3.25

3.5

3.75

4

−4 −3.75

−3.25 −3

−2.75

−2.5

−2.25

−2

−1.75

−1.25

−1

−0.75

−0.5 −0.25 0

0.25

0.5 0.75 0.75 1 1.25

1.5

1.75 2 2.25

2.5

2.7

5

3

3.25

3.75

4

(modified) Ramsay test function Thin plate spline fit

Page 6: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

Smoothing with penalties

I Objective function takes the form:

n∑i=1

(zi − f (xi , yi ; θ))2 + λ

∫Ω

Pf (x , y ; θ)dΩ

I f is the function you want to estimate, made up of somecombination of basis functions.

I P is some squared derivative penalty operator, usuallyP = ( ∂2

∂x2 + ∂2

∂y2 )2.

I This can be generalized to an additive model or GAM.

Page 7: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

Possible solutions to leakage problems

I FELSPLINE (Ramsay, (2002).)I Domain morphing (Eilers, (2006).)I Within-area distance (Wang and Ranalli, (2007).)I Soap film smoothers (Wood et al, (2008).)

Page 8: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

Why morph the domain?

I Takes into account within-area distance.I Gives a known domain that is easier to smooth over.I Potentially less computationally intensive.

However:

I Don’t maintain isotropy - distribution of points odd.I Not clear what this does to the smoothness penalty.

−2 0 2

−2

−1

0

1

2

3

4

2

34

5

6

7

8

9

10

11

12

13

14

1516

17

18

1

−4 −2 0 2 4

0

1

2

3

4

5

6

72

34 5

67

89

101112

13

14151617

18 1

Page 9: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

Outline

Smoothing over complex regionsIntroSolutions

Schwarz-Christoffel transform

Multidimensional ScalingDetailsSimulation Results

Conclusions

Page 10: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

The Schwarz-Christoffel transform

I Take a polygon in some domain W and morph it to a newdomain W ∗.

I We then have a function for the mapping, ϕ(x , y).I ϕ(x , y) is a conformal mapping.I Do this by starting at the new domain and working back to

the polygon.I Can draw a polygonal bounding box around some arbitrary

shape.

φ(x)

φ (x)-1

WW*

Page 11: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

The mappingI Use a bounding box around the horseshoe.

1

4

8

5

2

3

6

7

I Morphing the horseshoe shape still gives a slightly odddomain however, we are still doing better than before.

Page 12: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

Horseshoe plots

Truth

−4 −3.

75

−3.5

−3.25

−3

−2.

75

−2.5

−2.25

−2

−1.

75

−1.5

−1.25

−1

−0.

75

−0.5

−0.25 0

0.25

0.5

0.75

1

1.25

1.5

1.75

2

2.25

2.5

2.75

3

3.25

3.5

3.75

4

SC+PS

−4

−3.75

−3.5 −3.

25 −3

−2.

75 −

2.5

−2

−1.

75

−1.5

−1.25

−1

−0.

75

−0.5

−0.25 0

0.25

0.5 0.75

1

1.2

5 1

.5

1.7

5

2

2.25

2.5

2.75 3

3.25 3.5

3.7

5 4

SC+TPRS

−4

−3.75

−3.5

−3.

25 −

3

−2.

75

−2.

5

−2

−1.75

−1.

5 −1.25

−1

−0.

75

−0.

5

0

0.25

0.5

0.75

1 1.2

5

1.5

1.7

5 2

2.25

2.5 2.75 3 3.25

3.5

3.7

5 4

Soap film

−4

−3.75 −3.5

−3.25

−3 −

2.75

−2.5

−2

−1.75

−1.5

−1.25

−1

−0.

75

−0.5

0

0.25

0.5

0.75

1

1.2

5 1

.5

1.7

5 2

2.25

2.5

2.75 3 3.25

3.5

3.75 4

Page 13: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

Problems

I Small:I Implementation is Matlab+R. (YUCK!)

I BIG:I Weird artifacts.I Morphing of domain appears to cause features to be

smoothed over.I Arbitrary selection of vertices.

Page 14: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

A more realistic domain

0.0 0.4 0.8

0.0

0.4

0.8

truth

x

y

0.0 0.4 0.8

0.0

0.4

0.8

sc+tprs prediction

x

y

0.0 0.4 0.8

0.0

0.4

0.8

tprs prediction

x

y

0.0 0.4 0.8

0.0

0.4

0.8

soap prediction

x

y

Page 15: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

A more realistic domain - what’s happening?

I Weird “crowding” effect.I Different with each vertex choice. All bad.

Page 16: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

Outline

Smoothing over complex regionsIntroSolutions

Schwarz-Christoffel transform

Multidimensional ScalingDetailsSimulation Results

Conclusions

Page 17: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

Multidimensional scaling and within-area distances

I Idea: use MDS to to arrange points in the domainaccording to their “within-domain distance.”

Scheme:

I First need to find the within-area distances.I Perform MDS on the matrix of within-area distances.I Smooth over the new points.

Page 18: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

Multidimensional scaling refresher

I Double centre matrix of between point distances, D,(subtract row and column means) then find DDT .

I Finds a configuration of points such that Euclideandistance between points in new arrangement isapproximately the same as distance in the domain.

I Already implemented in R by cmdscale.

−3 −2 −1 0 1 2 3

−3

−2

−1

01

23

x

y

−4 −2 0 2 4 6

−1

01

23

newcoords[,1]

new

coor

ds[,2

]

Page 19: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

Finding within-area distancesI Use a new algorithm to find the within area distances.

1 2 3 4 5 6

01

23

4

x

y

1 2 3 4 5 6

01

23

4

x

y

1 2 3 4 5 6

01

23

4

x

y

1 2 3 4 5 6

01

23

4

x

y

Page 20: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

Ramsay simulations

−1 0 1 2 3

−1.0

−0.5

0.0

0.5

1.0

truth

x

y

−1 0 1 2 3

−1.0

−0.5

0.0

0.5

1.0

MDS

x

y

−1 0 1 2 3

−1.0

−0.5

0.0

0.5

1.0

tprs

x

y

−1 0 1 2 3

−1.0

−0.5

0.0

0.5

1.0

soap

x

y

Page 21: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

A different domain

−3 −2 −1 0 1 2 3

−2

−1

0

1

2

truth

x

y

−3 −2 −1 0 1 2 3

−2

−1

0

1

2

mds

x

y

−3 −2 −1 0 1 2 3

−2

−1

0

1

2

tprs

x

y

−3 −2 −1 0 1 2 3

−2

−1

0

1

2

soap

x

y

Page 22: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

Outline

Smoothing over complex regionsIntroSolutions

Schwarz-Christoffel transform

Multidimensional ScalingDetailsSimulation Results

Conclusions

Page 23: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

Conclusions

I Seems that the S-C transform does not have much utility.I MDS shows more promise, easier to transfer to higher

dimensions.I MDS does not impose strict boundary conditions so

leakage still possible.I Pushing the data into more dimensions might be useful to

separate points.I After initial “transform” calculation, both methods only use

the same computational time as a thin plate regressionspline. (Soap is expensive.)

Page 24: Two new approaches to smoothing over complex regions · Outline Smoothing over complex regions Intro Solutions Schwarz-Christoffel transform Multidimensional Scaling Details Simulation

References

I S.N. Wood, M.V. Bravington, and S.L. Hedley. Soap filmsmoothing. JRSSB, 2008

I H. Wang and M.G. Ranalli. Low-rank smoothing splines oncomplicated domains. Biometrics, 2007

I T.A. Driscoll and L.N. Trefethen. Schwarz-ChristoffelMapping. Cambridge, 2002

I T. Ramsay. Spline smoothing over difficult regions. JRSSB,2001

I P.H.C. Eilers. P-spline smoothing on difficult domains.University of Munich seminar, 2006

I J.C. Gower. Adding a point to vector diagrams inmultivariate analysis. Biometrika, 1968.

Slides available at http://people.bath.ac.uk/dlm27