Skip to main content
fix summation equation
Source Link
cschmidt
  • 205
  • 2
  • 7

I have a regression problem where the independent variables are all factors (categorical). I've been looking at the literature on missing data, and so far it all seems concerned with missing training data. I was wondering if there is a standard way of dealing with missing data in the prediction set. That is, you have all the data you need to train, but then you need to be able to make a prediction with only partial data. This must have been a studied problem.

My initial thought is to use an average of the dummy encoded variables, according to how common they are. As a quick example, say we have a three level factor dummy encoded as

level 1: [1 0]
level 2: [0 1]
level 3: [0 0]

Say level $i$ occurs fraction $f_i$ of the time in the training data (so $\sum(i, f_i)=1$$\sum_i{f_i}=1$), and the regression has the two coefficients $\beta_1$ and $\beta_2$.

Then a missing value in this factor might be estimated as: $$ \beta_1*f_1 + \beta_2*f_2 + 0*f_3 $$ But given that the "default" level encoding are shared across factors, I'm not sure I'm handling level 3 correctly in this case.

I have a regression problem where the independent variables are all factors (categorical). I've been looking at the literature on missing data, and so far it all seems concerned with missing training data. I was wondering if there is a standard way of dealing with missing data in the prediction set. That is, you have all the data you need to train, but then you need to be able to make a prediction with only partial data. This must have been a studied problem.

My initial thought is to use an average of the dummy encoded variables, according to how common they are. As a quick example, say we have a three level factor dummy encoded as

level 1: [1 0]
level 2: [0 1]
level 3: [0 0]

Say level $i$ occurs fraction $f_i$ of the time in the training data (so $\sum(i, f_i)=1$), and the regression has the two coefficients $\beta_1$ and $\beta_2$.

Then a missing value in this factor might be estimated as: $$ \beta_1*f_1 + \beta_2*f_2 + 0*f_3 $$ But given that the "default" level encoding are shared across factors, I'm not sure I'm handling level 3 correctly in this case.

I have a regression problem where the independent variables are all factors (categorical). I've been looking at the literature on missing data, and so far it all seems concerned with missing training data. I was wondering if there is a standard way of dealing with missing data in the prediction set. That is, you have all the data you need to train, but then you need to be able to make a prediction with only partial data. This must have been a studied problem.

My initial thought is to use an average of the dummy encoded variables, according to how common they are. As a quick example, say we have a three level factor dummy encoded as

level 1: [1 0]
level 2: [0 1]
level 3: [0 0]

Say level $i$ occurs fraction $f_i$ of the time in the training data (so $\sum_i{f_i}=1$), and the regression has the two coefficients $\beta_1$ and $\beta_2$.

Then a missing value in this factor might be estimated as: $$ \beta_1*f_1 + \beta_2*f_2 + 0*f_3 $$ But given that the "default" level encoding are shared across factors, I'm not sure I'm handling level 3 correctly in this case.

added tag; formatted; removed signature; light editing
Source Link
gung - Reinstate Monica
  • 147.5k
  • 89
  • 406
  • 717

I have a regression problem where the independent variables are all factors (categorical). I've been looking at the literature on missing data, and so far it all seems concerned with missing training data. I was wondering if there is a standard way of dealing with missing data in the prediction set. That is, you have all the data you need to train, but then you need to be able to make a prediction with only partial data. This must have been a studied problem.

My initial thought is to use an average of the dummy encoded variables, according to how common they are. As a quick example, say we have a three level factor dummy encoded as

level 1: [1 0]

level 2: [0 1]

level 3: [0 0]

level 1: [1 0]
level 2: [0 1]
level 3: [0 0]

saySay level i$i$ occurs fraction f_i$f_i$ of the time in the training data (so sum(i, f_i)==1$\sum(i, f_i)=1$)

say, and the regression has the two coefficients \beta_1$\beta_1$ and \beta_2$\beta_2$.

Then a missing value in this factor might be estimated as:

\beta_1f_1 + \beta_2f_2 + 0*f_3

But $$ \beta_1*f_1 + \beta_2*f_2 + 0*f_3 $$ But given that the "default" level encoding are shared across factors, I'm not sure I'm handling level 3 correctly in this case.

Any suggestions?

Thanks, Craig

I have a regression problem where the independent variables are all factors (categorical). I've been looking at the literature on missing data, and so far it all seems concerned with missing training data. I was wondering if there is a standard way of dealing with missing data in the prediction set. That is, you have all the data you need to train, but then you need to be able to make a prediction with only partial data. This must have been a studied problem.

My initial thought is to use an average of the dummy encoded variables, according to how common they are. As a quick example, say we have a three level factor dummy encoded as

level 1: [1 0]

level 2: [0 1]

level 3: [0 0]

say level i occurs fraction f_i of the time in the training data (so sum(i, f_i)==1)

say the regression has the two coefficients \beta_1 and \beta_2.

Then a missing value in this factor might be estimated as:

\beta_1f_1 + \beta_2f_2 + 0*f_3

But given that the "default" level encoding are shared across factors, I'm not sure I'm handling level 3 correctly in this case.

Any suggestions?

Thanks, Craig

I have a regression problem where the independent variables are all factors (categorical). I've been looking at the literature on missing data, and so far it all seems concerned with missing training data. I was wondering if there is a standard way of dealing with missing data in the prediction set. That is, you have all the data you need to train, but then you need to be able to make a prediction with only partial data. This must have been a studied problem.

My initial thought is to use an average of the dummy encoded variables, according to how common they are. As a quick example, say we have a three level factor dummy encoded as

level 1: [1 0]
level 2: [0 1]
level 3: [0 0]

Say level $i$ occurs fraction $f_i$ of the time in the training data (so $\sum(i, f_i)=1$), and the regression has the two coefficients $\beta_1$ and $\beta_2$.

Then a missing value in this factor might be estimated as: $$ \beta_1*f_1 + \beta_2*f_2 + 0*f_3 $$ But given that the "default" level encoding are shared across factors, I'm not sure I'm handling level 3 correctly in this case.

Source Link
cschmidt
  • 205
  • 2
  • 7

Dealing with missing data in the prediction set only

I have a regression problem where the independent variables are all factors (categorical). I've been looking at the literature on missing data, and so far it all seems concerned with missing training data. I was wondering if there is a standard way of dealing with missing data in the prediction set. That is, you have all the data you need to train, but then you need to be able to make a prediction with only partial data. This must have been a studied problem.

My initial thought is to use an average of the dummy encoded variables, according to how common they are. As a quick example, say we have a three level factor dummy encoded as

level 1: [1 0]

level 2: [0 1]

level 3: [0 0]

say level i occurs fraction f_i of the time in the training data (so sum(i, f_i)==1)

say the regression has the two coefficients \beta_1 and \beta_2.

Then a missing value in this factor might be estimated as:

\beta_1f_1 + \beta_2f_2 + 0*f_3

But given that the "default" level encoding are shared across factors, I'm not sure I'm handling level 3 correctly in this case.

Any suggestions?

Thanks, Craig