Breve análisis de algunos métodos de interpolación para ...
Transcript of Breve análisis de algunos métodos de interpolación para ...
Breve analisis de algunos metodos de interpolacionpara series de tiempo de imagenes satelitales
Inder Tecuapetla Gomez1
1CONACyT-CONABIO
Taller TATSSI: Primera Parte,Julio 18, 2019, CONABIO
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 1 / 31
Par de NDVIs
Datos tomados de Colditz et al. (2008)
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 2 / 31
Datos originales
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 3 / 31
Datos originales
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 3 / 31
Interpolacion Previous
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 4 / 31
Interpolacion Previous
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 4 / 31
Interpolacion Next
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 5 / 31
Interpolacion Next
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 5 / 31
Interpolacion Mean
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 6 / 31
Interpolacion Mean
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 6 / 31
Interpolacion Linear
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 7 / 31
Interpolacion Linear
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 7 / 31
Polinomios de Lagrange
Se puede probar que dadas las observaciones (x1, y1), . . . , (xn, yn) elpolinomio
pn(x) =n∑
j=1
cj(x) yj ,
dondecj(x) =
x − x1
xj − x1· · ·
x − xj−1
xj − xj−1
x − xj+1
xj − xj+1· · · x − xn
xj − xn
describe una grafica que pasara por los valores y1, y2, . . . , yn.
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 8 / 31
Interpolacion Polinomial
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 9 / 31
Interpolacion Polinomial
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 9 / 31
Interpolacion Polinomial continuacion
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 10 / 31
Interpolacion Polinomial continuacion
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 10 / 31
Interpolacion Polinomial continuacion
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 11 / 31
Interpolacion Polinomial continuacion
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 11 / 31
Interpolacion Polinomial continuacion
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 12 / 31
Interpolacion Polinomial continuacion
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 12 / 31
Interpolacion Polinomial continuacion
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 12 / 31
Interpolacion Polinomial (missing values)
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 13 / 31
Interpolacion Polinomial (missing values)
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 13 / 31
> yMask[1] 0.291400 0.564800 NA 0.701600 0.735800 0.762600
0.789300 0.655600 0.371600 NA 0.336100 0.2698000.237700 0.265500 0.306900 0.317250 NA 0.641475
[19] 0.746100 0.609200 0.323300 0.301450 0.279600
> LagrangePoly(x = 1:23, y = yMask)$interpol[1] 0.2914000 0.5648000 14.1775204 0.7016000 0.7358000
0.7626000 0.7893000 0.6556000 0.3716000 0.32461470.3361000 0.2698000 0.2377000 0.2655000 0.3069000
[16] 0.3172500 0.3711811 0.6414750 0.7461000 0.60920000.3233000 0.3014500 0.2796000
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 14 / 31
Interpolacion Polinomial Baricentrica
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 15 / 31
Interpolacion Polinomial Baricentrica
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 15 / 31
Representacion polinomial alternativa
Consideremos la pareja (xi , yi ) y supongamos que existe un polinomio pn(·) de grado n talque pn(xi ) = yi . Entonces
yi = pn(xi ) = βn xni + βn−1 xn−1
i + · · ·+ β1 xi + β0
Utilizando el mismo argumento para cada una de las parejas (x1, y1), . . . , (xn, yn) podemosescribir
1 x1 x21 · · · xn
11 x2 x2
2 · · · xn2
...1 xn x2
n · · · xnn
β0β1...βn
=
y1y2...
yn
,
o matricialmenteXβ = y
Para encontrar los coeficientes β, tenemos
β = (X> X)−1 y
Por cuestiones de estabilidad, podemos usar
βλ = (X> X + λ In)−1 y ,
donde el valor de λ es pequeno.
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 16 / 31
Representacion polinomial alternativa
Consideremos la pareja (xi , yi ) y supongamos que existe un polinomio pn(·) de grado n talque pn(xi ) = yi . Entonces
yi = pn(xi ) = βn xni + βn−1 xn−1
i + · · ·+ β1 xi + β0
Utilizando el mismo argumento para cada una de las parejas (x1, y1), . . . , (xn, yn) podemosescribir
1 x1 x21 · · · xn
11 x2 x2
2 · · · xn2
...1 xn x2
n · · · xnn
β0β1...βn
=
y1y2...
yn
,
o matricialmenteXβ = y
Para encontrar los coeficientes β, tenemos
β = (X> X)−1 y
Por cuestiones de estabilidad, podemos usar
βλ = (X> X + λ In)−1 y ,
donde el valor de λ es pequeno.
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 16 / 31
Representacion polinomial alternativa
Consideremos la pareja (xi , yi ) y supongamos que existe un polinomio pn(·) de grado n talque pn(xi ) = yi . Entonces
yi = pn(xi ) = βn xni + βn−1 xn−1
i + · · ·+ β1 xi + β0
Utilizando el mismo argumento para cada una de las parejas (x1, y1), . . . , (xn, yn) podemosescribir
1 x1 x21 · · · xn
11 x2 x2
2 · · · xn2
...1 xn x2
n · · · xnn
β0β1...βn
=
y1y2...
yn
,
o matricialmenteXβ = y
Para encontrar los coeficientes β, tenemos
β = (X> X)−1 y
Por cuestiones de estabilidad, podemos usar
βλ = (X> X + λ In)−1 y ,
donde el valor de λ es pequeno.
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 16 / 31
Representacion polinomial alternativa
Consideremos la pareja (xi , yi ) y supongamos que existe un polinomio pn(·) de grado n talque pn(xi ) = yi . Entonces
yi = pn(xi ) = βn xni + βn−1 xn−1
i + · · ·+ β1 xi + β0
Utilizando el mismo argumento para cada una de las parejas (x1, y1), . . . , (xn, yn) podemosescribir
1 x1 x21 · · · xn
11 x2 x2
2 · · · xn2
...1 xn x2
n · · · xnn
β0β1...βn
=
y1y2...
yn
,
o matricialmenteXβ = y
Para encontrar los coeficientes β, tenemos
β = (X> X)−1 y
Por cuestiones de estabilidad, podemos usar
βλ = (X> X + λ In)−1 y ,
donde el valor de λ es pequeno.
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 16 / 31
Dificultades numericas
> poly23rd <- getPolyInterpol(x = 1:23, y = data2, n = 23)Error in solve.default(t(vanderMondeMatrix) %*% vanderMondeMatrix + 0.1 * :system is computationally singular: reciprocal condition number = 1.40968e-64
> getPolyInterpol(x = 1:23, y = data2, n = 6)Error in solve.default(t(vanderMondeMatrix) %*% vanderMondeMatrix + 0.1 * :system is computationally singular: reciprocal condition number = 2.68731e-18
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 17 / 31
Aproximacion con polinomio de quinto grado
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 18 / 31
SPLINE
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 19 / 31
Interpolacion vıa spline natural cubico
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 20 / 31
Interpolacion vıa spline natural cubico
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 20 / 31
Interpolacion vıa spline monotono cubico
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 21 / 31
Interpolacion vıa spline monotono cubico
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 21 / 31
Mean Squared Error
Estimador Wn, valor a estimar ϑ
Conociendo la distribucion de ϑ:
MSE[Wn] = Eϑ[(Wn − ϑ)2]
Propiedad
MSE[Wn] =
SESGO︷ ︸︸ ︷
Eϑ[Wn]− ϑ
2
+ VAR(Wn)
Si Wn y Vn son estimadores de ϑ, diremos que Wn es mejor que Vn (MSE mas pequeno) si
MSE[Wn] < MSE[Vn].
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 22 / 31
Par de NDVIs
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 23 / 31
Setup 1: 3 missing values
Rojo AzulPrevious 0.002654478 0.001716745
Next 0.00591413 0.003776053Mean 0.002179957 0.001125351Linear 0.002016557 0.0009935881
Lagrange 23362601 308781446Barycentric 23362495 308781442
Spline natural 0.001468945 0.0004662435Spline mononotono 0.001449537 0.0004731261
MSE de varios interpoladores aplicados a las trayectorias de NDVI mostradas previamente; seremueven 3 puntos en 5 escenarios distintos para simular missing values.
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 24 / 31
Setup 2: 11 missing values
Rojo AzulPrevious 0.0305365 0.01633331
Next 0.0195339 0.008417934Mean 0.01255644 0.00637029Linear 0.01067903 0.005935692
Lagrange 420610.2 49444.3Barycentric 420610.2 49444.3
Spline natural 0.01097981 0.004674709Spline mononotono 0.01089073 0.004633711
MSE de varios interpoladores aplicados a las trayectorias de NDVI mostradas previamente; seremueven 11 puntos en 5 escenarios distintos para simular missing values.
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 25 / 31
Gerber et al. (2018)
G A P F I L L
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 26 / 31
La Primavera
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 27 / 31
Recortes para aplicar gapfill
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 28 / 31
Aplicacion de gapfill
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 29 / 31
La Primavera, despues de gapfill
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 30 / 31
THAT’S ALL FOLKS!
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 31 / 31
Colditz, R. R., Conrad, C., Wehrmann, T., Schmidt, M., and Dech, S. (2008). TiSeG: A flexiblesoftware tool for time-series generation of MODIS data utilizing the quality assessment sciencedata set. IEEE Trans. Geosci. Remote Sens., 46(10):3296–3308.
Gerber, F., de Jong, R., Schaepman, M. E., Schaepman-Strub, G., and Furrer, R. (2018).Predicting missing values in spatio-temporal remote sensing data. IEEE Transactions onGeoscience and Remote Sensing, 56(5):2841–2853.
Inder Tecuapetla Gomez (CONACyT-CONABIO) Julio 18, 2019 31 / 31