1
$\begingroup$

Say we have a model trained on dataset A, which has a number of features, as usual. We then persist that model to disk and use it when we need to run inference (make predictions). Usually we run inference against unseen data with the same features. Is it possible to run inference against unseen data with different features. Note that these new features are very similar to the ones used in training. So in a sense it would be a type of transfer learning (actually more like “transfer inference”). Can this be done in scikit learn, given that loaded models (from say Pickle) expect the column names to be the same?

$\endgroup$
1
  • $\begingroup$ did you try doing that with a simple mock model? $\endgroup$ – Bruno Lubascher Nov 22 '20 at 16:28
0
$\begingroup$

Technically, the only constraint would be the number of features that has to be the same than during the training phase (in most scikit learn models).

Will it perform well ?

I would say it really depends on the type of model/approach you are using and what is behind:

Note that these new features are very similar to the ones used in training

Generally speaking it will probably not perform well unless the training features and the new features are related in a way that is acceptable by your model.

$\endgroup$

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.