-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgp.html
1037 lines (1030 loc) · 41 KB
/
gp.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Discontinuous Regression Surface Fitting</title>
<meta name="description" content="Discontinuous Regression Surface Fitting">
<meta name="author" content="Riddhiman Saha">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="dist/theme/blood.css" id="theme">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="plugin/highlight/monokai.css" id="highlight-theme">
<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> -->
<link href="css/font-awesome-5.1.0/css/all.css" rel="stylesheet" />
<link href="css/font-awesome-5.1.0/css/v4-shims.css" rel="stylesheet" />
</head>
<body>
<div class="reveal">
<div class="slides">
<section id="title">
<img data-src="media/movieblack.gif">
<h3 style="color: #f82249;">Discontinuous Regression Surface Fitting</h3>
<p>Group Project</p>
<p><strong>Statistics Comprehensive</strong></p>
</section>
<section id="introduction" style="text-align: left; font-size: 40px;">
<section>
<h3>Introduction</h3>
<ul>
<li class="fragment fade-up">
What are we going to do?
</li>
<li style="list-style-type: none;" class="fragment fade-in">
We have a collection of points in $\mathbb{R}^2$ arranged in a grid inside $[0,1)\times[0,1)$, and also the associated $z$ values for each point. We want to perform “smoothing” for the given data, and predict $z$ value for some point $(x_0,y_0)\in[0,1)\times[0,1)$.<br>Note that, the underlying function 'may have jumps at some locations, but mostly smooth'.
<!-- So we can think of the following:<br>
$$z_{ij}=f(x_i, y_j)+\epsilon_{ij}; i,j=1,\ldots,n;$$where $x_i=y_i=\frac{i-1}{n}, i=1,\ldots,n$ & $\epsilon_{ij}$ random error<br>
Given $(x_0,y_0) \in [0,1)\times[0,1)$, we want to predict $f(x_0, y_0)$ -->
</li>
<li class="fragment fade-up">
Why are we interested?
</li>
<li style="list-style-type: none;" class="fragment fade-in">
Not just another new type of regression. It has got many practical applications. For example: (contd.)
</li>
</ul>
</section>
<section>
<ul>
<li>
Image Denoising:
<br>
<div style="text-align: center;">
<div style="display: inline; vertical-align: middle;">
<img data-src="media/noise.jpeg" width="20%">
</div>
<div style="display: inline;">
$\Longrightarrow$
</div>
<div style="display: inline; vertical-align: middle;">
<img data-src="media/original.jpeg" width="20%">
</div>
</div>
</li>
<li class="fragment" data-fragment-index="1">
<span class="fragment" data-fragment-index="1">Working with Elevation data </span><span class="fragment" data-fragment-index="2"> or Temparature Data:</span>
<br>
<div style="text-align: center;">
<img data-src="media/elevation.png" style="height: 30vh; border-right: 3px solid white; padding-right: 15px" class="fragment" data-fragment-index="1">
<img data-src="media/temparature.jpg" style="height: 30vh; padding-left: 10px" class="fragment" data-fragment-index="2">
</div>
</li>
</ul>
</section>
<section>
<h3>
We are going to discuss:
</h3>
<ol>
<li>Defining the problem</li>
<li>Describing the conventional method</li>
<li>Description of the proposed method considering jumps</li>
<li>Results from simulation study</li>
<li>One practical example</li>
</ol>
</section>
</section>
<section style="text-align: left;">
<section>
<h3>
Problem Statement
</h3>
$$f:[0,1)\times[0,1)\rightarrow\mathbb{R}$$
We are given data-points in an $n\times n$ grid: $\{(x_i,y_j)|i,j=1,\ldots,n\}$, where $x_i=y_i=\frac{i-1}{n}$
$$z_{ij}=f(x_i,y_j)+\epsilon_{ij}\text{ , } \epsilon_{ij}\text{ i.i.d. error}$$
Given $(x_0,y_0)\in[0,1)\times[0,1)$, want to predict $f(x_0,y_0)$
</section>
</section>
<section style="text-align: left; font-size: 34px;">
<section>
<h4>Conventional Method : Kernel Smoothing (2-D)</h4>
<div class="r-stack">
<div class="fragment fade-out" data-fragment-index="0">
We can do nonparametric regression, with bivariate kernel.
<ul>
<li>
Any <strong>bivariate density</strong> function can be used.
</li>
<li>
Given any univariate kernel $f(x)$, we can define $K(x,y)=f(x)f(y)$
</li>
<li>
For example, univariate <strong>triangular</strong> kernel is given by, $(1-|x|)I_{\{|x|\leq 1\}}$. So we can define, $K(x,y)=(1-|x|)(1-|y|)I_{\{|x|\leq 1, |y|\leq 1\}}$
</li>
</ul>
</div>
<div class="fragment current-visible" data-fragment-index="0" style="text-align: center;">
<p>Plot of Triangular Kernel</p>
<iframe data-src="media/triangular.html" scrolling="no" height="500px" width="550px" frameborder="0" style="display: block; margin: 0 auto;"></iframe>
</div>
<div class="fragment fade-out" data-fragment-index="3" style="font-size: 30px;">
<div class="fragment" data-fragment-index="1">
To predict the response variable at $(x_0, y_0)$, we can use <strong>Local polynomial smoothing</strong>.
For local polynomial of $0$-degree, we minimize,
$$\sum_{i=1}^n\sum_{j=1}^n(z_{ij}-\alpha)^2 K\left(\frac{x_i-x_0}{h},\frac{y_j-y_0}{h}\right)$$
where, $h$ is the <strong>smoothing bandwidth</strong>.
</div>
<div class="fragment" data-fragment-index="2">
<br>
The estimated value at $(x_0,y_0)$ is given by,
$$\hat{f_0}(x_0, y_0)=\hat{\alpha}=\frac{\sum_{i=1}^n\sum_{j=1}^n w_{ij}z_{ij}}{\sum_{i=1}^n\sum_{j=1}^n w_{ij}}$$
where, $w_{ij}=K\left(\frac{x_i-x_0}{h}, \frac{y_j-y_0}{h}\right)$
</div>
</div>
<div class="fragment" data-fragment-index="3" style="font-size: 26px;">
<div>
For local polynomial of $1$-degree, we minimize,
$$\sum_{i=1}^n\sum_{j=1}^n(z_{ij}-\alpha-\beta_1(x_i-x_0)-\beta_2(y_j-y_0))^2 K\left(\frac{x_i-x_0}{h},\frac{y_j-y_0}{h}\right)$$
</div>
<br>
<div class="fragment" data-fragment-index="4">
The estimated value at $(x_0,y_0)$ is given by,
<div style="font-size: 20px;">
$$\hat{f_1}(x_0, y_0)=\hat{\alpha}\text{, where}, [\hat{\alpha}, \hat{\beta_1}, \hat{\beta_2}]^T=\\
\begin{bmatrix}
\sum\sum w_{ij} & \sum\sum w_{ij}(x_i-x_0) & \sum\sum w_{ij}(y_j-y_0)\\
\sum\sum w_{ij}(x_i-x_0) & \sum\sum w_{ij}(x_i-x_0)^2 & \sum\sum w_{ij}(x_i-x_0)(y_j-y_0)\\
\sum\sum w_{ij}(y_j-y_0) & \sum\sum w_{ij}(x_i-x_0)(y_j-y_0) & \sum\sum w_{ij}(y_j-y_0)^2
\end{bmatrix}^{-1}
\begin{bmatrix}
\sum\sum z_{ij}w_{ij}\\
\sum\sum z_{ij}w_{ij}(x_i-x_0)\\
\sum\sum z_{ij}w_{ij}(y_j-y_0)
\end{bmatrix}$$
</div>
</div>
</div>
</div>
</section>
<section style="font-size: 26px;">
<h4>
Example of Kernel Smoothing
</h4>
<div class="r-stack">
<div class="fragment fade-out" data-fragment-index="0">
Consider the function, $f:[0,1)\times[0,1)\rightarrow \mathbb{R}$
$$f(x, y)=-2(x-0.5)^2 - 2(y-0.5)^2 + I_{\{(x-0.5)^2 + (y-0.5)^2 \leq 0.25^2\}}$$
$f$ was evaluated on a $100\times 100$ grid. Here is the plot of the points and the true surface:
<br>
<div style="text-align: center;">
<iframe src="media/truevalues.html" scrolling="no" height="450px" width="850px" frameborder="0"></iframe>
</div>
</div>
<div class="fragment current-visible" data-fragment-index="0">
Consider the function, $f:[0,1)\times[0,1)\rightarrow \mathbb{R}$
$$f(x, y)=-2(x-0.5)^2 - 2(y-0.5)^2 + I_{\{(x-0.5)^2 + (y-0.5)^2 \leq 0.25^2\}}$$
$f$ was evaluated on a $100\times 100$ grid, and noises were added from $N(0, \sigma^2)$ with $\sigma=0.3$. Here is the noisy input data:
<br>
<div style="text-align: center;">
<iframe data-src="media/input.html" scrolling="no" height="450px" width="850px" frameborder="0"></iframe>
</div>
</div>
<div class="fragment current-visible" data-fragment-index="1">
On the noisy input, we performed the conventional kernel smoothing with triangular density and <strong>$h=0.15$</strong>
<br>
Here is the fitted surface for $0$-degree:
<div style="text-align: center;">
<iframe data-src="media/conv_deg0.html" scrolling="no" height="450px" width="850px" frameborder="0"></iframe>
</div>
</div>
<div class="fragment current-visible" data-fragment-index="2">
On the noisy input, we performed the conventional kernel smoothing with triangular density and <strong>$h=0.15$</strong>
<br>
Here is the fitted surface for $1$-degree:
<div style="text-align: center;">
<iframe data-src="media/conv_deg1.html" scrolling="no" height="450px" width="850px" frameborder="0"></iframe>
</div>
</div>
</div>
</section>
<section>
<h4>
Drawbacks : Conventional Kernel Smoothing
</h4>
<div>
The jump imformation was completely lost in the last two outputs. The fitted surface was smooth near the “Jump Location Curve”, but in reality, there is a jump with magnitude $1$ in the true surface.
</div>
<div class="fragment fade-down">
$$\Bigg\downarrow$$
To overcome the issue, we propose a method where we try to preserve the jump information while doing kernel smoothing.
</div>
</section>
</section>
<section style="text-align: left;">
<section>
<h4>
Proposed Method
</h4>
<ul>
<li>
We want to preserve the jump information.
</li>
<li>
To estimate $f$ at $(x_0,y_0)$, we shall <strong>not</strong> consider <strong>all</strong> points. Instead, we can do a neighbourhood-based clustering.
</li>
<li>
For satisfactory performance, we introduce some more assumptions on $f$.
</li>
</ul>
</section>
<section>
<h4>
Modified Problem Statement
</h4>
<div style="font-size: 30px;">
$$f:[0,1)\times[0,1)\rightarrow\mathbb{R}$$
We are given data-points in an $n\times n$ grid: $\{(x_i,y_j)|i,j=1,\ldots,n\}$, where $x_i=y_i=\frac{i-1}{n}$
$$z_{ij}=f(x_i,y_j)+\epsilon_{ij}\text{ , } \epsilon_{ij}\sim N(0, \sigma^2)\text{ i.i.d., }\sigma^2\text{ unknown.}$$
<div class="fragment">
$f$ has the following properties:
<ul>
<li>
Except at jump location curves, $f$ is continuous & locally linear(i.e., can be approximated by a plane.)
</li>
<li>
The jump location curves are smooth, so that, it can be approximated by a straight line in a small region.
</li>
</ul>
Under this setup, given $(x_0, y_0)\in[0, 1)\times[0,1)$, we want to predict $f(x_0, y_0)$.
</div>
</div>
</section>
<section>
<h4>
Proposed Method : In Brief
</h4>
<ul>
<li class="fragment">
First fix a <strong>neighbourhood</strong> around $(x_0,y_0)$
</li>
<li class="fragment">
Not all points in the neighbourhood may belong to the same suface/layer.
</li>
<li class="fragment">
So, try to <strong>partition</strong> the neighbourhood, with a straight line.
</li>
<li class="fragment">
Check if the partition is worth doing. Does the partition reveal two <strong>distinct</strong> planes?
</li>
<li class="fragment">
Based on that, obtain a set of points which (possibly) <strong>shares the same surface</strong> with $(x_0,y_0)$
</li>
<li class="fragment">
Use only those points to predict $f(x_0,y_0)$
</li>
</ul>
</section>
<section>
<h4>
Proposed Method : In Brief
</h4>
<div style="text-align: center;">
<iframe data-src="media/brief.html" scrolling="no" height="465px" width="465px" frameborder="0"></iframe>
</div>
</section>
</section>
<section style="text-align: left;">
<section>
<h4>
Proposed Method : Step 1
</h4>
<div style="font-size: 30px;">
Given $(x_0,y_0)$, first we fix a neighbourhood around this point.
<br>
Fix some $l$. Then we have the square neighbourhood, $$S=[x_0-l,x_0+l]\times[y_0-l,y_0+l]$$
<br>
Define, $N(x_0, y_0)=$ set of design points contained in $S$.
<!-- <br>
For points near boundary, the neighbourhood may not be a square. We can do “padding”, or can work with the truncated neighbourhood. -->
<div class="fragment">
<hr>
For $100\times 100$ grid, if $(x_0,y_0)$ is a design point, then $l=0.05\Rightarrow N(x_0,y_0)$ is a set of $121$ points arranged in a $11\times 11$ grid.
<br>
We say that, this is a neighbourhood with “window-width $11$”.
</div>
</div>
</section>
<section>
<h4>
Proposed Method : Step 1 (contd.)
</h4>
<div style="font-size: 30px;">
<strong>Example:</strong>
<!-- <br> -->
Same function $f$, added noise with $\sigma=0.1$
<br>
Say, $(x_0,y_0)=(0.32, 0.70)$ and $l=0.06$
<br>
So, $N(x_0, y_0)=\{0.26, 0.28, \ldots,0.38\}\times\{0.64,0.66,\ldots,0.76\}$
<br>
How does it look like?
<br>
<div style="text-align: center;" class="r-stack">
<div class="fragment current-visible">
<iframe data-src="media/grid.html" scrolling="no" height="500px" width="500px" frameborder="0"></iframe>
</div>
<div class="fragment">
<iframe data-src="media/zoomgrid.html" scrolling="no" height="500px" width="500px" frameborder="0"></iframe>
</div>
</div>
</div>
</section>
</section>
<section style="text-align: left;">
<section>
<h4>
Proposed Method : Step 2
</h4>
<div style="font-size: 30px;">
Fit a least-square plane with the points in $N(x_0,y_0)$, i.e., fit the model,
$$z_{ij}=\alpha+\beta_1 x_i+\beta_2 y_j + \eta_{ij}\text{ , } \eta_{ij}\text{ i.i.d. error}$$
<hr>
<div style="font-size: 26px;">
For our example, we obtained: $\hat{z}=2.9+7.2x-7.3y$ & $RSS=15.242$
</div>
<div style="text-align: center;">
<iframe data-src="media/lsplane.html" scrolling="no" height="450px" width="500px" frameborder="0"></iframe>
</div>
<!-- By <a href="https://www.google.com">one theorem</a>, $\hat{\beta_1}, \hat{\beta_2}$ contains jump-information.
<br>
$\vec{v_{ij}}=(\hat{\beta_1}, \hat{\beta_2})$ denotes the direction of jump. -->
</div>
</section>
<section>
<h4>
Proposed Method : Step 2 (Contd.)
</h4>
<div style="font-size: 30px;">
The least square plane is perpendicular to the vector $(\hat{\beta_1}, \hat{\beta_2}, -1)$
<hr>
Let's draw the normal vector $(7.2, -7.3, -1)$:
<div style="text-align: center;">
<iframe data-src="media/lsplaneiso.html" scrolling="no" height="500px" width="500px" frameborder="0"></iframe>
</div>
</div>
</section>
<section>
<h4>
Proposed Method : Step 2 (Contd.)
</h4>
<div style="font-size: 30px;">
So, $\vec{v_{ij}}=(\hat{\beta_1}, \hat{\beta_2})$ denotes the direction of jump.
<hr>
Here is the grid with the vector $\vec{v_{ij}}=(7.2, -7.3)$ on $x-y$ plane:
<div style="text-align: center;">
<iframe data-src="media/projected.html" scrolling="no" height="500px" width="500px" frameborder="0"></iframe>
</div>
</div>
</section>
<section>
<h4>
Proposed Method : Step 2 (Contd.)
</h4>
<div style="font-size: 30px;">
The jump location curve can be approximated by a straight line perpendicular to $\vec{v_{ij}}$, i.e., parallel to $(-\hat{\beta_2}, \hat{\beta_1})$.
So, the partitioning line is of the form, $\hat{\beta_1}x+\hat{\beta_2}y=c$, but $c$ is unknown.
<hr>
Here are 3 parallel lines for $c=$<div style="display: inline; background-color: #DDDDDD;"><font color="green">$-2.2,$</font><font color="black">$-3.0,$</font><font color="blue">$-3.2$</font></div>
<div style="text-align: center;">
<iframe data-src="media/parallel.html" scrolling="no" height="500px" width="500px" frameborder="0"></iframe>
</div>
</div>
</section>
</section>
<section style="text-align: left;">
<section>
<h4>
Proposed Method : Step 3
</h4>
<div style="font-size: 30px;">
Now we want to find the best $c$. But, how do we define “best” in this context?
<br>
<ul>
<li class="fragment fade-in-then-semi-out" data-fragment-index="1">
For each $c$, we get one straight line. Therefore, we have a partition of $N(x_0,y_0)$ with 2 disjoint parts.
</li>
<li class="fragment fade-in-then-semi-out" data-fragment-index="2">
In each part, we can fit a least-square plane.
</li>
<li class="fragment fade-in-then-semi-out" data-fragment-index="3">
From these two planes, we can calculate residual sum of squares. Call it $RSS(c)$
</li>
<li class="fragment" data-fragment-index="4">
Optimal $c$ is given by, $c_{opt}=\underset{c\in \mathbb{R}}{\operatorname{arg min}}RSS(c)$
</li>
</ul>
</div>
</section>
<section>
<h4>
Proposed Method : Step 3 (Contd.)
</h4>
<div style="font-size: 30px;">
Here is the partition for $c=-3.0$
<br>
<div style="text-align: center;">
<ul>
<li style="color: green;">
$\hat{\beta_1}x+\hat{\beta_2}y\leq c$
</li>
<li style="color: red;">
$\hat{\beta_1}x+\hat{\beta_2}y> c$
</li>
</ul>
</div>
<div style="text-align: center;">
<iframe data-src="media/partition-3.html" scrolling="no" height="500px" width="500px" frameborder="0"></iframe>
</div>
</div>
</section>
<section>
<h4>
Proposed Method : Step 3 (Contd.)
</h4>
<div style="font-size: 30px;">
Two least square planes for $c=-3.0$:
<br>
<!-- <div style="text-align: center;">
<ul>
<li style="color: green;">
$\hat{\beta_1}x+\hat{\beta_2}y\leq c$
</li>
<li style="color: red;">
$\hat{\beta_1}x+\hat{\beta_2}y> c$
</li>
</ul>
</div> -->
<div style="text-align: center;">
<iframe data-src="media/2planes.html" scrolling="no" height="450px" width="500px" frameborder="0"></iframe>
<br>
$RSS(c)=$<font color="green">$0.396$</font>$+$<font color="red">$8.932$</font>$=9.328$
</div>
</div>
</section>
<section>
<h4>
Proposed Method : Step 3 (Contd.)
</h4>
<div style="font-size: 30px;">
Want to find $c_{opt}$.
<br>
<div style="text-align: center;">
<img data-src="media/RSSc.png">
<br>
<strong>$c_{opt}=-2.63$</strong>
</div>
</div>
</section>
<section>
<h4>
Proposed Method : Step 3 (Contd.)
</h4>
<div style="font-size: 30px;">
Optimal partitioning obtained from $\hat{\beta_1}x+\hat{\beta_2}y=c_{opt}$
<br>
<div style="text-align: center;">
<iframe data-src="media/optimalplanes.html" scrolling="no" height="450px" width="500px" frameborder="0"></iframe>
<br>
<strong>$RSS(c_{opt})=5.614$</strong>
</div>
</div>
</section>
</section>
<section style="text-align: left;">
<section>
<h4>
Proposed Method : Step 4
</h4>
<div style="font-size: 30px;">
We have obtained a partition. But <strong>is there really a partition?</strong>
<br>
<ul>
<li class="fragment fade-down" data-fragment-index="1">
While we fitted a single plane, we obtained one value of $RSS$. Call it $RSS_0$.
</li>
<li class="fragment fade-up" data-fragment-index="1">
For the partitioned fit, we obtained $RSS(c_{opt})$, smaller than $RSS_0$.
</li>
<li class="fragment fade-down" data-fragment-index="2">
If there really exists a jump in the neighbourhood, then we expect that $RSS_0$ would be significantly higher than $RSS(c_{opt})$. Otherwise, they would be close to each other.
</li>
<li class="fragment fade-up" data-fragment-index="2">
So we can do a hypothesis testing to determine whether we should <strong>trust</strong> the obtained partition.
</li>
</ul>
</div>
</section>
<section>
<h4>
Proposed Method : Step 4 (Contd.)
</h4>
<div style="font-size: 30px;">
<strong>Hypothesis testing:</strong>
$$H_0:\text{Jump location curve passes through the neighbourhood}$$
$$H_A:H_0\text{ is false}$$
<div class="fragment">
In other words, we have the model:
$$z_{ij} = \begin{cases}
\left(p_1+q_1x_i+r_1y_j+\eta_{ij} \right), & \text{if }(x_i,y_j)\in \text{Cluster-1} \\
\left(p_2+q_2x_i+r_2y_j+\eta_{ij} \right), & \text{if }(x_i,y_j)\in \text{Cluster-2}
\end{cases}
$$
</div>
<div class="fragment">
and, we want to test,
$$H_0:p_1=p_2,q_1=q_2,r_1=r_2$$
$$H_A:H_0\text{ is false}$$
</div>
</div>
</section>
<section>
<h4>
Proposed Method : Step 4 (Contd.)
</h4>
<div style="font-size: 30px;">
<strong>Hypothesis testing:</strong>
We had assumed that noises follow $N(0,\sigma^2)$.
We can do $F\text{-test}$:
$$F=\frac{\left(RSS_0-RSS\right)/3}{RSS/(m-6)},m=\#N(x_0,y_0)$$
$$\text{Under }H_0, F\sim F_{3,m-6}$$
Based on level of significance $\alpha$, we can make a decision.
<div class="fragment fade-up">
<hr>
We had, $RSS_0=15.242$, $RSS=5.614$.
<br>
$m=13\times 13=169$. Set $\alpha=0.001$
<br>
Hence, $F=93.179$. Therefore, $p\text{-value}=3.63\times 10^{-35}$
<br>
<strong>Conclusion:</strong> There is a jump location curve passing through the neighbourhood. So we shall work with the obtained partition.
</div>
</section>
</section>
<section style="text-align: left;">
<section>
<h4>
Proposed Method : Step 5
</h4>
<div style="font-size: 30px;">
We had the point $(x_0,y_0)$ & its neighbourhood $N(x_0,y_0)$.
<ul>
<li class="fragment fade-in-then-semi-out">
After the testing, either we shall work with $N(x_0,y_0)$ or a subset of it. Call it $N^*(x_0,y_0)$
</li>
<li class="fragment fade-in-then-semi-out">
In case we fail to reject $H_0$, $N^*(x_0,y_0)=N(x_0,y_0)$
</li>
<li class="fragment fade-in-then-semi-out">
If $H_0$ was rejected, $N^*(x_0,y_0)$ is the subset of $N(x_0,y_0)$ which shares the same side of the partitioning line with $(x_0,y_0)$
</li>
</ul>
</section>
<section>
<h4>
Proposed Method : Step 5 (Contd.)
</h4>
<div style="font-size: 30px;">
Now we shall do local polynomial smoothing with points in $N^*(x_0,y_0)$
<br>
<div class="fragment">
For $0$-degree local polynomial, we minimize,
$$\mathop{\sum\sum}_{(x_i,y_j)\in N^*}(z_{ij}-\alpha)^2 K\left(\frac{x_i-x_0}{h},\frac{y_j-y_0}{h}\right)$$
</div>
<div class="fragment">
and, $\hat{f_0}(x_0,y_0)$ is given by,
$$\hat{f_0}(x_0, y_0)=\hat{\alpha}=\frac{\mathop{\sum\sum}_{(x_i,y_j)\in N^*}w_{ij}z_{ij}}{\mathop{\sum\sum}_{(x_i,y_j)\in N^*} w_{ij}}$$
where, $w_{ij}=K\left(\frac{x_i-x_0}{h}, \frac{y_j-y_0}{h}\right)$
</div>
<div class="fragment">
Similarly, we can do smoothing with $1$-degree polynomial.
</div>
</section>
</section>
<section>
<section data-auto-animate>
<h4 data-id="heading">
Summary of the method
</h4>
<pre data-id="description">
<code class="hljs" data-trim data-noescape>
<strong>Here is a summary of what we did:</strong>
</code>
</pre>
</section>
<section data-auto-animate>
<h4 data-id="heading">
Summary of the method
</h4>
<pre data-id="description">
<code class="hljs" data-trim data-line-numbers="1,2" data-noescape>
We started with a point (x<sub>0</sub> ,y<sub>0</sub>)
And, constructed its neighbourhood N(x<sub>0</sub> ,y<sub>0</sub>)
</code>
</pre>
</section>
<section data-auto-animate>
<h4 data-id="heading">
Summary of the method
</h4>
<pre data-id="description">
<code class="hljs" data-trim data-line-numbers="3,4" data-noescape>
We started with a point (x<sub>0</sub> ,y<sub>0</sub>)
And, constructed its neighbourhood N(x<sub>0</sub> ,y<sub>0</sub>)
In N(x<sub>0</sub> ,y<sub>0</sub>), we fitted least square plane<br>and, projected the normal vector onto x-y plane.
This gave the direction of the jump.
</code>
</pre>
</section>
<section data-auto-animate>
<h4 data-id="heading">
Summary of the method
</h4>
<pre data-id="description">
<code class="hljs" data-trim data-line-numbers="5,6" data-noescape>
We started with a point (x<sub>0</sub> ,y<sub>0</sub>)
And, constructed its neighbourhood N(x<sub>0</sub> ,y<sub>0</sub>)
In N(x<sub>0</sub> ,y<sub>0</sub>), we fitted least square plane<br>and, projected the normal vector onto x-y plane.
This gave the direction of the jump.
We tried to find the optimal partition line<br>perpendicular to the direction.
And performed a testing to decide if there is a jump.
</code>
</pre>
</section>
<section data-auto-animate>
<h4 data-id="heading">
Summary of the method
</h4>
<pre data-id="description">
<code class="hljs" data-trim data-line-numbers="7,8" data-noescape>
We started with a point (x<sub>0</sub> ,y<sub>0</sub>)
And, constructed its neighbourhood N(x<sub>0</sub> ,y<sub>0</sub>)
In N(x<sub>0</sub> ,y<sub>0</sub>), we fitted least square plane<br>and, projected the normal vector onto x-y plane.
This gave the direction of the jump.
We tried to find the optimal partition line<br>perpendicular to the direction.
And performed a testing to decide if there is a jump.
Depending on the conclusion, we obtained<br>a set of points similar to (x<sub>0</sub> ,y<sub>0</sub>)
With those points, we did local polynomial smoothing,<br>(which is just a weighted-average for 0-degree).
</code>
</pre>
</section>
</section>
<section>
<section style="text-align: left;">
<h4>
Proposed Method : Example
</h4>
<div style="font-size: 30px;">
<div class="r-stack">
<div class="fragment current-visible" data-fragment-index="0" style="font-size: 36px;">
Now we know how to estimate $f$ at $(x_0,y_0)$.
<br>
So for the $100\times 100$ points, let's calculate the estimated values to obtain the fitted surface.
</div>
<div class="fragment current-visible" data-fragment-index="1">
<strong>Example:</strong> Same function $f$, with noise from $N(0, \sigma^2), \sigma=0.3$.
<br>
Here is the noisy input data:
<br>
<div style="text-align: center;">
<iframe data-src="media/input.html" scrolling="no" height="450px" width="850px" frameborder="0"></iframe>
</div>
</div>
<div class="fragment current-visible" data-fragment-index="2">
<strong>Parameters:</strong> We have chosen
<br>
$$\alpha = 0.001, l=0.03\text{ (or, window width 7)}, h=0.1$$
Here is output from the method with $0$-degree polynomial smoothing:
<br>
<div style="text-align: center;">
<iframe data-src="media/proposed_0deg.html" scrolling="no" height="450px" width="850px" frameborder="0"></iframe>
</div>
</div>
</div>
</div>
</section>
<section>
<iframe data-src="media/conv_deg0.html" scrolling="no" height="330px" width="850px" frameborder="0"></iframe>
<iframe data-src="media/proposed_0deg.html" scrolling="no" height="330px" width="850px" frameborder="0"></iframe>
</section>
</section>
<section>
<section style="text-align: left;">
<h4>
Simulation Study
</h4>
<div style="font-size: 30px;">
We know the method, but there are unknown parameters: $\alpha, l, h$
<br>
<div class="fragment">
Each of them has different effects.
</div>
<ul>
<li class="fragment fade-in-then-semi-out">
<strong>$\alpha$ :</strong> For jump/edge detection.
</li>
<li class="fragment fade-in-then-semi-out">
<strong>$l$ :</strong> Large $l\Rightarrow$ more points, but it can also violate assumptions.
</li>
<li class="fragment fade-in-then-semi-out">
<strong>$h$ :</strong> Smoothing bandwidth. Should be increased if noise is high.
</li>
</ul>
<div class="fragment">
<hr>
To get an idea on choosing the optimal parameters, we present a simulation study.
<br>
For different $\sigma$'s, we varied $l$ & $h$, and checked which one gives minimum MSE.
<br>
$\alpha=0.001$ seemed to be a reasonable choice for this case.
</div>
</div>
</section>
<section data-transition="zoom-in">
<h4>
Simulation Study : $\sigma=0.1$
</h4>
<img class="r-stretch" data-src="media/simulation/sigma0.1.png">
</section>
<section data-transition="fade">
<h4>
Simulation Study : $\sigma=0.2$
</h4>
<img class="r-stretch" data-src="media/simulation/sigma0.2.png">
</section>
<section data-transition="fade">
<h4>
Simulation Study : $\sigma=0.3$
</h4>
<img class="r-stretch" data-src="media/simulation/sigma0.3.png">
</section>
<section data-transition="fade">
<h4>
Simulation Study : $\sigma=0.4$
</h4>
<img class="r-stretch" data-src="media/simulation/sigma0.4.png">
</section>
<section data-transition="fade">
<h4>
Simulation Study : $\sigma=0.5$
</h4>
<img class="r-stretch" data-src="media/simulation/sigma0.5.png">
</section>
<section data-transition="fade">
<h4>
Simulation Study : $\sigma=0.6$
</h4>
<img class="r-stretch" data-src="media/simulation/sigma0.6.png">
</section>
<section data-transition="fade">
<h4>
Simulation Study : $\sigma=0.7$
</h4>
<img class="r-stretch" data-src="media/simulation/sigma0.7.png">
</section>
<section data-transition="fade">
<h4>
Simulation Study : $\sigma=0.8$
</h4>
<img class="r-stretch" data-src="media/simulation/sigma0.8.png">
</section>
<section data-transition="fade">
<h4>
Simulation Study : $\sigma=0.9$
</h4>
<img class="r-stretch" data-src="media/simulation/sigma0.9.png">
</section>
<section data-transition="fade">
<h4>
Simulation Study : $\sigma=1.0$
</h4>
<img class="r-stretch" data-src="media/simulation/sigma1.0.png">
</section>
</section>
<section style="text-align: left; font-size: 32px;">
<h4>
One Drawback
</h4>
Assumed that jump location curves are smooth (can be approximated by a straight line). What happens when it is violated?
<hr class="fragment" data-fragment-index="1">
<div class="r-stack">
<div class="fragment current-visible" data-fragment-index="1">
Consider this function:
$$g(x,y)=x + I_{\{y > 0.375 + 0.25x \text{ or } x > 0.5\}}$$
Added noise with $\sigma=0.05$
<br>
Window-width $9$ and $h=0.05$ were used.
</div>
<div class="fragment current-visible" data-fragment-index="2">
The original function contains a sharp jump location curve. In the fitted plane, the sharp edge was blurred.
<br>
<div style="text-align: center;">
<iframe data-src="media/drawback.html" scrolling="no" height="450px" width="850px" frameborder="0"></iframe>
</div>
</div>
</div>
</section>
<section style="font-size: 32px;">
<section data-auto-animate data-auto-animate-easing="cubic-bezier(0.770, 0.000, 0.175, 1.000)">
<h3>
One Practical Example
</h3>
<br>
<img data-id="trueimg" data-src="media/practical/pepper.png" height="400px" width="400px">
<br>
<div data-id="heading">
We have this image ($256\times 256$)
</div>
</section>
<section data-auto-animate data-auto-animate-easing="cubic-bezier(0.770, 0.000, 0.175, 1.000)">
<h3>
One Practical Example
</h3>
<br>
<img data-id="additional" data-src="media/practical/border_nonoise.png" height="400px" width="400px" style="padding-right: 10px;">
<img data-id="trueimg" data-src="media/practical/pepper.png" height="400px" width="400px" style="padding-left: 10px;">
<br>
<div data-id="footer">
Applying the method, we get these edges.
</div>
</section>
<section data-auto-animate data-auto-animate-easing="cubic-bezier(0.770, 0.000, 0.175, 1.000)">
<h3>
One Practical Example
</h3>
<br>
<img data-id="trueimg" data-src="media/practical/pepper.png" height="400px" width="400px" style="padding-right: 10px;">
<img data-id="additional" data-src="media/practical/noise.png" height="400px" width="400px" style="padding-left: 10px;">
<br>
<div data-id="heading">
After adding noise from $N(0,0.06^2)$
</div>
</section>
<section data-auto-animate data-auto-animate-easing="cubic-bezier(0.770, 0.000, 0.175, 1.000)">
<h3>
One Practical Example
</h3>
<br>
<img data-id="additional" data-src="media/practical/noise.png" height="400px" width="400px">
<br>
<div data-id="footer">
We applied the method on this image with $9\times 9$ window-width, threshold $=18$, and Epanechnikov kernel with $h=\frac{2}{256}$.
</div>
</section>
<section data-auto-animate data-auto-animate-easing="cubic-bezier(0.770, 0.000, 0.175, 1.000)">
<h3>
One Practical Example
</h3>
<br>
<img data-id="additional" data-src="media/practical/noise.png" height="400px" width="400px" style="padding-right: 10px;">
<img data-id="trueimg" data-src="media/practical/border_i.png" height="400px" width="400px" style="padding-left: 10px;">
<br>
<div data-id="heading">
Here are the edges we obtained
</div>
</section>
<section data-auto-animate data-auto-animate-easing="cubic-bezier(0.770, 0.000, 0.175, 1.000)">
<h3>
One Practical Example
</h3>
<br>
<img data-id="additional" data-src="media/practical/noise.png" height="400px" width="400px" style="padding-right: 10px;">
<img data-id="trueimg" data-src="media/practical/smoothed.png" height="400px" width="400px" style="padding-left: 10px;">
<br>
<div data-id="footer">
And the smoothed image
</div>
</section>
<section data-auto-animate data-auto-animate-easing="cubic-bezier(0.770, 0.000, 0.175, 1.000)">
<h3>
One Practical Example
</h3>
<br>
<!-- <img data-id="additional" data-src="media/practical/noise.png" height="400px" width="400px" style="padding-right: 10px;"> -->
<img data-id="trueimg" data-src="media/practical/error.png" height="400px" width="400px">
<br>
<div data-id="heading" class="r-stack">
<div class="fragment fade-out" data-fragment-index="1">
Estimated noise $=(\text{noisy image}-\text{smoothed image})$
</div>
<div class="fragment current-visible" data-fragment-index="1">
Caution: It contains pattern of the image. Should not be the case.
</div>
</div>
</section>
</section>
<section style="text-align: left;">
<section style="font-size: 32px;">
<h4>
Concluding Remarks:
</h4>
We presented a method to fit regression surface considering jumps/edges.
<ul>
<li class="fragment">
In cases where jumps are present, it performs better compared to usual local polynomial smoothing.
</li>
<li class="fragment">
When the true function is unknown (which is going to be the case for practical purposes), <strong>choice of parameters</strong> may be a tough task.
</li>
<li style="list-style-type: none;" class="fragment">
In that case,
<ul>
<li>
<strong>Human presence</strong> is required to determine the optimal parameters.
</li>
<li>
Or, <strong>task specific / domain specific</strong> parameters can be determined based on some examples.
</li>
</ul>
</li>
<li class="fragment">
We plan to <strong>explore further</strong> regarding the choice of parameters in different scenarios.
</li>
</ul>
</section>
</section>
<section data-background="media/collage.png" data-background-opacity=0.1 data-background-transition="zoom">
<section style="font-size: 34px; text-align: left;">
<ul>
<li>
<u>Acknowledgement:</u>
<ul>
<li>
Dr. Partha Sarathi Mukherjee, Associate Professor, ISI Kolkata
</li>
<li>
Dr. Debasis Sengupta, Professor, ISI Kolkata
</li>
</ul>
</li>
<br>
<li>
<u>Reference:</u>
<ul>
<li>
Qiu, P., & Yandell, B. (1997). Jump Detection in Regression Surfaces. Journal of Computational and Graphical Statistics, 6(3), 332-354. doi:10.2307/1390737
</li>
</ul>
</li>
<br>
<li>
<u>Submitted by:</u>
<ul>
<li>
Riddhiman Saha - BS1702
</li>
<li>
Somak Laha - BS1720
</li>
<li>
Souhardya Ray - BS1728
</li>
</ul>
</li>
</ul>
</section>
<section>
<h2>
Thank You
</h2>
</section>
</section>
<!-- <section>