3
$\begingroup$

Suppose I have a model that was trained with a dataset that contains the features (f1, f2, f3, f4, f5, f6). However, my test dataset does not contain all features of the training dataset, but only (f1, f2, f3). How can I predict the true label of the entries of this test dataset without all features?

$\endgroup$

2 Answers 2

1
$\begingroup$

Assuming that you have access to the training data set, you could use an autoencoder network to predict what features f4, f5, f6 'could be' for the test data set. The way to do this is to train the autoencoder on the training data set with features f1, f2, f3 as inputs, and then use f1,f2,f3,f4,f5,f6 as the output of the network. The autoencoder then effectively learns to map any input samples with (f1,f2,f3) to (f1,f2,f3,f4,f5,f6). By passing your test data through the autoencoder, you can then use the output and pass it to your model.

$\endgroup$
1
  • $\begingroup$ Thank you so much! I will attempt to learn this network model $\endgroup$ Commented Jul 28, 2020 at 1:00
0
$\begingroup$

I assume you trained your model on (f1, f2, f3, f4, f5, f6) and in your test data you sometimes have (f1, f2, f3) and sometimes have for example (f1, f2, f3, f4, f5, f6), right? Because if your test data always have (f1, f2, f3), then isn't it better to just train a model on available features?

So if my assumption is correct what I would do is to manipulate the training set a bit, keeping some training set with (f1, f2, f3, f4, f5, f6) and some others with (f1, f2, f3) with replacement of real values in their (f4, f5, f6) by e.g. mean of respective feature. So all training set still have (f1, f2, f3, f4, f5, f6) but some of them have manipulated (f4, f5, f6). Then finally when testing, do the same manipulation to those test data that have a smaller number of features.

I think like this your model learn how to predict base on (f1, f2, f3) when other features are not available. but at the same time, take advantage of all features if they are all available.

It's probably not the best approach but it worth to try.

$\endgroup$
1
  • $\begingroup$ I think your explanation means 'imputation' for missing value $\endgroup$ Commented Jul 28, 2020 at 1:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .