Open-EO / FuseTS

Time series Fusion toolbox integrated with openEO
https://open-eo.github.io/FuseTS/
Other
22 stars 3 forks source link

Documentation for whittaker #51

Closed jdries closed 2 years ago

jdries commented 2 years ago

I'm working through whittaker as a first example of a time series smoothing function. I would also like to add some initial documentation, to make it already like a real library. This documentation should describe things for a user who does not know what whittaker is, without being overly long.

Some things to cover: What does it do? => Smoothing, gap filling? Performance? => it's relatively fast What does it return? (Timeseries sampled at equidistant steps?) Explain lambda parameter

msalinero commented 2 years ago

Sure, we´ll get to it.

eaamin commented 2 years ago

I prepared a text to try to (briefly) cover point by point the questions above sketched:

What does it do? => Smoothing, gap filling? Whittaker smoother as implemented in https://github.com/WFP-VAM/vam.whittaker Whittaker represents a computationally efficient reconstruction method for smoothing and gap-filling of time series. The main function takes as input two vectors of the same length: the y time series data (e.g. NDVI) and the corresponding temporal vector (date format) x, comprised between the start and end dates of a satellite image collection. Missing or null values as well as the cloud-masked values (i.e. NaN), are handled by introducing a vector of 0-1 weights w, with wi = 0 for missing observations and wi=1 otherwise. Following, the Whittaker smoother is applied to the time series profiles, computing therefore a daily smoothing interpolation. Performance? => it's relatively fast Whittaker's fast processing speed was assessed through an initial performance testing by comparing different time series fitting methods. Average runtime takes 0.0107 seconds to process a single NDVI temporal profile. What does it return? (Timeseries sampled at equidistant steps?) Returns daily (default) and d spacing (d in days defined by the user) smoothed and gap-filled time series and the corresponding time date vector. Explain lambda parameter The smoother performance can be adjusted by tuning the lambda parameter, which penalizes the time series roughness: the larger lambda the smoother the time series at the cost of the fit to the data getting worse. We found a lambda of 10000 adequate for obtaining more convenient results. A more detailed description of the algorithm can be found in the original work of Eilers 2003.