4
$\begingroup$

I am trying to reuse a multiple linear regression formula, where I have a set of predictors and set of coefficient values.

This is how they look like (in real example there is ~10 of predictors):

alpha = 7.601
weight = 2213.940
length = -0.032
height = -0.629
size = 0.345

I know that my multiple linear regression should be constructed like this, i.e. sum of alpha (b0), and multiplication of predictors (xn) with their coefficients (bn)

y = b0 + b1*x1 + b2*x2 + b3*x3 + b4*x4 +b5*x5

I want to reuse the formula, but I have data only describing weight and length, so have no data about predictors b3-5.

The question is, can I just skip parameters that I don't have data for? I.e. instead of using full sum of parameters*coefficient I will just use the ones I have?

I would guess that this is likely not a correct approach. Also, I don't have information about the proportion of explained variability by each predictor, or their significance, to guide me which predictors are more important that others. Thank you for your advises.

$\endgroup$
1
  • 4
    $\begingroup$ You can't predict from a model, if you don't have data for all predictors. You'll need to develop a new model that only includes available predictors. $\endgroup$
    – Roland
    Commented Feb 7, 2020 at 8:01

2 Answers 2

2
$\begingroup$

You would likely have to use some tricks.

Imagine if your model predicts age using weight and height. If you only have weight for a particular sample that would be the same as assuming its height is 0. So at the very least I would say you should substitute some values for the variables that you are missing. Maybe by using their average from the other samples.

$\endgroup$
1
$\begingroup$

You can't reuse directly those parameters to fit them again with only part of the descriptive data. You can however use tricks as @Karolis said.

One possible idea is to train a second model with only weight and length as descriptor. Then blend the two models by taking the weighted mean of the predictions of model 1 and 2.

[Edit] I was thinking, maybe you can reuse your first model and fits only parameters weight and length. The idea is to assign value 0 for all other variables. Then feed those sample to the model and compute your loss. And finally perform a gradient descent with small learning rate on your two parameters (it won't affect the other parameters).

If possible you'll need to check that it doesn't worsen results the global dataset.

$\endgroup$
2
  • $\begingroup$ would you like to provide an example bout how to calculate the loss due to setting parameters to zero? i.e. as you say, create one model with 5 variables, then create one model with 2 variables (another 3 set to 0) and find their difference? Thank you again $\endgroup$
    – maycca
    Commented Feb 7, 2020 at 11:43
  • $\begingroup$ The loss - assuming you're estimating the conditional mean - would be the squared sum of (y - (b0 + b1*x1 +b2*x2)) for each training sample. $\endgroup$
    – Samos
    Commented Feb 10, 2020 at 19:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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