Linear Interpolation of Time Series based on Date

Hi. I need to interpolate a time series which has 2 columns: date and numerical value. I know there is a Missing Value Note where you can select linear interpolation, however it does not take into account date value.

Here is how my time series look like:

28/04/2023 116.92
07/06/2023 ?
06/09/2023 ?
17/10/2026 179.07

What i am trying to achieve is to interpolate missing value based on actual dates. I expect 2023 values to be more or less close to each other with a significant difference comparing to 2026 value.

Appreciate your help

Hi,
I think the easiest way to do this is to calculate the difference between the dates and some date in the past in days and then use the Linear Regression Learner and the corresponding predictor to fill in the blanks. You train the model with the data where you have values, then apply the predictor to the rows with missing values (use Row Splitter for this).
Kind regards,
Alexander

1 Like

Is that what you mean?

Linear Regression Example.knwf (10.9 KB)

Hi,
I meant it a little bit differently, but if this works for you, then its great. I have attached an example.
Kind regards,
Alexander

Linear Regression Example.knwf (15.4 KB)

1 Like

Cool. Thanks you for your help Alexander :slightly_smiling_face:

1 Like

3 posts were split to a new topic: Linear Interpolation with few data points

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.