0
$\begingroup$

I am creating a model to predict customer churn. Checking this post, a couple of doubts came up:

-All the transformation we do when training the data, it is necessary to perform also when predicting? e.g, If I do 'One-hot encoding' over a column when training the algorithm, should I encode again when I predict with the final model?.

-All this transformations are store within the .pkl file so that, when we call the predict method, all those transformations occurs?

Sorry if this question does not make sense, but I'm newbie with this

$\endgroup$

1 Answer 1

1
$\begingroup$

Yes, all the transformation which you apply on training data you should apply on test data and any new data. Depending on type of transformation it can be stored as a pickle file or just simple as a method.

$\endgroup$
1
  • $\begingroup$ So, whenever I call the .predict(X) function on production, first I need to transform/preprocess the dataset (X) just like in the modeling phase? I just want to be 100% sure of doing it in the right way as I've never deployed and use any model into prod. $\endgroup$ Feb 16, 2022 at 12:47

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.