Linear Interpolation based on Kilometers instead of rows

Hi everyone,

I want to fill missings values with an linear interpolation, but i need to do it based on kilometers.
My data are kind of like this:

Using the Missing Value Node does not help me, as i expect the measured value to decrease with the driven kilometers.
Do you have an idea how to solve that problem? Thank you!

Hi @Bastian, welcome to the forum.

I think that in this case, you could try a linear regression:


This is the initial table:

The row splitter sends the rows with missing values to the bottom port, and the rows with no missing values to the top port.

The linear regression learner node figures out the regression using the 3 data points:


The regression predictor applies the regression to the rows that have missing values:


I haven’t shown this, but you can then concatenate the output of the regression and the top port of the row splitter to get a complete dataset.


Amazing, thank you @elsamuel for your great solution!


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