2
$\begingroup$

enter image description here

Short version: How can I find a function that maps X to Y when data looks like this.

Note:

For a pair of emissivity and distance relation between temperature and raw_thermal_data is linear.

Long Version:

I am working on a project which uses thermal(IR) camera. Now we extract temperature from sensor reading (raw thermal data )

For some reason I need to find a function that maps temperature data to raw thermal data. Now,

temperature = F ( raw_thermal_data, emissivity, distance )

I am trying to find,

raw_thermal_data = F1 ( temperature, emissivity, distance )

For a pair of emissivity and distance relation between temperature and raw_thermal_data is linear.

Looks like for every pair of emissivity and distance, intercept of the line is different.

Any thoughts?

$\endgroup$
2
  • $\begingroup$ are those the only emissivity and distance combinations possible or can there be more ?If those are the only ones then learning separate intercept and slopes for each combination might be a possibility. $\endgroup$ Jul 22 '20 at 5:27
  • $\begingroup$ No. Technically emissivity can be any value in between 0 and 1. And distance can be any positive number. ( but for actual usage we are considering distance upto 1m ) $\endgroup$
    – mmrbulbul
    Jul 22 '20 at 6:01
2
$\begingroup$

Not knowing the data in detail, this look like a linear model with "dummys".

A standard linear model looks like ($\beta_0$ is the intercept, $\beta_1$ is the slope):

$$ y = \beta_0 + \beta_1 x + u.$$

Now, when you have two distinct "groups" for which there is a "flag" in the data, you can assign a indicator variable or "dummy" (say $d$, a vector with =1 "true" or =0 otherwise). You can add this to your linear model:

$$ y = \beta_0 + \beta_1 x + \beta_2 d + u. $$

$d$ introduces a separate intercept for the assigned group ($d=1$).

You can also add "interaction terms" to allow for a separate slope for group $d$ by simply multiplying $x$ and $d$.

$$ y = \beta_0 + \beta_1 x + \beta_2 d + \beta_3 x d + u. $$

Note that since there already is one intercept in the model (the $\beta_0$), you can only add "contrasts" to the intercept. So when you have $i$ groups for which you want to have an individual intercept, you would add $i-1$ indicators/dummys to the model. For the "reference group", the intercept will be $\beta_0$ and for the group which is identified by the "dummy" ($d$ above), the intercept would be $\beta_0 + d$.

$\endgroup$
1
  • $\begingroup$ Thanks. This makes sense. I will dig into this. $\endgroup$
    – mmrbulbul
    Jul 22 '20 at 8:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.