# Linear Interpolation

Dear all,

I’m looking for a very hard solution for me. I try to explain my problem.

I have two tables: Table1 the experimental data and Table2 the theoretical data.

In Table1, “Body Part Thickness” values range from 20 to 110 (step of 1) and HVL range from 0.300 to 1.115.

In Table2, “Body Part Thickness” values range from 20 to 110 (step of 10). For each “Body Part Thickness” there are 11 possible values of HVL (HVL ranges from 0.3 to 0.8, step of 0.05). Each combination of “Body Part Thickness” and HVL correspond to a c_factor value (third column).

For each “Body Part Thickness” value and each HVL value in the first table, I’d like to find the correspondant c_factor obtained by linear interpolation of theorical data. As a result, I’d like to append a third column to the first table.

I was thinking to approximate HVL values (round to 0.05) in the first table, in order to have comparable value with those reported in the Table2.
Then, I’d like to calculate c_factor associated to experimental data by linear interpolation between theoretical data.

For example:

in Table1 Body Part Thickness= 24 ; HVL =0.423

in Table2 I’d like to interpolate c_factors values from the two rows with “Body Part Thickness” = 20 and = 30, and HVL 0.40, by considering experimental data “Body Part Thickness” =24

Hallo @milkyway,

you could concatenate the two tables, sort them by “Body Part Thickness” and “HVL” and then use the Missing Value node. In the Missing Value node, you can replace the missing values in your “c_factor” column using linear interpolation.
However, I was wondering why are you not using the Linear Regression Learner and Linear Regression Predictor to predict the c_factors?

Kind regards,
Janina

2 Likes

Thank you so much @janina for your help!
I used Linear Regression Learner and then Linear Regression Predictor. It works perfect!
Thank you!

2 Likes

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